Hi
The lua doc at https://github.com/chaoslawful/lua-nginx-module
Says “Note that, by default, subrequests issued by ngx.location.capture
inherit all the request headers of the current request.”
And goes on to say that it can be an unwanted feature
In my project I actually take advantage of this feature, but for some
reason the headers don’t go through to the sub request
All I get is:
Uri:/checksize/100meg.zip
Host : 127.0.0.1:12340
Connection : close
Content-Length : 0
It should have a TON of headers and I’ve proven they are there in the
main request
Any ideas why they don’t get through?
Thanks as always
Richard
On Fri, May 20, 2011 at 5:59 AM, Richard K.
[email protected] wrote:
the headers dont go through to the sub request
Could you please paste your nginx.conf here? Also, information about
your nginx’s version and ngx_lua’s version can also be helpful 
Best,
-agentzh
Hi
Thanks for the reply
I traced the issue with the header’s not being re-sent
ngx.location.capture("/some-location", { method = ngx.HTTP_HEAD })
they are not re-sent
but
ngx.location.capture("/some-location", { method = ngx.HTTP_GET })
they are sent
I don’t know if this is correct behavior (it may well be)
I got around it by changing the headers I needed into args then
re-creating them at /some-location 
On Fri, May 20, 2011 at 7:32 PM, Richard K.
[email protected] wrote:
I got around it by changing the headers I needed into args then re-creating them
at /some-location 
This issue has been proven to be caused by two separate bugs. I’ve
already fixed them in ngx_lua’s master branch:
http://bit.ly/mU1Z29
Could you please try it out?
Best,
-agentzh