diff options
| author | Nick Brachet <nick@forge.ai> | 2020-06-22 19:17:11 +0000 |
|---|---|---|
| committer | Nick Brachet <nick@forge.ai> | 2020-06-22 19:17:11 +0000 |
| commit | 8f74f118fdfd583dca0447767882ab6ca4a26395 (patch) | |
| tree | 15784acde939c3ab55821383d242528f1886b071 /plugins | |
| parent | 95d1d7498bfb9010467edf43fdd00eeed60e4d59 (diff) | |
| download | uwsgi-8f74f118fdfd583dca0447767882ab6ca4a26395.tar.gz | |
in raw_body mode don't overwrite hr->remains
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/http/http.c | 5 |
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; |
