Revert "Force HTTP if HTTPS isn't enabled" This reverts commit 715ad85fe77553e1806b347199ef4acd0bc14305. Change-Id: Ideee07620ebfb53b88b7a029aa2984a12479d9e4
diff --git a/mojo/services/network/url_loader_impl.cc b/mojo/services/network/url_loader_impl.cc index 31f0641..1cd6902 100644 --- a/mojo/services/network/url_loader_impl.cc +++ b/mojo/services/network/url_loader_impl.cc
@@ -142,17 +142,6 @@ redirect = false; } -#ifndef NETWORK_SERVICE_USE_HTTPS - if (proto == "https") { - LOG(WARNING) << "network_service was built without HTTPS; " - "Forcing HTTP instead."; - proto = "http"; - if (port == "443" || port == "https" || port == "") { - port = "80"; - } - } -#endif - if (proto == "https") { #ifdef NETWORK_SERVICE_USE_HTTPS asio::ssl::context ctx(asio::ssl::context::sslv23); @@ -172,6 +161,11 @@ redirect = true; url = c.redirect_location_; } +#else + LOG(INFO) << "https is not built-in. " + "please build with NETWORK_SERVICE_USE_HTTPS"; + error_code = ERR_INVALID_ARGUMENT; + break; #endif } else if (proto == "http") { HTTPClient<tcp::socket> c(this, io_service);