The XMLHttpRequest Level 2 specification requires the responseText attribute to be a "text response entity body". Accoding to the relevant section in the spec, this means that it must always be a string, regardless of the response's content type.
The commit of this pull request adjusts zombie.js to match this behavior. Previously, responseText would be a Buffer in such cases.
Make sure XMLHttpRequest.responseText is always a string
Why not just response.body.toString()?
I originally did it this way because response.body might be undefined, in which case a direct toString() call would fail (this happens in the "response headers" test). But looking at the spec again, this case needs to be handled slightly differently because responseText should be the empty string in this case. I'll push a revised version.
Simplify responseText fix and handle empty response bodies correctly
Is the patch OK in it's current form?
For the record, when you update a PR, Github doesn't send out any notification, so always follow with a comment indicating you made a change.
Thanks for pointing this out, I forget it all the time.