Changeset 200100 in webkit


Ignore:
Timestamp:
Apr 26, 2016 11:27:08 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[curl] Requests interrupted when using https via proxy
https://bugs.webkit.org/show_bug.cgi?id=157028

Patch by Fujii Hironori <Fujii Hironori> 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".

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r200099 r200100  
     12016-04-26  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [curl] Requests interrupted when using https via proxy
     4        https://bugs.webkit.org/show_bug.cgi?id=157028
     5
     6        Reviewed by Alex Christensen.
     7
     8        A proxy responds "200 Connection Established" to a CONNECT
     9        method.  This response doesn't have Content-Type, then the
     10        request is canceled due to a unsupported MIME type. This is not
     11        a real response from the recipient server. It should not be
     12        processed normally. Just ignore the response.
     13
     14        * platform/network/curl/ResourceHandleManager.cpp:
     15        (WebCore::headerCallback):
     16        Do nothing if httpCode is 0. This is the case of "200 Connection Established".
     17
    1182016-04-26  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp

    r196223 r200100  
    483483        curl_easy_getinfo(h, CURLINFO_RESPONSE_CODE, &httpCode);
    484484
     485        if (!httpCode) {
     486            // Comes here when receiving 200 Connection Established. Just return.
     487            return totalSize;
     488        }
    485489        if (isHttpInfo(httpCode)) {
    486490            // Just return when receiving http info, e.g. HTTP/1.1 100 Continue.
Note: See TracChangeset for help on using the changeset viewer.