Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
art-w committed Aug 29, 2024
1 parent 044db22 commit fadcbe8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cohttp/src/request.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ let make ?(meth = `GET) ?(version = `HTTP_1_1) ?encoding
let port () =
match Uri.port uri with
| Some p -> ":" ^ string_of_int p
| None -> (
| None when meth = `CONNECT -> (
match Uri_services.tcp_port_of_uri uri with
| None when meth = `CONNECT ->
failwith "A port is required for the CONNECT method."
| None -> ""
| None -> failwith "A port is required for the CONNECT method."
| Some p -> ":" ^ string_of_int p)
| None -> ""
in
let host =
match Header.get headers "host" with
Expand Down

0 comments on commit fadcbe8

Please sign in to comment.