User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 remotefile=new XMLHttpRequest() remotefile.open("POST","script-to-show-POST-vars.php") remotefile.send("var1=one&var2=two") Using LiveHTTPHeaders to compare the headers output of the script above versus that for a normal POST form shows that the POST data seems to have an extra line at the beginning and at the end when XMLHttpRequest("POST",url) is used, lines which are not present when using a POST form. This creates problems when reading the POST data in server-side scripts (e.g. POST data won't get read properly). Reproducible: Always Steps to Reproduce: 1. 2. 3.
14 years ago
Depends on: 246651
This ought to be fixed by the patch to bug 246651. Please test this with tomorrow's builds to verify?
And make sure to test a trunk build, not a branch build...
(In reply to comment #2) > And make sure to test a trunk build, not a branch build... I am getting the same problem as the original bug poster. My build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 I have got this with other builds going back months. This bug makes XMLHttpRequest's POST functionality effectively useless since it causes my web server to return a HTTP 400 'bad request' even if everything else is fine. I have also been comparing a working POST vs. XMLHttpRequest's POST using LiveHTTPHeaders and the only thing that is different is the extra newlines. my steps to reproduce are the same as the original poster's steps and this problem is reproducable always.
(In reply to comment #3) > (In reply to comment #2) > > And make sure to test a trunk build, not a branch build... > > I am getting the same problem as the original bug poster. My build: > > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 Which is a branch build. Please do test a trunk build (rv:1.8a-something), as requested....
Issue appears to be fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050107 Boris: Thank you for clearing up my confusion.
No problem. ;) Based on that and lack of response from Jonathan, marking duplicate. *** This bug has been marked as a duplicate of 246651 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.