# Change from Set-Cookie to set-cookie

**URL:** <https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710>\
**Category:** Help!\
**Created:** [May 23, 2023, 6:46am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710 "2023-05-23T06:46:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jawaputih](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jawaputih](https://discourse.haproxy.org/u/jawaputih)\
**Post date:** [May 23, 2023, 6:46am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710/1 "2023-05-23T06:46:52Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jawaputih](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jawaputih](https://discourse.haproxy.org/u/jawaputih)\
**Post date:** [May 23, 2023, 7:22am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710/2 "2023-05-23T07:22:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MaEh86](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@MaEh86](https://discourse.haproxy.org/u/MaEh86)\
**Post date:** [May 23, 2023, 9:29am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710/3 "2023-05-23T09:29:40Z")

</div>

Don’t wanted to steal the right answer, so just a link to my source: [Are HTTP headers case-sensitive? - Stack Overflow](https://stackoverflow.com/a/41169947)

 ![23-05-2023_11-29-13](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/2X/f/f8e690b1cd9dfa053c825d4f1ff3ff0f42e7bfdd.png)

best regards,  
Markus

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 23, 2023, 9:31am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710/4 "2023-05-23T09:31:41Z")

</div>

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](https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#3.1-h1-case-adjust) and [option h1-case-adjust-bogus-client](https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#4.2-option%20h1-case-adjust-bogus-client).

---

<div class="post-metadata">

**Author:** ![jawaputih](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jawaputih](https://discourse.haproxy.org/u/jawaputih)\
**Post date:** [May 23, 2023, 10:46am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710/5 "2023-05-23T10:46:56Z")

</div>

Thanks for your response, this is very useful. I will try this out soon and confirm if it works.

---

<div class="post-metadata">

**Author:** ![jawaputih](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jawaputih](https://discourse.haproxy.org/u/jawaputih)\
**Post date:** [May 24, 2023, 1:47am UTC](https://discourse.haproxy.org/t/change-from-set-cookie-to-set-cookie/8710/6 "2023-05-24T01:47:11Z")

</div>

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
