Opened 10 years ago
Closed 10 years ago
#14068 closed bug (invalid)
Non-text xhr responses causing error in xhr.responseText access
Reported by: | ct | Owned by: | ct |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi.
jQuery (2.0.2 and 1.10.1) accesses xhr.responseText via typeof. This causes errors if there is an unorthodox response type (e.g. ArrayBuffer).
For me, this happens in Google Chrome 27.0.1453.110 on Linux.
Here's an example from 2.0.2:
// Support: IE9 // #11426: When requesting binary data, IE9 will throw an exception // on any attempt to access responseText typeof xhr.responseText === "string" ? { <<<< Fails here in Chrome text: xhr.responseText <<< I guess in IE9, it failed here. } : undefined
Change History (2)
comment:1 Changed 10 years ago by
Owner: | set to ct |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
I'm not sure what kind of error to which you're referring. Have you considered a custom converter for your use case? http://api.jquery.com/jQuery.ajax/#extending-ajax