Welcome! Log In Create A New Profile

Advanced

Re: Error handling from filter modules

Maxim Dounin
October 19, 2015 10:02PM
Hello!

On Mon, Oct 19, 2015 at 11:02:53PM +0100, Steven Hartland wrote:

[...]

> >When the NGX_ERROR case is triggered, no response is returned, the
> >connection is just closed.
> It does seem like the connection to the client is just closed however a 206
> response is logged for the request in the access log, hence my confusion; is
> that expected?

Yes. Once set, status code will be logged even if an error occurs
later.

> >As this expected to happen if and only
> >if we weren't able to allocate memory, this is believed to be
> >perfectly correct behaviour. Trying to do anything else is very
> >unlikely to succeed, but likely to result in additional problems.
> >
> In the current code yes, but in the patch that I was testing there's one
> additional case which can return an error. This was caused by an intentional
> configuration error (test designed to confirm the behaviour in this case).
>
> Its likely going to be difficult to discuss fully without the patch to
> comment against so I'll finalise that and get it posted as soon as I can.

General recommendation is to avoid cases when you have to return
error pages from filter modules. But yes, it's difficult to
disscuss without the code.

--
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

Error handling from filter modules

steveh 691 October 15, 2015 09:38PM

Re: Error handling from filter modules

Roman Arutyunyan 314 October 16, 2015 08:18AM

Re: Error handling from filter modules

Maxim Dounin 293 October 16, 2015 08:24AM

Re: Error handling from filter modules

Roman Arutyunyan 314 October 16, 2015 02:18PM

Re: Error handling from filter modules

Maxim Dounin 310 October 16, 2015 08:22AM

Re: Error handling from filter modules

steveh 408 October 16, 2015 01:16PM

Re: Error handling from filter modules

Maxim Dounin 292 October 19, 2015 01:00PM

Re: Error handling from filter modules

steveh 393 October 19, 2015 06:04PM

Re: Error handling from filter modules

Maxim Dounin 308 October 19, 2015 10:02PM

Re: Error handling from filter modules

steveh 408 October 16, 2015 12:50PM



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

Online Users

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