Proxy Request buffering not working as expected

Mohammad Puyandeh im_patriot at yahoo.com
Mon Nov 6 15:43:53 UTC 2017


>> If you report that nginx starts to send the content to the back-end
>> before nginx has received all of the content from the client, then
>> proxy_request_buffering is not working as intended.
Yes, that's what I am reporting, I put together a very simple tornado 
(python) script, I used both tcp connection and a unix socket, no 
differences
I used curl and my own upload python client, result were the same

>> When I try a quick test here, nginx receives the full content from the
>> client before it tries to connect to the back-end.
I prepared a minimal working sample which is easy to run and test
this is python script: https://paste.ubuntu.com/25903714/
(see lines 16 to 23 to know how to run it, it's so simple, you need a 
Linux based OS and python)
and this is nginx config: https://paste.ubuntu.com/25903719/

with the above python client you can easily produce the problem, it will 
print chunk sizes along with the number of requests, use a file larger 
than 3M to get better results
to make it complete, here is an example to upload file using curl: curl 
--request POST --data-binary "@/file/path" http://localhost/upload/

This is my first time that I'm using this service, So I thought putting 
codes somewhere else is cleaner and better

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20171106/6627281b/attachment.html>


More information about the nginx mailing list