Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2509)

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1839473002: Centralize the setting of Accept headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f4a1764606c21c284b86b1f78f1e0c49e95a2688..e24d104958ac5e423bed4d270eb2d801d205759b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -302,11 +302,6 @@ namespace content {
namespace {
-const char kDefaultAcceptHeader[] =
- "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/"
- "*;q=0.8";
-const char kAcceptHeader[] = "Accept";
-
const size_t kExtraCharsBeforeAndAfterSelection = 100;
typedef std::map<int, RenderFrameImpl*> RoutingIDFrameMap;
@@ -3758,15 +3753,6 @@ void RenderFrameImpl::willSendRequest(
stream_override = old_extra_data->TakeStreamOverrideOwnership();
}
- // Add the default accept header for frame request if it has not been set
- // already.
- if ((request.getFrameType() == blink::WebURLRequest::FrameTypeTopLevel ||
- request.getFrameType() == blink::WebURLRequest::FrameTypeNested) &&
- request.httpHeaderField(WebString::fromUTF8(kAcceptHeader)).isEmpty()) {
- request.setHTTPHeaderField(WebString::fromUTF8(kAcceptHeader),
- WebString::fromUTF8(kDefaultAcceptHeader));
- }
-
// Add an empty HTTP origin header for non GET methods if none is currently
// present.
request.addHTTPOriginIfNeeded(WebString());
« no previous file with comments | « content/child/web_url_request_util.cc ('k') | third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698