Welcome! Log In Create A New Profile

Advanced

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

jb
April 17, 2015 10:18PM
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 <vbart@nginx.com>
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
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

logging variables -- $bytes_sent .. where is $bytes_read ?

jb April 17, 2015 06:24PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

Valentin V. Bartenev April 17, 2015 07:48PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

jb April 17, 2015 08:10PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

jb April 17, 2015 08:26PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

Valentin V. Bartenev April 17, 2015 09:12PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

jb April 17, 2015 09:26PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

jb April 17, 2015 09:46PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

Valentin V. Bartenev April 17, 2015 10:08PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

jb April 17, 2015 10:18PM

Re: logging variables -- $bytes_sent .. where is $bytes_read ?

Valentin V. Bartenev April 17, 2015 08:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready