﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
563	improvement proposed for ngx_http_perl_module: add header_in_set	David Coutadeur		"Hi,

I would like to set input headers in perl module, but I realized that the functionnality was not present.
It can be useful, for example for this proxy configuration example:

{{{
server {
    listen *:8080;
    server_name test.example.com;

    # SSO protection
    location / {
        authn_request /auth;
        proxy_pass http://backend.lan/;
    }
    set $redirectURL """";

    location = /auth {
        perl My::Handler;
    }
}
}}}

With this example, the Handler perl module could have the directive:
$r->header_in_set('key', 'value');
so that the final backend could use this header.

It does not seems much complicated, just a modification of nginx.xs could be sufficient. The functionnality can be found for example in HttpHeadersMoreModule for example (http://wiki.nginx.org/HttpHeadersMoreModule#more_set_input_headers)"	enhancement	closed	minor		nginx-core	1.5.x	wontfix			Linux debian-wheezy-64-lemon 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux	"nginx version: nginx/1.6.0
built by gcc 4.7.2 (Debian 4.7.2-5) 
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/opt/nginx --http-log-path=/var/log/nginx16/access.log --error-log-path=/var/log/nginx16/error.log --lock-path=/var/lock/nginx16.lock --pid-path=/run/nginx16.pid --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --with-http_authn_request_module --add-module=/root/nginx-1.6.0/contrib/headers-more-nginx-module-0.25"
