@@ -285,7 +285,7 @@ module Server = struct
285
285
type response = Response .t * Body .t [@@ deriving sexp_of ]
286
286
287
287
type response_action =
288
- [ `Expert of Cohttp.Header .t * (IO .ic -> IO .oc -> unit Deferred .t )
288
+ [ `Switching_protocols of Cohttp.Header .t * (IO .ic -> IO .oc -> unit Deferred .t )
289
289
| `Response of response
290
290
]
291
291
@@ -315,7 +315,7 @@ module Server = struct
315
315
Reader. read_all rd (fun rd ->
316
316
! last_body_pipe_drained
317
317
>> = fun () ->
318
- (* [`Expert ] responses may close the [Reader.t] *)
318
+ (* [`Switching_protocols ] responses may close the [Reader.t] *)
319
319
if Reader. is_closed rd
320
320
then return `Eof
321
321
else begin
@@ -326,18 +326,18 @@ module Server = struct
326
326
let body, finished = read_body req rd in
327
327
handle_request ~body sock req
328
328
>> | function
329
- | `Expert (headers , io_handler ) ->
329
+ | `Switching_protocols (headers , io_handler ) ->
330
330
let finished = Ivar. create () in
331
331
last_body_pipe_drained := Ivar. read finished;
332
- `Ok (`Expert (headers, io_handler, finished))
332
+ `Ok (`Switching_protocols (headers, io_handler, finished))
333
333
| `Response r ->
334
334
last_body_pipe_drained := finished;
335
335
`Ok (`Response (req, body, r))
336
336
end
337
337
)
338
338
in
339
339
Pipe. iter requests_pipe ~f: (function
340
- | `Expert (headers , io_handler , finished ) ->
340
+ | `Switching_protocols (headers , io_handler , finished ) ->
341
341
let response =
342
342
Response. make ()
343
343
~encoding: (Header. get_transfer_encoding headers)
0 commit comments