Title: [200100] trunk/Source/WebCore
- Revision
- 200100
- Author
- [email protected]
- Date
- 2016-04-26 11:27:08 -0700 (Tue, 26 Apr 2016)
Log Message
[curl] Requests interrupted when using https via proxy
https://bugs.webkit.org/show_bug.cgi?id=157028
Patch by Fujii Hironori <[email protected]> on 2016-04-26
Reviewed by Alex Christensen.
A proxy responds "200 Connection Established" to a CONNECT
method. This response doesn't have Content-Type, then the
request is canceled due to a unsupported MIME type. This is not
a real response from the recipient server. It should not be
processed normally. Just ignore the response.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback):
Do nothing if httpCode is 0. This is the case of "200 Connection Established".
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (200099 => 200100)
--- trunk/Source/WebCore/ChangeLog 2016-04-26 18:22:40 UTC (rev 200099)
+++ trunk/Source/WebCore/ChangeLog 2016-04-26 18:27:08 UTC (rev 200100)
@@ -1,3 +1,20 @@
+2016-04-26 Fujii Hironori <[email protected]>
+
+ [curl] Requests interrupted when using https via proxy
+ https://bugs.webkit.org/show_bug.cgi?id=157028
+
+ Reviewed by Alex Christensen.
+
+ A proxy responds "200 Connection Established" to a CONNECT
+ method. This response doesn't have Content-Type, then the
+ request is canceled due to a unsupported MIME type. This is not
+ a real response from the recipient server. It should not be
+ processed normally. Just ignore the response.
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::headerCallback):
+ Do nothing if httpCode is 0. This is the case of "200 Connection Established".
+
2016-04-26 Chris Dumez <[email protected]>
Drop Dictionary from CanUseWTFOptionalForParameter()
Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (200099 => 200100)
--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp 2016-04-26 18:22:40 UTC (rev 200099)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp 2016-04-26 18:27:08 UTC (rev 200100)
@@ -482,6 +482,10 @@
long httpCode = 0;
curl_easy_getinfo(h, CURLINFO_RESPONSE_CODE, &httpCode);
+ if (!httpCode) {
+ // Comes here when receiving 200 Connection Established. Just return.
+ return totalSize;
+ }
if (isHttpInfo(httpCode)) {
// Just return when receiving http info, e.g. HTTP/1.1 100 Continue.
// If not, the request might be cancelled, because the MIME type will be empty for this response.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes