Hello!
On Thu, Sep 20, 2012 at 3:35 AM, James Hurst <ja...@riverratrecords.com> wrote:
>> 1. set the parent request's request header before calling
>> ngx.location.capture so that the subrequest will inherit it,
>
> Oh.. this is basically all I need, and it seems to work! When reading the
> docs, it says "None of the current request's subrequests will be affected"?
> Perhaps I'm not understanding something?
> http://wiki.nginx.org/HttpLuaModule#ngx.req.set_header
>
Oh, the documentation is wrong here. I dunno why it says that. I've
just fixed it:
http://wiki.nginx.org/HttpLuaModule#ngx.req.set_header
Nice catch! Thanks!
> I just ran a test, and it looks like I can store the parent request's header
> value, change it with set_header(), capture the subrequest (which indeed
> inherits the new value), and then restore the original value afterwards.
> Which for my particular case reads quite well too.
>
Yes, you can surely do that :)
Best regards,
-agentzh