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

Unified Diff: net/http/http_cache.cc

Issue 155972: Strip embedded "#" in URLs when constructing HTTP cache key.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix a typo from past change Created 11 years, 5 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
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
===================================================================
--- net/http/http_cache.cc (revision 21162)
+++ net/http/http_cache.cc (working copy)
@@ -1470,9 +1470,8 @@
// Generate a key that can be used inside the cache.
std::string HttpCache::GenerateCacheKey(const HttpRequestInfo* request) {
- std::string url = request->url.spec();
- if (request->url.has_ref())
- url.erase(url.find_last_of('#'));
+ // Strip out the reference, username, and password sections of the URL.
+ std::string url = HttpUtil::SpecForRequest(request->url);
DCHECK(mode_ != DISABLE);
if (mode_ == NORMAL) {
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698