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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2061843002: CHECK that Resource request/response urls are equalIgnoringFragmentIdentifer, not equal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a bit more detail in the comment Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } 891 }
892 892
893 String Resource::getMemoryDumpName() const 893 String Resource::getMemoryDumpName() const
894 { 894 {
895 return String::format("web_cache/%s_resources/%ld", resourceTypeToString(get Type(), options().initiatorInfo), m_identifier); 895 return String::format("web_cache/%s_resources/%ld", resourceTypeToString(get Type(), options().initiatorInfo), m_identifier);
896 } 896 }
897 897
898 void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse) 898 void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse)
899 { 899 {
900 SECURITY_CHECK(m_redirectChain.isEmpty()); 900 SECURITY_CHECK(m_redirectChain.isEmpty());
901 SECURITY_CHECK(validatingResponse.url() == m_response.url()); 901 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(), m_r esponse.url()));
902 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming()); 902 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming());
903 903
904 // RFC2616 10.3.5 904 // RFC2616 10.3.5
905 // Update cached headers from the 304 response 905 // Update cached headers from the 304 response
906 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields(); 906 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields();
907 for (const auto& header : newHeaders) { 907 for (const auto& header : newHeaders) {
908 // Entity headers should not be sent by servers when generating a 304 908 // Entity headers should not be sent by servers when generating a 304
909 // response; misconfigured servers send them anyway. We shouldn't allow 909 // response; misconfigured servers send them anyway. We shouldn't allow
910 // such headers to update the original request. We'll base this on the 910 // such headers to update the original request. We'll base this on the
911 // list defined by RFC2616 7.1, with a few additions for extension heade rs 911 // list defined by RFC2616 7.1, with a few additions for extension heade rs
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 case Resource::Media: 1127 case Resource::Media:
1128 return "Media"; 1128 return "Media";
1129 case Resource::Manifest: 1129 case Resource::Manifest:
1130 return "Manifest"; 1130 return "Manifest";
1131 } 1131 }
1132 ASSERT_NOT_REACHED(); 1132 ASSERT_NOT_REACHED();
1133 return "Unknown"; 1133 return "Unknown";
1134 } 1134 }
1135 1135
1136 } // namespace blink 1136 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698