Passing new headers to location.capture? #57

bengrimm opened this Issue Aug 29, 2011 · 6 comments


None yet
3 participants

I would like to pass arbitrary headers to requests made through the location.capture mechanism, but looking at the source it appears that the set_content_length_header method is what handles all of the header duplication from the parent request. Are there any plans to add this functionality?

I should clarify that ngx.req.set_header can be used to work around this problem. But, in the case where one wishes to make requests to different uri's with different header requirements the only option is to save the existing headers, set those that are needed, make the request, then replace the former values. It works, but a separate argument in the options table would be a "clean" solution that is compatible with capture_multi.


agentzh commented Aug 30, 2011

Yeah, this has been on our TODO list. Would you like to provide a patch? ;)

leifg commented Apr 11, 2014

Ok, this issue is very old now is there already an implementation?


agentzh commented Apr 11, 2014

@leifg There is a pending pull request implementing this. But I'm sorry I haven't got the chance to review and merge it yet.

leifg commented Apr 14, 2014

OK, that sounds great. Which one is it though?


agentzh commented Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment