Chromium Code Reviews
DescriptionFix short error responses sniffed as downloads hanging.
When MimeSniffingResourceHandler sniffs an error responses request as a
download, it refuses to download the file and cancels the request with
an error instead. It used to both pass cancellation up through the
ResourceHandler and cancel the URLRequest itself. However, as of
https://codereview.chromium.org/2526983002, it just cancelled the
request, rather than passing the cancellation message up the
ResourceHandler stack.
This mostly works...Except in the case we had to read to the end of
the response before we could sniff the mime type. Completed requests
do nothing when canceled, so the request would hang. Without the
notification up through the ResourceHandler stack, the ResourceLoader
never learns of cancellation.
This CL replaces cancelling the URLRequest directly with cancelling
through the ResourceController (Which is what it should have been
doing, anyways).
BUG=738680
Review-Url: https://codereview.chromium.org/2974493002
Cr-Commit-Position: refs/heads/master@{#484720}
Committed: https://chromium.googlesource.com/chromium/src/+/72fd4f4bc6752250814df9ca73ab9786abc667dd
Patch Set 1 #Patch Set 2 : Add comment #
Total comments: 4
Messages
Total messages: 16 (8 generated)
|
||||||||||||||||||||||||||||