6 messages in ru.sysoev.nginxRe: [dev] some questions about subreq...
FromSent OnAttachments
Manlio PerilloMar 27, 2008 4:52 am 
Sergey BochenkovMar 27, 2008 7:28 am 
Manlio PerilloMar 28, 2008 5:21 am 
Sergey BochenkovMar 28, 2008 6:13 am 
Manlio PerilloMar 29, 2008 5:18 am 
Manlio PerilloMar 29, 2008 3:15 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [dev] some questions about subrequestsActions...
From:Manlio Perillo (manl@public.gmane.org)
Date:Mar 28, 2008 5:21:08 am
List:ru.sysoev.nginx

Sergey Bochenkov ha scritto:

NGX_HTTP_ZERO_IN_URI:

src/http/ngx_http_core_module.c: sr->zero_in_uri = (flags & NGX_HTTP_ZERO_IN_URI) != 0;

src/http/ngx_http_request.h: /* URI with "\0" or "%00" */ unsigned zero_in_uri:1;

Obviously, IMHO.

Yes, this was easy!

NGX_HTTP_SUBREQUEST_IN_MEMORY:

src/http/ngx_http_core_module.c: sr->subrequest_in_memory = (flags & NGX_HTTP_SUBREQUEST_IN_MEMORY) != 0;

src/http/ngx_http_upstream.c: if (!r->subrequest_in_memory) { ngx_http_upstream_send_response(r, u); return; }

/* subrequest content in memory */

...

So, as I can understand from using-of-subrequests point of view, r->subrequest_in_memory flag tells ngx_http_upstream_module to save a pointer to the full chain of response buffers in r->upstream->out_bufs chain-link. And *not-to-free* that buffers after subrequest was finished.

Fix me, if I'm wrong.

I'm not sure, but it seems that I can safely set flags to 0.

I have one more, important, question. When will be the post_subrequest->handler called? Always after ngx_http_subrequest returns?