Welcome! Log In Create A New Profile

Advanced

Re: couple questions regarding log phase handlers

Maxim Dounin
July 07, 2014 06:30PM
Hello!

On Mon, Jul 07, 2014 at 01:49:17PM -0700, bsfranks@gmail.com wrote:

> In the log phase, what is the best way to determine if the client had
> prematurely closed or aborted the request connection? To check
> r->connection->error and look for HTTP_BAD_REQUEST someplace? Or possibly
> check one of the members of the connection read or write structs?

Probably r->request_complete, as used for the $request_completion
variable, see http://nginx.org/r/$request_completion.

> Also, is the log phase resumable? It looks like all the log phase handlers
> are looped through in
> ngx_http_log_request() called from ngx_http_free_request(). However,
> return codes are not checked. Was hoping for a way to return NGX_AGAIN
> from within the log phase so that it could be resumable rather than
> blocking. Possible?

No.

> If not possible from within log phase, is there
> another phase or output filter location that takes place after content
> phase or content handlers have completed that is non-blocking and resumable?

I don't think there are good ways to do it. Most relevant
functionality seems to be post_action, see
http://nginx.org/r/post_action for docs and the code for details.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

couple questions regarding log phase handlers

Anonymous User 574 July 07, 2014 04:50PM

Re: couple questions regarding log phase handlers

Maxim Dounin 278 July 07, 2014 06:30PM

Re: couple questions regarding log phase handlers

Yichun Zhang (agentzh) 403 July 07, 2014 06:50PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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