WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23182
[CURL] POST without body becomes GET
https://bugs.webkit.org/show_bug.cgi?id=23182
Summary
[CURL] POST without body becomes GET
Adam Bergkvist
Reported
2009-01-08 08:17:30 PST
When doing a POST using XMLHttpRequest and sending null or an empty string as body, the method is never set to POST in ResourceHandleManager::setupPOST() (WebCore/platform/network/curl/ResourceHandleManager.cpp). This will make the POST method test on
http://www.mnot.net/javascript/xmlhttprequest/
fail since the method sent is GET.
Attachments
Makes sure method is always set to POST in setupPOST().
(2.54 KB, patch)
2009-01-08 08:49 PST
,
Adam Bergkvist
zecke
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adam Bergkvist
Comment 1
2009-01-08 08:49:04 PST
Created
attachment 26523
[details]
Makes sure method is always set to POST in setupPOST().
Holger Freyther
Comment 2
2009-01-08 23:52:23 PST
The only thing that saddens me is this would have been caugh with the http tests in the LayoutTest directory but we do not run them...
Holger Freyther
Comment 3
2009-01-08 23:56:19 PST
Comment on
attachment 26523
[details]
Makes sure method is always set to POST in setupPOST().
> + if (!job->request().httpBody()) > + return;
This does not look correct. An empty PUT will not be finished and the ResourceHandle will be leaked? Could you explain that?
Adam Bergkvist
Comment 4
2009-01-09 02:10:28 PST
(In reply to
comment #3
) I'm not sure I follow.. Instead of creating a Vector that is never assigned in case of job->request().httpBody() being null and checking that it has zero elements before returning, I thought it would be better to just return directly.
Holger Freyther
Comment 5
2009-01-09 11:40:58 PST
Comment on
attachment 26523
[details]
Makes sure method is always set to POST in setupPOST(). You are right.
Holger Freyther
Comment 6
2009-01-09 19:48:36 PST
Landed in
r39774
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug