summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorNick Brachet <nick@forge.ai>2020-06-22 19:17:11 +0000
committerNick Brachet <nick@forge.ai>2020-06-22 19:17:11 +0000
commit8f74f118fdfd583dca0447767882ab6ca4a26395 (patch)
tree15784acde939c3ab55821383d242528f1886b071 /plugins
parent95d1d7498bfb9010467edf43fdd00eeed60e4d59 (diff)
downloaduwsgi-8f74f118fdfd583dca0447767882ab6ca4a26395.tar.gz
in raw_body mode don't overwrite hr->remains
Diffstat (limited to 'plugins')
-rw-r--r--plugins/http/http.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/http/http.c b/plugins/http/http.c
index 05e3832e..a2c9ce82 100644
--- a/plugins/http/http.c
+++ b/plugins/http/http.c
@@ -1224,8 +1224,9 @@ ssize_t http_parse(struct corerouter_peer *main_peer) {
}
if (hr->remains > 0) {
- if (hr->content_length < hr->remains) {
- hr->remains = hr->content_length;
+ if (hr->content_length < hr->remains) {
+ if (hr->content_length > 0 || !hr->raw_body)
+ hr->remains = hr->content_length;
hr->content_length = 0;
// we need to avoid problems with pipelined requests
hr->session.can_keepalive = 0;