From 87457cda407693e4b3dd16f79e34940e92e15f27 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 3 Jul 2023 20:01:00 +0200 Subject: [PATCH] lowercase header names in http2 --- src/http_mirage_client.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http_mirage_client.ml b/src/http_mirage_client.ml index fc63120..1441ac1 100644 --- a/src/http_mirage_client.ml +++ b/src/http_mirage_client.ml @@ -204,7 +204,8 @@ let single_http_1_1_request ; finished let prepare_h2_headers headers host user_pass body_length = - 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 =