Skip to content

Commit

Permalink
Merge pull request #19 from ScoreUnder/lowercase_headers_http2
Browse files Browse the repository at this point in the history
Lowercase header names on HTTP2
  • Loading branch information
hannesm authored Jul 3, 2023
2 parents 2fc7954 + 74618b3 commit a612c9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/http_lwt_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ let prep_http_1_1_headers headers host user_pass blen =
add_authentication ~add headers user_pass

let prep_h2_headers headers host user_pass blen =
let headers = H2.Headers.of_list headers in
let headers = List.rev_map (fun (k, v) -> (String.lowercase_ascii k, v)) headers in
let headers = H2.Headers.of_rev_list headers in
let add hdr = H2.Headers.add_unless_exists hdr ?sensitive:None in
let headers = add headers ":authority" host in
let headers =
Expand Down

0 comments on commit a612c9e

Please sign in to comment.