Index: net/http/http_network_transaction.cc |
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc |
index b4ef356df1531babba69f2198a5e639df910d684..97fc7db7664c419b8a492a871bb2927ca0b99e9a 100644 |
--- a/net/http/http_network_transaction.cc |
+++ b/net/http/http_network_transaction.cc |
@@ -173,6 +173,9 @@ int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info, |
proxy_ssl_config_.rev_checking_enabled = false; |
} |
+ if (request_->load_flags & LOAD_PREFETCH) |
+ response_.unused_since_prefetch = true; |
+ |
// Channel ID is disabled if privacy mode is enabled for this request. |
if (request_->privacy_mode == PRIVACY_MODE_ENABLED) |
server_ssl_config_.channel_id_enabled = false; |
@@ -746,6 +749,9 @@ int HttpNetworkTransaction::DoCreateStreamComplete(int result) { |
// Return OK and let the caller read the proxy's error page |
next_state_ = STATE_NONE; |
return OK; |
+ } else if (result == ERR_HTTP_1_1_REQUIRED || |
+ result == ERR_PROXY_HTTP_1_1_REQUIRED) { |
+ return HandleHttp11Required(result); |
} |
// Handle possible handshake errors that may have occurred if the stream |
@@ -961,6 +967,11 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { |
return result; |
} |
+ if (result == ERR_HTTP_1_1_REQUIRED || |
+ result == ERR_PROXY_HTTP_1_1_REQUIRED) { |
+ return HandleHttp11Required(result); |
+ } |
+ |
// ERR_CONNECTION_CLOSED is treated differently at this point; if partial |
// response headers were received, we do the best we can to make sense of it |
// and send it back up the stack. |
@@ -1195,6 +1206,19 @@ int HttpNetworkTransaction::HandleCertificateRequest(int error) { |
return OK; |
} |
+int HttpNetworkTransaction::HandleHttp11Required(int error) { |
+ DCHECK(error == ERR_HTTP_1_1_REQUIRED || |
+ error == ERR_PROXY_HTTP_1_1_REQUIRED); |
+ |
+ if (error == ERR_HTTP_1_1_REQUIRED) { |
+ HttpServerProperties::ForceHTTP11(&server_ssl_config_); |
+ } else { |
+ HttpServerProperties::ForceHTTP11(&proxy_ssl_config_); |
+ } |
+ ResetConnectionAndRequestForResend(); |
+ return OK; |
+} |
+ |
void HttpNetworkTransaction::HandleClientAuthError(int error) { |
if (server_ssl_config_.send_client_cert && |
(error == ERR_SSL_PROTOCOL_ERROR || IsClientCertificateError(error))) { |