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

1745 - Fixed Cross Domain requests for new Content Type settings #1754

Closed
wants to merge 7 commits into from

Conversation

NTaylorMullen
Copy link
Contributor

Fixes #1745 and addresses the issues caused by #947.

@@ -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";
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@davidfowl
Copy link
Member

Did you test jsonp? Is formurl encoded ok for JSONP?

@NTaylorMullen
Copy link
Contributor Author

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"
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, see now.

@NTaylorMullen
Copy link
Contributor Author

Updated this with a JS functional test to cover #947

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

Successfully merging this pull request may close these issues.

3 participants