Index: net/tools/quic/quic_in_memory_cache.cc |
diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc |
index 0de0bc0d48f0dae88c0814c474f8c89cf990ead4..5c02ca64dfb624d29da6f877c8c1e008c82adb6c 100644 |
--- a/net/tools/quic/quic_in_memory_cache.cc |
+++ b/net/tools/quic/quic_in_memory_cache.cc |
@@ -86,7 +86,16 @@ QuicInMemoryCache* QuicInMemoryCache::GetInstance() { |
const QuicInMemoryCache::Response* QuicInMemoryCache::GetResponse( |
const BalsaHeaders& request_headers) const { |
- ResponseMap::const_iterator it = responses_.find(GetKey(request_headers)); |
+ string key = GetKey(request_headers); |
+ StringPiece url(key); |
+ // Removing the leading https:// or http://. |
+ if (StringPieceUtils::StartsWithIgnoreCase(url, "https://")) { |
+ url.remove_prefix(8); |
+ } else if (StringPieceUtils::StartsWithIgnoreCase(url, "http://")) { |
+ url.remove_prefix(7); |
+ } |
+ |
+ ResponseMap::const_iterator it = responses_.find(url.as_string()); |
if (it == responses_.end()) { |
return NULL; |
} |