Welcome! Log In Create A New Profile

Advanced

Re: Is there a way to get the raw request from the client in a handler?

Maxim Dounin
January 09, 2019 12:20PM
Hello!

On Wed, Jan 09, 2019 at 03:16:16PM +0100, Ottavio Campana wrote:

> Dear Maxim,
>
> in the nginx documentation
> http://nginx.org/en/docs/http/ngx_http_core_module.html#var_request I find
>
> $request full original request line
>
> How is this variable populated? I was expecting that this variable is taken
> from an internal buffer. Or is it reconstructed?

For HTTP/1.x (and HTTP/0.9), a reference to the request line is
explicitly saved in the r->request_line field when parsing a request,
see ngx_http_process_request_line() in src/http/ngx_http_request.c.

For HTTP/2, it is reconstructed. See ngx_http_v2_construct_request_line()
in src/http/v2/ngx_http_v2.c.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Is there a way to get the raw request from the client in a handler?

Ottavio Campana January 09, 2019 04:54AM

Re: Is there a way to get the raw request from the client in a handler?

Maxim Dounin January 09, 2019 08:24AM

Re: Is there a way to get the raw request from the client in a handler?

Ottavio Campana January 09, 2019 09:18AM

Re: Is there a way to get the raw request from the client in a handler?

Maxim Dounin January 09, 2019 12:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
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