Willy,

Thanks for the reply. I believe I was still using the 1.6 line at the time
I wrote that message. The problem persists in 1.7.0-1.7.2, however 1.7.3
does appear to work for me. I will try 1.7.4 when I get a chance, but I
suspect it will work just fine there too.


On Tue, Mar 28, 2017 at 11:42 AM Willy Tarreau <[email protected]> wrote:

> 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
>

Reply via email to