Capilization of Header fields

Hi,

I’m finding that Cloudflare is changing some headers which is causing us some pain with one of our Applications.

The header is “File-Size” and need it to be “file-size”. When I check within my network it does return all lower case for the header filed.
However when I test it going through an Cloudflare Tunnel , it returns the “File-Size”.
I’m using postman for testing.

Any ideas?

Thanks.

This may be due to the differences between HTTP/1.1 and HTTP/2.

All header names in HTTP/2 are lower case, and CF will convert if needed.

All headers comparisons in HTTP/1.1 should be case insensitive anyway, so the change in H/2 should not matter terribly much.

5 Likes

Thanks Michael.
Not sure what you mean by “and CF will convert if needed”. I would prefer CF to leave my headers along especially custom headers.
I assume I can override this behavior with page rules and HTTP header modifications?

Cheers.

If a user makes a request over HTTP/2 then all response headers will be sent lowercase, regardless of what your origin said over a HTTP/1.1 Origin response. This is part of the HTTP/2 specification, and that behaviour cannot be modified, unless you disable H2 (which is not possible on a free plan).

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.