summaryrefslogtreecommitdiffstats
path: root/net/http/http_stream_parser.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 19:43:00 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 19:43:00 +0000
commit6a621f50a408501f2ea89b4f33440f5598b13694 (patch)
tree54432431288d859a503dfb39ee79f4aa2ad27ccf /net/http/http_stream_parser.cc
parent52884af44a0cf90730f564145e4e39adac8edcde (diff)
downloadchromium_src-6a621f50a408501f2ea89b4f33440f5598b13694.zip
chromium_src-6a621f50a408501f2ea89b4f33440f5598b13694.tar.gz
chromium_src-6a621f50a408501f2ea89b4f33440f5598b13694.tar.bz2
net: use IsSecureScheme rather than matching "https".
My r202927 matched against a scheme of "https" in order to be consistent with the other users in the same file. But it appears that IsSecureScheme is the better answer throughout the file. BUG=244260 Review URL: https://chromiumcodereview.appspot.com/16776005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205898 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_parser.cc')
-rw-r--r--net/http/http_stream_parser.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 2737eee..fbfc101 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -544,12 +544,12 @@ int HttpStreamParser::DoReadHeadersComplete(int result) {
// rather than empty HTTP/0.9 response.
io_state_ = STATE_DONE;
return ERR_EMPTY_RESPONSE;
- } else if (request_->url.SchemeIs("https")) {
+ } else if (request_->url.SchemeIsSecure()) {
// The connection was closed in the middle of the headers. For HTTPS we
// don't parse partial headers. Return a different error code so that we
// know that we shouldn't attempt to retry the request.
io_state_ = STATE_DONE;
- return ERR_HEADERS_TRUNCATED;
+ return ERR_RESPONSE_HEADERS_TRUNCATED;
}
// Parse things as well as we can and let the caller decide what to do.
int end_offset;
@@ -897,7 +897,7 @@ bool HttpStreamParser::IsConnectionReusable() const {
}
void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) {
- if (request_->url.SchemeIs("https") && connection_->socket()) {
+ if (request_->url.SchemeIsSecure() && connection_->socket()) {
SSLClientSocket* ssl_socket =
static_cast<SSLClientSocket*>(connection_->socket());
ssl_socket->GetSSLInfo(ssl_info);
@@ -906,7 +906,7 @@ void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) {
void HttpStreamParser::GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) {
- if (request_->url.SchemeIs("https") && connection_->socket()) {
+ if (request_->url.SchemeIsSecure() && connection_->socket()) {
SSLClientSocket* ssl_socket =
static_cast<SSLClientSocket*>(connection_->socket());
ssl_socket->GetSSLCertRequestInfo(cert_request_info);