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
In AJAX response Content-Type: Detected Wrongly #2584
Comments
|
I agree that's a pretty sloppy check. At this point I am concerned to think what will happen if we make the check more strict. The best solution for your case is to be explicit about the As for whether we can or will change the intelligent guess algorithm, that's a discussion we need to have. |
|
I added the "Needs review" label to discuss it at the meeting. This sounds like a bug to me, IMO we should fix it for 3.0.0. |
|
/cc @jaubourg |
|
Out the top of my hat, I'd say replacing |
|
aam, what about |
You wouldn't catch stuff like Anyway, we just need to make sure we don't catch xml as part of a word which |
When a AJAX call is made to download an Excel file, the server responds with an Excel file and server sets the content type as below
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheetWhen jQuery reads the response it detects the content type as
xmlsince in the content type contains the word 'xml' inopenxmlformats. So jquery tries to parse the binary file as xml and triggers errorThe content type is wrongly detected in the following function
function ajaxHandleResponses( s, jqXHR, responses )jQuery Version used: 1.11.3
The text was updated successfully, but these errors were encountered: