Skip to content

Commit

Permalink
use Status.redirection variant instead of enumerating all; do not exp…
Browse files Browse the repository at this point in the history
…ose resolve_location
  • Loading branch information
robur-team committed Sep 7, 2021
1 parent 172f0f0 commit ebd3cc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/http_lwt_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ let one_request
single_request he ?config ?authenticator ~meth ~headers ?body uri
>>= fun (resp, body) ->
match resp.status with
| `Moved_permanently | `Found | `See_other | `Temporary_redirect ->
| #Status.redirection ->
(match Headers.get resp.headers "location" with
| Some location ->
let uri = resolve_location ~uri ~location in
Expand Down
2 changes: 0 additions & 2 deletions src/http_lwt_client.mli
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ type response =

val pp_response : Format.formatter -> response -> unit

val resolve_location : uri:string -> location:string -> string

val one_request
: ?config : [ `HTTP_1_1 of Httpaf.Config.t | `H2 of H2.Config.t ]
-> ?authenticator:X509.Authenticator.t
Expand Down

0 comments on commit ebd3cc1

Please sign in to comment.