Bug 251456 - XmlHttpRequest incorrectly rewrites method names upon a 307 redirect
Summary: XmlHttpRequest incorrectly rewrites method names upon a 307 redirect
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.4.4
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL: http://www.mnot.net/javascript/xmlhtt...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 15:55 UTC by Julian Reschke
Modified: 2012-07-22 07:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Reschke 2010-09-16 15:55:12 UTC
When following a 307 redirect, XmlHttpRequest incorrectly changes the HTTP method to "GET".
Comment 1 groot 2012-07-21 21:51:16 UTC
How to test:
- Start browser.
- Open link provided under URL in this bug report.
- Should give you one alert at the start of page loading, "if your browser asks you permission to follow a redirect, please allow it".
- OK that alert plus any following ones abour redirects (I think only FF asks about the redirects).

This particular bug report is about the section "Redirects" of the test page, although there are some failures before the 307 redirect that the report refers to. Here are the results for numbers 16-20 which relate to 307 redirects.

Results in Firefox 12:
307 Temporary Redirect, POST: success
307 Temporary Redirect, GET: success
307 Temporary Redirect, HEAD: success
307 Temporary Redirect, PUT: success
307 Temporary Redirect, DELETE: success 

Results in Konqueror from KDE 4.7.2:
307 Temporary Redirect, POST: success
307 Temporary Redirect, GET: success
307 Temporary Redirect, HEAD: success
307 Temporary Redirect, PUT: success
307 Temporary Redirect, DELETE: fail (Test execution problem: expected response header field ('x-method') missing.)

In 4.7.2, loading the page takes a long (looooong) time, as it chokes at 79% (item 8, method FOO) for a minute or more. Given that newer Konquerors implement at least the 307-redirect method preservation that the OP asks for, I think this bug can be closed.

(Of course, a follow-up bug would be that Konqueror doesn't properly ask for permission when dealing with redirects, and some of the other failures on that test page).
Comment 2 groot 2012-07-21 22:09:55 UTC
For completeness: in KDE 4.4.4, the results of tests 16-20 in Redirect are:

307 Temporary Redirect, POST: fail (Redirected using GET, expected POST)
307 Temporary Redirect, GET: success
307 Temporary Redirect, HEAD: fail (Redirected using GET, expected HEAD)
307 Temporary Redirect, PUT: fail (Redirected using GET, expected PUT)
307 Temporary Redirect, DELETE: fail (Redirected using GET, expected DELETE)

In 4.4.4 the failure to ask about redirects was aalso lready there.
Comment 3 Julian Reschke 2012-07-22 07:06:36 UTC
> In 4.7.2, loading the page takes a long (looooong) time, as it chokes at 79% (item 8, method FOO) for a minute or more.

For me it chokes completely (have been waiting for over 5 minutes now). This probably deserves a second bug.