mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Merge pull request #318 from tokenrove/transfer-encoding-chunked
This commit is contained in:
commit
d3434c0198
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user