Closed Bug 879700 Opened 11 years ago Closed 8 years ago

XHR should allow not following redirects

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: florian, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release) Build ID: 20130512193848 Steps to reproduce: Send XHR to a URL that returns a 301 or 302 redirect. Actual results: Redirects are automatically followed, leaving me with the final fetched response as a result object. Expected results: I would expect a property "resolveRedirects: (true|false)" (default true) on the XMLHttpRequest to configure the particular request to not follow any redirects but just return the first HTTP response.
Severity: normal → enhancement
Component: Untriaged → DOM: Core & HTML
OS: Linux → All
Product: Firefox → Core
Hardware: x86_64 → All
Summary: redirect → XHR should optionally follow redirects
Version: 21 Branch → unspecified
There have been some proposals for this in the working group... Jonas, do you know what the state of those is?
Flags: needinfo?(jonas)
Summary: XHR should optionally follow redirects → XHR should allow not following redirects
Anne is the editor and will have better answers here.
Flags: needinfo?(jonas)
Based on the discussions in comment 3, it was resolved that disallowing redirects was WONTFIX, but that the final responseURL should reflect the redirected URL. Firefox currently passes that test: http://w3c-test.org/XMLHttpRequest/responseurl.html As such this bug should like be WONTFIX.
Thanks Thomas!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.