[webkit-reviews] review granted: [Bug 175872] REGRESSION (r221059): NetworkDataTask::didReceiveResponse() should not use PolicyUse for HTTP/0.9 : [Attachment 318875] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 23 09:39:41 PDT 2017


Daniel Bates <dbates at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 175872: REGRESSION (r221059): NetworkDataTask::didReceiveResponse() should
not use PolicyUse for HTTP/0.9
https://bugs.webkit.org/show_bug.cgi?id=175872

Attachment 318875: Patch

https://bugs.webkit.org/attachment.cgi?id=318875&action=review




--- Comment #7 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 318875
  --> https://bugs.webkit.org/attachment.cgi?id=318875
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318875&action=review

OK.

> Source/WebKit/NetworkProcess/NetworkDataTask.cpp:106
> -	       completionHandler({ });
> +	       completionHandler(PolicyIgnore);

Notice that PolicyIgnore is translated to NSURLSessionResponseCancel. I would
have hoped that NSURLSession and
URLSession:dataTask:didReceiveResponse:completionHandler: would have been coded
such that calling -[NSURLSessionDataTask cancel] (what cancel() does for the
non-Blob case) would be equivalent to invoking the completion handler with
NSURLSessionResponseCancel and hence not necessitate explicitly calling the
completion handler. Is it necessary to also call cancel()? is it good practice?


More information about the webkit-reviews mailing list