Support for SCIM header type

Hi,

Wanted to check if Gatling imposes any restrictions on certain “Content-Type” headers.

The following header which is working on all other tools like Jmeter, ARC, curl is not working in Gatling. The simulation runs but somehow I believe the request that is going is not correct since in the server logs, I get 415 (Unsupported Media Type) error:

.header(“Content-Type”,“application/scim+json”)

Could anyone please help here?

Thanks in advance.

Wanted to check if Gatling imposes any restrictions on certain
"Content-Type" headers.

No

The following header which is working on all other tools like Jmeter, ARC,
curl is not working in Gatling. The simulation runs but somehow I believe
the request that is going is not correct since in the server logs, I get
415 (Unsupported Media Type) error:

    .header("Content-Type","application/scim+json")

Most likely a user issue.
Please share an actionable reproducer.

  1. Turn trace logging on (http://gatling.io/docs/current/general/debugging/ - see Logback) and get the request (headers and body)…2) Compare request with raw request from other tool

There will of course be a difference!

Header order shouldn’t normally matter (https://tools.ietf.org/html/rfc2616#section-4.2 - *"*The order in which header fields with differing field names are received is not significant."), but I did come across an application the other day that was returning a 4XX error if the Content-Type header wasn’t the first one!

Hope this helps
Barry

Got the issue.

Previously, I was using:

`

.header(“Content-Type”, “application/scim+json”)
.body(RawFileBody(“userdata.json”)).asJSON

`

which was causing the Content-Type to be overridden to “application/json”.

After changing it to following, the header was not overridden and it was working fine:

.body(RawFileBody("userdata.json")).asJSON .header("Content-Type", "application/scim+json")

And I can’t share the full actionable reproducer since those are internal APIs.

Not sure if this should happen in the first place or not. But nevertheless, thanks a lot Stéphane and Barry for your quick TAT.

Not sure if this should happen in the first place or not.

That's the expected behavior.

asJSON is just an alias for setting Content-Type to application/json, see

Glad you got it sorted out.