mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 14:28:21 +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)
|
||||
-- adjust headers in request
|
||||
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
|
||||
nreqt.host, nreqt.port = adjustproxy(nreqt)
|
||||
return nreqt
|
||||
|
Loading…
Reference in New Issue
Block a user