Skip to main content

Bug Tracker

Side navigation

#14068 closed bug (invalid)

Opened June 25, 2013 11:23AM UTC

Closed July 11, 2013 08:56AM UTC

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:


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

Attachments (0)
Change History (2)

Changed June 27, 2013 02:18AM UTC by timmywil comment:1

owner: → ct
status: newpending

I'm not sure what kind of error to which you're referring. Have you considered a custom converter for your use case?

Changed July 11, 2013 08:56AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

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!