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

Unified Diff: net/test/spawned_test_server/base_test_server.cc

Issue 1066613002: Revert of Don't process HSTS/HPKP headers when host is an IP address (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/base_test_server.cc
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 80ff135c0928d1a81ca87f7f44ec95872742adaa..b5306899c2ac08ba99a5156866d68f9f388da659 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -29,17 +29,11 @@
std::string GetHostname(BaseTestServer::Type type,
const BaseTestServer::SSLOptions& options) {
- if (BaseTestServer::UsingSSL(type)) {
- if (options.server_certificate ==
- BaseTestServer::SSLOptions::CERT_MISMATCHED_NAME ||
- options.server_certificate ==
- BaseTestServer::SSLOptions::CERT_OK_FOR_LOCALHOST) {
- // For |CERT_MISMATCHED_NAME|, return a different hostname string
- // that resolves to the same hostname. For
- // |CERT_OK_FOR_LOCALHOST|, the certificate is issued for
- // "localhost" instead of "127.0.0.1".
- return "localhost";
- }
+ if (BaseTestServer::UsingSSL(type) &&
+ options.server_certificate ==
+ BaseTestServer::SSLOptions::CERT_MISMATCHED_NAME) {
+ // Return a different hostname string that resolves to the same hostname.
+ return "localhost";
}
// Use the 127.0.0.1 as default.
@@ -139,8 +133,6 @@
case CERT_OK:
case CERT_MISMATCHED_NAME:
return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem"));
- case CERT_OK_FOR_LOCALHOST:
- return base::FilePath(FILE_PATH_LITERAL("localhost_cert.pem"));
case CERT_EXPIRED:
return base::FilePath(FILE_PATH_LITERAL("expired_cert.pem"));
case CERT_CHAIN_WRONG_ROOT:
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698