thanks, the part where you massage the content lengths I was missing -- or had no clue would be needed.
On Sat, Apr 18, 2015 at 12:06 PM, Valentin V. Bartenev <[email protected]> wrote: > On Saturday 18 April 2015 11:23:54 jb wrote: > > gotcha, I saw the discarded body thing in the debug log. ok thanks, > > um, how do you proxy_pass to nginx itself ? > > > > can you give an example ? > > just proxy_pass http://127.0.0.1/ > > and proxy_pass_request_body off > > > > what about my return 200 "$content_length bytes" line still keep that? > > > [..] > > events {} > > http { > log_format lengths $request_length; > > server { > location / { > proxy_pass http://unix:nginx.sock:; > proxy_pass_request_body off; > > proxy_set_header X-Response "$content_length bytes"; > proxy_set_header Content-Length ""; > > access_log logs/lengths.log lengths; > } > } > > server { > listen unix:nginx.sock; > return 200 $http_x_response; > } > } > > % telnet 127.0.0.1 8000 > Trying 127.0.0.1... > Connected to 127.0.0.1. > Escape character is '^]'. > POST / HTTP/1.0 > Content-Length: 1000 > > bbbbbbbbbbbbbbbbbbbbbbbb > bbbbbbbbbbbbbbbbbbbbbbbb > bbbbbbbbbbbbbbbbbbbbbbbb > bbbbbbbbbbbbbbbbbbbbbbbb > ^] > telnet> close > Connection closed. > % cat logs/lengths.log > 145 > > -- > wbr, Valentin V. Bartenev > > _______________________________________________ > nginx mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx >
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
