atom feed4 messages in ru.sysoev.nginxRe: question on module user context
FromSent OnAttachments
Delta YehApr 11, 2009 8:03 am 
Maxim DouninApr 11, 2009 8:21 am 
Delta YehApr 11, 2009 8:32 am 
Maxim DouninApr 11, 2009 12:43 pm 
Subject:Re: question on module user context
From:Maxim Dounin (mdou@mdounin.ru)
Date:Apr 11, 2009 12:43:34 pm
List:ru.sysoev.nginx

Hello!

On Sat, Apr 11, 2009 at 11:33:22PM +0800, Delta Yeh wrote:

2009/4/11 Maxim Dounin <mdou@mdounin.ru>

Hello!

On Sat, Apr 11, 2009 at 11:04:14PM +0800, Delta Yeh wrote:

Hi , If I set a context to a module with ngx_http_set_ctx(r, c, module) Is this context valid only for current http request?

Yes.

Should I set the context for each new http request?

No, only for requests where you actually need context.

So the context is used for the scenario that the handler callback will be called multiple times to process the http request ?

Yes, it's used to preserve some request-related state between invocations of your module code.