Skip to content

Commit a7d1fdd

Browse files
Matthew SafferMatthew Saffer
authored andcommitted
Rename
1 parent 33fb494 commit a7d1fdd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

async/cohttp_async.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ module Server = struct
285285
type response = Response.t * Body.t [@@deriving sexp_of]
286286

287287
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)
289289
| `Response of response
290290
]
291291

@@ -315,7 +315,7 @@ module Server = struct
315315
Reader.read_all rd (fun rd ->
316316
!last_body_pipe_drained
317317
>>= fun () ->
318-
(* [`Expert] responses may close the [Reader.t] *)
318+
(* [`Switching_protocols] responses may close the [Reader.t] *)
319319
if Reader.is_closed rd
320320
then return `Eof
321321
else begin
@@ -326,18 +326,18 @@ module Server = struct
326326
let body, finished = read_body req rd in
327327
handle_request ~body sock req
328328
>>| function
329-
| `Expert (headers, io_handler) ->
329+
| `Switching_protocols (headers, io_handler) ->
330330
let finished = Ivar.create () in
331331
last_body_pipe_drained := Ivar.read finished;
332-
`Ok (`Expert (headers, io_handler, finished))
332+
`Ok (`Switching_protocols (headers, io_handler, finished))
333333
| `Response r ->
334334
last_body_pipe_drained := finished;
335335
`Ok (`Response (req, body, r))
336336
end
337337
)
338338
in
339339
Pipe.iter requests_pipe ~f:(function
340-
| `Expert (headers, io_handler, finished) ->
340+
| `Switching_protocols (headers, io_handler, finished) ->
341341
let response =
342342
Response.make ()
343343
~encoding:(Header.get_transfer_encoding headers)

async/cohttp_async.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ module Server : sig
150150
type response = Response.t * Body.t [@@deriving sexp_of]
151151

152152
type response_action =
153-
(* The connection is not closed in the [`Expert] case until the [unit Deferred.t]
153+
(* The connection is not closed in the [`Switching_protocols] case until the [unit Deferred.t]
154154
becomes determined.
155155
*)
156-
[ `Expert of Cohttp.Header.t * (Reader.t -> Writer.t -> unit Deferred.t)
156+
[ `Switching_protocols of Cohttp.Header.t * (Reader.t -> Writer.t -> unit Deferred.t)
157157
| `Response of response
158158
]
159159

0 commit comments

Comments
 (0)