Hi All,
I am dealing with a weird issue, in the old HaProxy (at least in 1.5), I notice that the Set-Cookie part is written with capital S and C:
HTTP/1.1 200
Set-Cookie: JSESSIONID=C02B175BBFC708A7258E05EE21B64899; Path=/xxx-xxx; HttpOnly
In HaProxy 2.4 and I just tested it on 2.6, I am getting it in small letters. My client does not seem to accept the small letters:
HTTP/1.1 200
set-cookie: JSESSIONID=A816672CD2500D9177F012FB35CFDE49; Path=/xxx-xxx; HttpOnly
I was unable to find an RFC on this, but did notice that everywhere I look on the internet I see Set-Cookie and not set-cookie. Is this a bug on haproxy side, is it something I can configure somewhere, or is it a problem on the client side as it should not be case sensitive?
Thanks in advance…
To clarify a bit better, I can solve it by switching from HTTP mode to TCP mode, but that might give me issue with stickiness.
Don’t wanted to steal the right answer, so just a link to my source: Are HTTP headers case-sensitive? - Stack Overflow
best regards,
Markus
If you have a bogus client that breaks otherwise, yes, you can workaround this client bug with the bogus client features that have been introduced for this use-case. Something like:
global
h1-case-adjust set-cookie Set-Cookie
default
h1-case-adjust-bogus-client
Also see h1-case-adjust and option h1-case-adjust-bogus-client.
Thanks for your response, this is very useful. I will try this out soon and confirm if it works.
Tested and works, many thanks, just a small remark, it should be:
global
h1-case-adjust set-cookie Set-Cookie
default
option h1-case-adjust-bogus-client
1 Like