Bug 269694

Summary: Konqueror keeps POST Content-Type over redirect
Product: [Applications] konqueror Reporter: Ernst Bachmann <ebachmann>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.6.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 4.6.4

Description Ernst Bachmann 2011-03-29 13:42:55 UTC
Version:           4.6.0 (using KDE 4.6.1) 
OS:                Linux

Konqueror POSTs a form with Content-Type: multipart/form-data; boundary=...

Webserver answers with a "302 Found" redirect.

Konqueror opens the new Location with GET, but keeps the "Content-Type: multipart/form-data; boundary=." header for the GET-request.

Webserver (in this case: "LiteSpeed") answers with a "500 Internal Server Error"

Reproducible: Always

Steps to Reproduce:
Go to http://www.mikrocontroller.net/forum/test
Post an answer to a thread, or start a new one. (Doesn't require registration)

Actual Results:  
Blank page with error message is shown, but post is saved.

Expected Results:  
New Post is displayed.

Happens with Webkit Viewmode as well.

According to some other forum member, IE 5 under Win98 SE had a similar bug?

Bits of captured network traffic were posted here: http://www.mikrocontroller.net/topic/213684
Comment 1 Dawit Alemayehu 2011-05-07 21:23:42 UTC
Git commit 38eefc85fa7182f89e7dc7905d41e745c275fce4 by Dawit Alemayehu.
Committed on 07/05/2011 at 21:26.
Pushed by adawit into branch 'KDE/4.6'.

Do not send content-type header on the subsequent GET request that occurs as a
result of a POST operation redirection.

Fixes bug for khtml. For kdewebkit, the fix needs to be done upstream and as
such as ticket has been opened there. See http://webkit.org/b/60440.

BUG: 269694
FIXED-IN: 4.6.4

M  +1    -0    kio/kio/job.cpp     

http://commits.kde.org/kdelibs/38eefc85fa7182f89e7dc7905d41e745c275fce4
Comment 2 Dawit Alemayehu 2011-05-07 21:24:25 UTC
Git commit 4121b334d2cc88581050b824f260fe28777ac108 by Dawit Alemayehu.
Committed on 07/05/2011 at 21:26.
Pushed by adawit into branch 'master'.

Do not send content-type header on the subsequent GET request that occurs as a
result of a POST operation redirection.

Fixes bug for khtml. For kdewebkit, the fix needs to be done upstream and as
such as ticket has been opened there. See http://webkit.org/b/60440.

BUG: 269694
FIXED-IN: 4.6.4

(cherry picked from commit 38eefc85fa7182f89e7dc7905d41e745c275fce4)

M  +1    -0    kio/kio/job.cpp     

http://commits.kde.org/kdelibs/4121b334d2cc88581050b824f260fe28777ac108
Comment 3 Dawit Alemayehu 2011-05-08 04:02:33 UTC
Git commit 1ca33c08620d22a5e00e97fda79dd9bb7574e8ed by Dawit Alemayehu.
Committed on 08/05/2011 at 04:11.
Pushed by adawit into branch 'KDE/4.6'.

Workaround QtWebKit's incorrect handling redirection of a POST operation.
See http://webkit.org/b/60440 for the details.

CCBUG: 269694

M  +16   -8    kio/kio/accessmanager.cpp     

http://commits.kde.org/kdelibs/1ca33c08620d22a5e00e97fda79dd9bb7574e8ed
Comment 4 Dawit Alemayehu 2011-05-08 04:06:12 UTC
Git commit 3b1efe635cb5c65994bbb586079d0a902c4d3e26 by Dawit Alemayehu.
Committed on 07/05/2011 at 23:48.
Pushed by adawit into branch 'master'.

Workaround QtWebKit's incorrect handling of redirection during a POST operation.
See http://webkit.org/b/60440 for the details.

Reshuffled the code in AccessManager::createRequest to make things more
efficient by cutting down on the number of unnecessary branch statements.

CCBUG: 269694

M  +30   -16   kio/kio/accessmanager.cpp     

http://commits.kde.org/kdelibs/3b1efe635cb5c65994bbb586079d0a902c4d3e26