Skip to content

Commit 4023a5a

Browse files
committed
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.
1 parent 64df861 commit 4023a5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/camlzip/Tiny_httpd_camlzip.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ let cb_encode_compressed_stream
152152
headers=
153153
(resp.headers
154154
|> S.Headers.remove "Content-Length"
155-
|> S.Headers.set "Transfer-Encoding" "deflate, chunked");
155+
|> S.Headers.set "Content-Encoding" "deflate");
156156
body=`Stream (encode_deflate_stream_ ~buf_size str);
157157
}
158158
) else None

0 commit comments

Comments
 (0)