Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-Type header in GET requests #4373

Open
BlakeWills opened this issue May 21, 2019 · 2 comments
Open

Content-Type header in GET requests #4373

BlakeWills opened this issue May 21, 2019 · 2 comments
Assignees
Milestone

Comments

@BlakeWills
Copy link

We have recently introduced a WAF that is flagging a lot of signalR requests due to them having the Content-Type header on GET requests.

The majority of issues seem to be coming from the /signalr/negotiate endpoint.

Since these are GET requests that do not have a body, why do they need Content-Type headers?

Expected behavior

GET requests with no body do not have a Content-Type header.

Actual behavior

GET requests with no body have a Content-Type header.

Steps to reproduce

Observe calls to the negotate endpoint via the browser network tab / Fiddler and inspect the request.

I've done some digging into the code and I'm happy to submit a PR that I think will fix this, but I don't know why they are there in the first place. Any insight would be appreciated.

@analogrelay analogrelay added the triage-review This issue needs to be reviewed during triage label Jun 11, 2019
@analogrelay analogrelay removed the triage-review This issue needs to be reviewed during triage label Jun 27, 2019
@analogrelay analogrelay added this to the 2.4.x milestone Jun 27, 2019
@analogrelay
Copy link
Contributor

I don't believe there's a specific reason we have a Content-Type header on our GET /signalr/negotiate request, so a PR would probably be welcome. @davidfowl and @halter73 might have some history here.

@halter73
Copy link
Member

halter73 commented Jun 27, 2019

I assume we're talking about the JS client, right?

I pretty sure this was just an oversight made when fixing #947 back in 2013 so that a user's call to $.ajaxSetup won't change the Content-Type of SignalR POST requests that do need to set the header. It looks like the negotiate request got unnecessarily caught up in this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants