Welcome! Log In Create A New Profile

Advanced

RE: Proxy Retry Logic

Sirsiwal, Umesh
December 23, 2010 08:12AM
Thanks Marcus,
In my application, I need to know once the subrequest has finally completed. I already have a module specific context attached with the subrequest. So I can easily use that to keep track of number of callbacks.

-Umesh
________________________________________
From: Eugaia [ngx.eugaia@gmail.com]
Sent: Thursday, December 23, 2010 4:35 AM
To: nginx-devel@nginx.org
Subject: Re: Proxy Retry Logic

On 23/12/2010 10:58, Eugaia wrote:
> Hi,
>
> On 23/12/2010 04:50, Sirsiwal, Umesh wrote:
>> I just tried using error_pages and have my post_subrequest return the
>> error code as Maxim had suggested.
>>
>> That works very well. The only oddity is that I get two
>> post_subrequest callback for a single subrequest. That is something I
>> can handle my module.
> Good. In your post_subrequest function, assuming you only want it
> called once, you should set sr->post_subrequest = NULL.
Or test to see if you've already run the post_subrequest by creating a
context struct and a flag to say whether you've called the function
before (but personally I prefer the former because then you don't end up
calling the same function loads of times unnecessarily).
> Marcus.


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel

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

Proxy Retry Logic

Sirsiwal, Umesh 2513 December 22, 2010 02:28PM

Re: Proxy Retry Logic

Maxim Dounin 962 December 22, 2010 06:40PM

RE: Proxy Retry Logic

Sirsiwal, Umesh 1049 December 22, 2010 07:56PM

Re: Proxy Retry Logic

Eugaia 973 December 22, 2010 08:20PM

RE: Proxy Retry Logic

Sirsiwal, Umesh 1021 December 22, 2010 08:52PM

Re: Proxy Retry Logic

Eugaia 1076 December 22, 2010 09:10PM

RE: Proxy Retry Logic

Sirsiwal, Umesh 887 December 22, 2010 09:26PM

Re: Proxy Retry Logic

Eugaia 954 December 22, 2010 09:38PM

RE: Proxy Retry Logic

Sirsiwal, Umesh 965 December 22, 2010 09:52PM

Re: Proxy Retry Logic

Eugaia 1196 December 23, 2010 04:00AM

Re: Proxy Retry Logic

Eugaia 1029 December 23, 2010 04:36AM

RE: Proxy Retry Logic

Sirsiwal, Umesh 1213 December 23, 2010 08:12AM

Re: Proxy Retry Logic

Eugaia 913 December 22, 2010 09:22PM



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

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready