From 4023a5ab7906a13a3250c1b2f787401e02a56ff5 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 25 Mar 2020 23:03:57 -0400 Subject: [PATCH] fix: use `content-encoding: deflate` when returning compressed content the RFCs don't mandate it but it seems like chrome and firefox only understand that. --- src/camlzip/Tiny_httpd_camlzip.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/camlzip/Tiny_httpd_camlzip.ml b/src/camlzip/Tiny_httpd_camlzip.ml index 5912d925..444daed2 100644 --- a/src/camlzip/Tiny_httpd_camlzip.ml +++ b/src/camlzip/Tiny_httpd_camlzip.ml @@ -152,7 +152,7 @@ let cb_encode_compressed_stream headers= (resp.headers |> S.Headers.remove "Content-Length" - |> S.Headers.set "Transfer-Encoding" "deflate, chunked"); + |> S.Headers.set "Content-Encoding" "deflate"); body=`Stream (encode_deflate_stream_ ~buf_size str); } ) else None