Don't process signed exchange response with attachment Content-Disposition header
According to RFC 6266, when the disposition type matches "attachment" the
browser should prompt the user to save the response locally.
But when NetworkService is enabled, Chrome doesn't save the signed exchange, but
shows the internal content of the signed exchange even if "attachment" type
Content-Disposition header is set.
When NetworkService is disabled, Chrome downloads the signed exchange as a file
but the loading animation doesn't stop.
This is because:
- In MimeSniffingResourceHandler::MaybeStartInterception(),
InterceptingResourceHandler steals the response.
- So NavigationURLLoaderImpl::URLLoaderRequestController::OnComplete() will
not be called forever after SignedExchangeRequestHandler intercepts the
response.
To fix this problem, this CL adds download_utils::MustDownload() check in
ShouldHandleAsSignedHTTPExchange().
So SignedExchangeRequestHandler::MaybeCreateLoaderForResponse() will not
intercept the response when "attachment" type Content-Disposition header is set.
Bug: 896659
Change-Id: Ic1d4756f5823383d55144b0320a06851ca8ecc3e
Reviewed-on: https://chromium-review.googlesource.com/c/1293065Reviewed-by:
Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by:
Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605639}
Showing
File added
Please register or sign in to comment