⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 221081 in webkit


Ignore:
Timestamp:
Aug 23, 2017, 10:14:09 AM (9 years ago)
Author:
Chris Dumez
Message:

Regression(r221059): NetworkDataTask::didReceiveResponse() should not use PolicyUse for HTTP/0.9
​https://bugs.webkit.org/show_bug.cgi?id=175872

Reviewed by Daniel Bates.

r221059 was calling the ResponseCompletionHandler with {} which ended up being
PolicyUse. Since this is an error case and do not want to receive the data, it
makes more sense to use PolicyIgnore instead. There should not be a behavior
change on WebKit side though since we are cancelling the load right after
calling the completion handler anyway.

Tests under http/tests/security/http-0.9/ are still passing.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::didReceiveResponse):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r221068 r221081  
     12017-08-23  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r221059): NetworkDataTask::didReceiveResponse() should not use PolicyUse for HTTP/0.9
     4        https://bugs.webkit.org/show_bug.cgi?id=175872
     5
     6        Reviewed by Daniel Bates.
     7
     8        r221059 was calling the ResponseCompletionHandler with {} which ended up being
     9        PolicyUse. Since this is an error case and do not want to receive the data, it
     10        makes more sense to use PolicyIgnore instead. There should not be a behavior
     11        change on WebKit side though since we are cancelling the load right after
     12        calling the completion handler anyway.
     13
     14        Tests under http/tests/security/http-0.9/ are still passing.
     15
     16        * NetworkProcess/NetworkDataTask.cpp:
     17        (WebKit::NetworkDataTask::didReceiveResponse):
     18
    1192017-08-22  Tim Horton  <timothy_horton@apple.com>
    220
  • trunk/Source/WebKit/NetworkProcess/NetworkDataTask.cpp

    r221059 r221081  
    104104        std::optional<uint16_t> port = url.port();
    105105        if (port && !isDefaultPortForProtocol(port.value(), url.protocol())) {
    106             completionHandler({ });
     106            completionHandler(PolicyIgnore);
    107107            cancel();
    108108            m_client->didCompleteWithError({ String(), 0, url, "Cancelled load from '" + url.stringCenterEllipsizedToLength() + "' because it is using HTTP/0.9." });
Note: See TracChangeset for help on using the changeset viewer.