summaryrefslogtreecommitdiffstats
path: root/net/http/http_vary_data.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/http_vary_data.cc')
-rw-r--r--net/http/http_vary_data.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/http/http_vary_data.cc b/net/http/http_vary_data.cc
index 09aab9d..f5c7514 100644
--- a/net/http/http_vary_data.cc
+++ b/net/http/http_vary_data.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -97,6 +97,10 @@ bool HttpVaryData::MatchesRequest(
std::string HttpVaryData::GetRequestValue(
const HttpRequestInfo& request_info,
const std::string& request_header) {
+ // Some special cases:
+ if (!base::strcasecmp(request_header.c_str(), HttpRequestHeaders::kReferer))
+ return request_info.referrer.spec();
+
// Unfortunately, we do not have access to all of the request headers at this
// point. Most notably, we do not have access to an Authorization header if
// one will be added to the request.