Skip to content

Commit 9281cab

Browse files
committed
Ensure Http 1.1 when forcing chunked encoding
Older HTTP versions don't really support it.
1 parent 66a6621 commit 9281cab

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.bleep

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9594f40a77159eeab93897a8f67347971a83d26b
1+
e7df08c79f6333db2821028ef00eb65ea6152a48

pingora-proxy/src/proxy_h1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ impl<SV> HttpProxy<SV> {
513513
&& header.headers.get(http::header::CONTENT_LENGTH).is_none()
514514
&& !end
515515
{
516+
// Upgrade the http version to 1.1 because 1.0/0.9 doesn't support chunked
517+
header.set_version(Version::HTTP_11);
516518
header.insert_header(http::header::TRANSFER_ENCODING, "chunked")?;
517519
}
518520

0 commit comments

Comments
 (0)