Merge pull request #318 from tokenrove/transfer-encoding-chunked

This commit is contained in:
Thijs Schreijer 2022-03-22 09:39:02 +01:00 committed by GitHub
commit d3434c0198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,6 +283,13 @@ local function adjustrequest(reqt)
nreqt.uri = reqt.uri or adjusturi(nreqt) nreqt.uri = reqt.uri or adjusturi(nreqt)
-- adjust headers in request -- adjust headers in request
nreqt.headers = adjustheaders(nreqt) nreqt.headers = adjustheaders(nreqt)
if nreqt.source
and not nreqt.headers["content-length"]
and not nreqt.headers["transfer-encoding"]
then
nreqt.headers["transfer-encoding"] = "chunked"
end
-- ajust host and port if there is a proxy -- ajust host and port if there is a proxy
nreqt.host, nreqt.port = adjustproxy(nreqt) nreqt.host, nreqt.port = adjustproxy(nreqt)
return nreqt return nreqt