WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29943
307 redirects should pass along http body and Content-Type header
https://bugs.webkit.org/show_bug.cgi?id=29943
Summary
307 redirects should pass along http body and Content-Type header
Maciej Stachowiak
Reported
2009-09-30 17:43:36 PDT
307 redirects should pass along the http body and Content-Type header, in addition to the method. These are dropped by CFNetwork when converting the redirect to a GET.
Attachments
patch v1
(6.25 KB, patch)
2009-09-30 17:55 PDT
,
Maciej Stachowiak
beidson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Maciej Stachowiak
Comment 1
2009-09-30 17:55:57 PDT
Created
attachment 40413
[details]
patch v1
Brady Eidson
Comment 2
2009-09-30 18:00:09 PDT
Comment on
attachment 40413
[details]
patch v1 r=me with style issues to be fixed:
> Index: WebCore/platform/network/mac/ResourceHandleMac.mm > =================================================================== > --- WebCore/platform/network/mac/ResourceHandleMac.mm (revision 48858) > +++ WebCore/platform/network/mac/ResourceHandleMac.mm (working copy) > @@ -596,6 +596,15 @@ void ResourceHandle::receivedCancellatio > if (!equalIgnoringCase(originalMethod, String([newRequest HTTPMethod]))) { > NSMutableURLRequest *mutableRequest = [newRequest mutableCopy]; > [mutableRequest setHTTPMethod:originalMethod]; > + > + FormData* body = m_handle->request().httpBody(); > + if (!equalIgnoringCase(originalMethod, "GET") && body && !body->isEmpty()) > + WebCore::setHTTPBody(mutableRequest, body); > + > + String originalContentType = m_handle->request().httpContentType(); > + if (!originalContentType.isEmpty()) > + [mutableRequest setValue:originalContentType forHTTPHeaderField:@"Content-Type"]; > + > newRequest = [mutableRequest autorelease]; > } > }
There's tabs here (and therefore, maybe elsewhere in the change?) - please replace with spaces. Maybe as a result, the indentation here is off.
Maciej Stachowiak
Comment 3
2009-09-30 21:14:10 PDT
Committed, and I fixed the tabs.
Maciej Stachowiak
Comment 4
2009-09-30 21:16:08 PDT
Committed
r48953
.
http://trac.webkit.org/changeset/48953
Also requires
r48956
for Windows.
http://trac.webkit.org/changeset/48956
Also
r48957
.
http://trac.webkit.org/changeset/48957
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