User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20080702 Firefox/22.214.171.124 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20080702 Firefox/188.8.131.52 XMLHttpRequest should have some way to disable the following of redirects (i.e., status codes 301, 302, etc). As far as I know, there are no browsers that currently have this functionality. The W3C working draft (http://www.w3.org/TR/2008/WD-XMLHttpRequest-20080415/) has this to say about the matter: "If the response is an HTTP redirect: If the redirect does not violate security or infinite loop precautions and the scheme is supported transparently follow the redirect..." "This specification does not include the following features which are being considered for a future version of this specification: ... Property to disable following redirects; ..." Related bugs: bug 238144, bug 343028, bug 385035 Reproducible: Always
10 years ago
Component: Networking: HTTP → DOM: Core & HTML
OS: Windows XP → All
QA Contact: networking.http → general
Hardware: PC → All
I'd like to try to analyze and see if I can fix this bug. Anyone here can give me some information on where in the code is this working? The useful information is mostly: - Where the C++ files are for the XMLHttpRequest object. - Where is the code that deals with the 301,302, etc... redirects. Based on those, I should be able to find the path between the two and send a patch for this patch for evaluation. I already know where the Mercurial repo is and I know where the online tools to search the code are.
Please file first a spec (https://xhr.spec.whatwg.org/) bug about adding this kind of feature. https://github.com/whatwg/xhr/issues/new
We can't add this due to https://fetch.spec.whatwg.org/#atomic-http-redirect-handling (unless we event some new kind of CORS protocol for redirects, but nobody seems super interested in that).
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.