Skip to content

In AJAX response Content-Type: Detected Wrongly #2584

@indvinoth

Description

@indvinoth

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.sheet
When jQuery reads the response it detects the content type as xml since in the content type contains the word 'xml' in openxmlformats. So jquery tries to parse the binary file as xml and triggers error

The content type is wrongly detected in the following function
function ajaxHandleResponses( s, jqXHR, responses )

jQuery Version used: 1.11.3

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions