-
Notifications
You must be signed in to change notification settings - Fork 35
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
HttpRequest::getBody() is empty for IE XMLHttpRequest #124
Comments
@tius2000 : |
Great! Thank you for the super-fast feedback @hreintke :-) |
@tius2000 try my ported fix by @patrickjahns |
@avr39-ripe: |
here is patch. download it into SmingRTOS dir, then patch < patch_nam.patch and viola :) |
Thank you very much @avr39-ripe! However, there is a small side effect. The return value of getBody has changed from const char * to String. This means that an additional copy of the data needs to be allocated for parsing the posted data with JsonBuffer::parseObject(). While this no problem for my application, it might be inefficient for larger strings. |
IE seems to sends XMLHttpRequest as two TCP packets (see https://josephscott.org/archives/2009/08/xmlhttprequest-xhr-uses-multiple-packets-for-http-post). I could verify this for a simple request with IE11 on a win7 box using wireshark.
However, this seems to confuse Sming, it will report an empty request body. The webserver seems to handle fragmented packets not correctly.
A possible workaround might be to use GET instead of POST.
The text was updated successfully, but these errors were encountered: