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.
Yeah, this has been on our TODO list. Would you like to provide a patch? ;)
Ok, this issue is very old now is there already an implementation?
@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.
OK, that sounds great. Which one is it though?
@leifg This one: chaoslawful#139