Hello,
I have a Gatling request to an API endpoint, somehow one of the ‘Content-Type’ headers is automatically converted into lower case(using the same header Map for other request and those ones are not converted). And unfortunately, the service is case-sensitive. Does anyone have this issue and is there a way to solve it? thanks in advance. Gatling.version is 3.3.1
The request:
.exec(http("SOME_ENDPOINT")
.post("/v1/abc/${id}/def/gh?ijk=op")
.headers(other_headers)
.header("Content-Type","application/json")
The log:

Indeed. And if it’s an issue, it’s on your side:
• lower case is the standard form since HTTP/2 was introduced. It helps speeding up lookups.
• HTTP header names are case insensitive (this has always been this way, you can check the W3C RFCs). If your server or application handles them in a case sensitive fashion, it’s a bug.
Thanks slandelle,
Yeah, we know the backend service should handle the content-type in lower case and since it takes time for the team to change(well, I guess maybe it’s actually just one line of code…lol), so was wondering if for the time being we can have a way to bypass this from the gatling side.
If not then properly will just wait…
Cheers,
Nothing we can do. The lower case format comes from Netty, the underlying network framework we use.
Thanks for confirming this~
Cheers,