Closed Bug 385035 Opened 17 years ago Closed 14 years ago

XMLHttpRequest does not seem to correctly handle redirects

Categories

(Core :: Networking: HTTP, defect)

1.8 Branch
PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 553888

People

(Reporter: avandenhoven, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Today I stumbled on this test suite http://www.mnot.net/javascript/xmlhttprequest/ and it seems that the XMLHttpRequest object is not correctly handling HTTP1.1 requests, particularly when it comes to handling redirect responses using methods other than GET. There are other apparent errors. 

The site doesn't claim to be a comprehensive test but it seems to me that they are (generally) interpreting the HTTP1.1 spec correctly.

If XMLHTTPRequest is not correct, I wonder if any of the HTTP requests are handled correctly. 

Reproducible: Always

Steps to Reproduce:
Go to the site and follow the instructions.
Component: General → Networking: HTTP
Product: Firefox → Core
QA Contact: general → networking.http
Version: unspecified → 1.8 Branch
This is still the case. Other things that aren't as expected:

* the second request after a redirect doesn't have an X-Requested-With header
* any headers added with the setRequestHeader() method aren't carried over into the second request

This occurs for at least 301, 302 and 303 status codes.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.