WebKit Bugzilla
Attachment 347126 Details for
Bug 188588
: [Curl] Don't send Content-Type header for POST request when body is null.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
PATCH
188588.diff (text/plain), 2.73 KB, created by
Basuke Suzuki
on 2018-08-14 16:30:17 PDT
(
hide
)
Description:
PATCH
Filename:
MIME Type:
Creator:
Basuke Suzuki
Created:
2018-08-14 16:30:17 PDT
Size:
2.73 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ee74960aa01..49779aa01a5 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,12 @@ >+2018-08-14 Basuke Suzuki <Basuke.Suzuki@sony.com> >+ >+ [Curl] Don't send Content-Type header for POST request when body is null. >+ https://bugs.webkit.org/show_bug.cgi?id=188588 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/wincairo/TestExpectations: >+ > 2018-08-14 Antoine Quint <graouts@apple.com> > > [Web Animations] Crash under AnimationTimeline::cancelOrRemoveDeclarativeAnimation() >diff --git a/LayoutTests/platform/wincairo/TestExpectations b/LayoutTests/platform/wincairo/TestExpectations >index 5ecd9090070..bc4ed04360b 100644 >--- a/LayoutTests/platform/wincairo/TestExpectations >+++ b/LayoutTests/platform/wincairo/TestExpectations >@@ -948,7 +948,6 @@ http/tests/xmlhttprequest/cross-origin-cookie-storage.html [ Failure ] > http/tests/xmlhttprequest/cross-origin-no-authorization.html [ Failure ] > http/tests/xmlhttprequest/logout.html [ Failure ] > http/tests/xmlhttprequest/methods-async.html [ Failure ] >-http/tests/xmlhttprequest/methods.html [ Failure ] > http/tests/xmlhttprequest/null-auth.php [ Failure ] > http/tests/xmlhttprequest/range-test.html [ Failure ] > http/tests/xmlhttprequest/re-login-async.html [ Failure ] >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index af596853ede..122f81cf615 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-08-14 Basuke Suzuki <Basuke.Suzuki@sony.com> >+ >+ [Curl] Don't send Content-Type header for POST request when body is null. >+ https://bugs.webkit.org/show_bug.cgi?id=188588 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The Content-Type header was sent by libcurl automatically. Suppress that behavior >+ when body is null. >+ >+ Tests: http/tests/xmlhttprequest/methods.html >+ >+ * platform/network/curl/CurlRequest.cpp: >+ (WebCore::CurlRequest::setupPOST): >+ > 2018-08-14 Ali Juma <ajuma@chromium.org> > > Follow-up: [IntersectionObserver] Implement rootMargin parsing >diff --git a/Source/WebCore/platform/network/curl/CurlRequest.cpp b/Source/WebCore/platform/network/curl/CurlRequest.cpp >index 133cb2830c6..726992aa3d2 100644 >--- a/Source/WebCore/platform/network/curl/CurlRequest.cpp >+++ b/Source/WebCore/platform/network/curl/CurlRequest.cpp >@@ -463,6 +463,10 @@ void CurlRequest::setupPOST(ResourceRequest& request) > m_curlHandle->enableHttpPostRequest(); > > auto elementSize = m_formDataStream.elementSize(); >+ >+ if (!m_request.hasHTTPHeader(HTTPHeaderName::ContentType) && !elementSize) >+ m_curlHandle->removeRequestHeader("Content-Type"_s); >+ > if (!elementSize) > return; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188588
: 347126