Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Maxim Dounin
February 13, 2015 12:36PM
Hello!

On Fri, Feb 13, 2015 at 06:05:12PM +0300, Maxim Dounin wrote:

[...]

> Rather, I would suggest something like this:
>
> --- a/src/http/ngx_http_upstream.c
> +++ b/src/http/ngx_http_upstream.c
> @@ -3744,10 +3744,13 @@ ngx_http_upstream_finalize_request(ngx_h
> ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
> "finalize http upstream request: %i", rc);
>
> - if (u->cleanup) {
> - *u->cleanup = NULL;
> - u->cleanup = NULL;
> - }
> + if (u->cleanup == NULL) {
> + /* the request was already finalized */
> + ngx_http_finalize_request(r, NGX_DONE);

Err, return should be here.

> + }
> +
> + *u->cleanup = NULL;
> + u->cleanup = NULL;
>
> if (u->resolved && u->resolved->ctx) {
> ngx_resolve_name_done(u->resolved->ctx);
>
> (Untested though.)

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

[PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Yichun Zhang (agentzh) 692 February 12, 2015 08:32PM

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Maxim Dounin 355 February 13, 2015 10:06AM

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Maxim Dounin 305 February 13, 2015 12:36PM

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Yichun Zhang (agentzh) 300 February 15, 2015 05:06PM

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Maxim Dounin 254 March 02, 2015 02:10PM

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

Yichun Zhang (agentzh) 285 March 02, 2015 02:40PM



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

Online Users

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