Hi Brian, On Fri, Feb 03, 2017 at 11:23:14AM -0500, Brian Loss wrote: > I am seeing what I believe is a bug when converters are used with > http-request replace-header. > I have the following configuration: > > global > maxconn 5 > > defaults > mode http > timeout connect 30s > timeout client 1m > timeout server 1m > > listen test > bind :80 > > acl param_found urlp(cookievalue) -m found > acl cookies_found req.hdr(Cookie) -m found > http-request replace-header Cookie (.*) > \1;test=%[urlp(cookievalue),url_dec] if param_found cookies_found > http-request set-header Cookie test=%[urlp(cookievalue),url_dec] if > param_found !cookies_found > > server server1 127.0.0.1:8080 > > > I am running a simple echo server from npm on port 8080. > > If I do "curl localhost/test?cookievalue=foo", then I see the correct > "Cookie: test=foo" in the request to the echo server. If I do "curl -H > 'Cookie: x=y' localhost/test?cookievalue=foo" then the cookie header I passed > is wiped out and I see only an empty cookie header in the request to the echo > server. If I remove ",url_dec" from the replace-header statement, then both > cases work. > > Did I miss something in the docs, or should this configuration work (which > would mean there is a bug)? Thanks!
This reminds me of a bug we've fixed a few months ago regarding the way the trash is (ab)used. What version are your running ? I'm suspecting 1.7.3 or 1.6.11. 1.7.4 has it fixed, and the fix will be in 1.6.12 in a few days and is already in the latest 1.6 snapshot. Willy

