Commit f9ae1768 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Fix pages with feed mime types not being rendered as plain text with network service.

This matches the old path's mime_sniffing_resource_handler.cc.

Bug: 729849
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I7afd5ac3d595ddcea5b061dd064e4413eab590df
Reviewed-on: https://chromium-review.googlesource.com/1173764Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582916}
parent 5480ba6a
......@@ -701,8 +701,14 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
ShouldSniffContent(url_request_.get(), response_.get())) {
is_more_mime_sniffing_needed_ = true;
}
if (!is_more_mime_sniffing_needed_ && !is_more_corb_sniffing_needed_)
if (!is_more_mime_sniffing_needed_ && !is_more_corb_sniffing_needed_) {
// Treat feed types as text/plain.
if (response_->head.mime_type == "application/rss+xml" ||
response_->head.mime_type == "application/atom+xml") {
response_->head.mime_type.assign("text/plain");
}
SendResponseToClient();
}
// Start reading...
ReadMore();
......
......@@ -7,8 +7,6 @@ crbug.com/829417 external/wpt/html/browsers/offline/appcache/workers/appcache-wo
Bug(none) http/tests/misc/redirect-to-about-blank.html [ Timeout ]
Bug(none) http/tests/security/cors-rfc1918 [ Crash Timeout ]
Bug(none) http/tests/security/mime-type-execute-as-html-01.html [ Failure ]
Bug(none) http/tests/security/mime-type-execute-as-html-04.html [ Failure ]
Bug(none) http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html [ Pass Timeout ]
# Only passes with Network Servce enabled (unfortunately these expectations still
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment