diff options
author | Caleb Maclennan <caleb@alerque.com> | 2022-03-24 18:11:07 +0300 |
---|---|---|
committer | Caleb Maclennan <caleb@alerque.com> | 2022-03-24 18:11:07 +0300 |
commit | 2de8ddfbb837a75b1cb5f09a656379c1e7cc589c (patch) | |
tree | 20b5f7b8a48d1c126763daca3860fcfb7c3b59a7 /src/http.lua | |
parent | f9e1d03f3c6c9fc59dd3b91716debc23aebf947f (diff) | |
parent | 5ed8b66e6d0c295f95fade159ada0f97f482b2ac (diff) | |
download | luasocket-2de8ddfbb837a75b1cb5f09a656379c1e7cc589c.tar.gz luasocket-2de8ddfbb837a75b1cb5f09a656379c1e7cc589c.tar.bz2 luasocket-2de8ddfbb837a75b1cb5f09a656379c1e7cc589c.zip |
Merge remote-tracking branch 'upstream/master' into test-builds
Diffstat (limited to 'src/http.lua')
-rw-r--r-- | src/http.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http.lua b/src/http.lua index e3a1742..1330355 100644 --- a/src/http.lua +++ b/src/http.lua | |||
@@ -283,6 +283,13 @@ local function adjustrequest(reqt) | |||
283 | nreqt.uri = reqt.uri or adjusturi(nreqt) | 283 | nreqt.uri = reqt.uri or adjusturi(nreqt) |
284 | -- adjust headers in request | 284 | -- adjust headers in request |
285 | nreqt.headers = adjustheaders(nreqt) | 285 | nreqt.headers = adjustheaders(nreqt) |
286 | if nreqt.source | ||
287 | and not nreqt.headers["content-length"] | ||
288 | and not nreqt.headers["transfer-encoding"] | ||
289 | then | ||
290 | nreqt.headers["transfer-encoding"] = "chunked" | ||
291 | end | ||
292 | |||
286 | -- ajust host and port if there is a proxy | 293 | -- ajust host and port if there is a proxy |
287 | nreqt.host, nreqt.port = adjustproxy(nreqt) | 294 | nreqt.host, nreqt.port = adjustproxy(nreqt) |
288 | return nreqt | 295 | return nreqt |