From 2d7b01259dfeb5bb9bfcaafe711a4f7f1dd92785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fr=C4=B1?= Date: Mon, 1 Sep 2025 18:31:10 +0000 Subject: [PATCH] rename isTransferEncodingChunked to isEncodingChunked --- connection/quic_connection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connection/quic_connection.go b/connection/quic_connection.go index d697a39a..3a399631 100644 --- a/connection/quic_connection.go +++ b/connection/quic_connection.go @@ -367,7 +367,7 @@ func buildHTTPRequest( // * the method doesn't usually have a body (GET, HEAD, DELETE, ...) // * there is no transfer-encoding=chunked already set. // So, if transfer cannot be chunked and content length is 0, we dont set a request body. - if !isWebsocket && !isTransferEncodingChunked(req) && req.ContentLength == 0 { + if !isWebsocket && !isEncodingChunked(req) && req.ContentLength == 0 { req.Body = http.NoBody } stripWebsocketUpgradeHeader(req) @@ -385,7 +385,7 @@ func setContentLength(req *http.Request) error { return err } -func isTransferEncodingChunked(req *http.Request) bool { +func isEncodingChunked(req *http.Request) bool { contentEncodingVal := req.Header.Get("Content-Encoding") // AWS S3 uses Content-Encoding: aws-chunked transferEncodingVal := req.Header.Get("Transfer-Encoding") // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding suggests that this can be a comma