-
Notifications
You must be signed in to change notification settings - Fork 570
0-length byte arrays not properly externalized? (Empty HTTP body causes errors with xhr2 polyfill.) #597
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
Comments
This is probably a much more appropriate change. I'll probably turn this into a PR:
|
Regardless of any change to XHRTransport, perhaps the underlying problem is demonstrated in this program:
Output:
Based on the type conversion table, I would have expected all three values to be converted to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to get an XHR polyfill to work for testing in node.js, and discovered that with the xhr2 library, an empty body on a PUT request generates an error. To reproduce:
main.go
:main.inc.js
:Then run these commands:
And observe the following output:
If I make a minor change to the GopherJS's
(*XHRTransport).RoundTrip
implementation, the problem goes away:I don't know if this is an appropriate fix, or if it's just working around/obscuring a larger problem. I also haven't tested that this doesn't break other functionality (it probably does).
The text was updated successfully, but these errors were encountered: