-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
1745 - Fixed Cross Domain requests for new Content Type settings #1754
Conversation
@@ -331,6 +333,8 @@ | |||
connection.log("Using jsonp because this browser doesn't support CORS"); | |||
} | |||
} | |||
|
|||
connection.contentType = "application/x-www-form-urlencoded; charset=UTF-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the content type for all cross domain (jsonp or not) is formurl encoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the general case content type, that's jquery's default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call it defaultContentType.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
Did you test jsonp? Is formurl encoded ok for JSONP? |
ya I did, I ran the cross domain sample for ie8/ie9/ie10/chrome/opera/ff connecting to one of our dev servers |
@@ -120,6 +120,10 @@ | |||
return new signalR.fn.init(url, qs, logging); | |||
}; | |||
|
|||
signalR._ = { | |||
defaultContentType: "application/x-www-form-urlencoded; charset=UTF-8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this have to hang off of the ctor function? Why can't it just be a private variable in the outer closure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in the transport.common
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, see now.
Updated this with a JS functional test to cover #947 |
Fixes #1745 and addresses the issues caused by #947.