Skip to content
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

Trying to send a Blob with XHR2 sends the request with an empty body on Android 4+ #34

ghinda opened this issue Nov 25, 2012 · 1 comment


Copy link

ghinda commented Nov 25, 2012


XMLHttpRequest 2 and Blob constructing are both supported in ICS and newer. Therefore we should be able to send a raw Blob as an ajax request's body using xmlhttprequest.send(blob).

Unfortunately, trying to send a Blob this way sends the request with an empty body/payload.

The Blob is constructed correctly, the issue is with the actual request.

The work-around is to create an ArrayBuffer, and send it in the same way, using xmlhttprequest.send(arraybuffer).

Here is a test using GitHub's API (used it for CORS support):

Both sending methods (sending the blob and sending the arraybuffer) work on modern desktop browsers, while on Android only the "Send as ArrayBuffer" works. This is because, as said above, the request is sent empty, without an actual body/payload.

More details:


  • Android 4.0.x - 4.1.x

How to reproduce:

  1. Check the example on Android 4.0.x - 4.1.x

Reduced Example:

Bug Tracker ticket(s):


Copy link

Bnaya commented Jun 28, 2014

That bug exists on 4.0.x - 4.1.x, not the entire 4.x line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants