Trace - Filter Post Requests using HTTP Header - Content-Type - application/json

Not applicable

Couple of months ago, whenever I needed to look at only the post requests during a trace session, I would set an HTTP Header Filter with Name "Content-Type" and value "application/json".

This seems have stopped working now, and it returns no results even though I made sure to make some requests that match the filter condition.

4268-screen-shot-2017-01-31-at-73909-am.png

I think it has something to do with the forward slash in the value. So I tried supplying it URL encoded as 'application%2Fjson' without luck.

I am sure it used to work. So some recent change must have broke it.

Any suggestions or alternatives to filter post requests will be much appreciated.

Solved Solved
2 4 1,397
1 ACCEPTED SOLUTION

Not applicable

@nmathew ,

Apologies for the very belated answer.

You are right, this is a bug and we have a fix pending for it. I will let you know when the fix has been deployed to the cloud.

View solution in original post

4 REPLIES 4

Not applicable

Just found that the "Value" field is getting URL-encoded before 'string' compared to the actual http header. Because of this application/json becomes "application%2Fjson" and this string is being compared to the actual HTTP Header value without URL-encoding it.

I confirmed this by setting "Content-Type" as "application%2Fjson" in a request from postman.

The filter as shown in the image did capture that request.

I am sure this bug was introduced recently because earlier I was able to use this filter without issues. Where to file a bug ?

Not applicable

@nmathew ,

Apologies for the very belated answer.

You are right, this is a bug and we have a fix pending for it. I will let you know when the fix has been deployed to the cloud.

Awesome. Looking forward to it. Thanks a million !

Not applicable
@nmathew

This should be fixed in the cloud now. You should be able to just enter "application/json" in the UI, and encoding will work properly. Let us know if there are any issues.