Index: net/http/http_network_transaction.cc |
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc |
index dd538e27b7e6ba85016deb4b5d98f1280b863a19..810b6b168dd7526f0f899a621ea2752ae8aad445 100644 |
--- a/net/http/http_network_transaction.cc |
+++ b/net/http/http_network_transaction.cc |
@@ -862,6 +862,22 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { |
} |
DCHECK(response_.headers); |
+ // Server-induced fallback is supported only if this is a PAC configured |
eroman
2012/09/26 22:01:58
Can you additionally link to the document you wrot
Michael Piatek
2012/09/27 00:30:24
Added a link to the bug, which has additional cont
|
+ // proxy. |
+ if (response_.was_fetched_via_proxy && proxy_info_.did_use_pac_script()) { |
+ if (response_.headers != NULL && |
+ response_.headers->HasHeaderValue("connection", "proxy-bypass")) { |
+ ProxyService* proxy_service = session_->proxy_service(); |
+ // TODO(piatek): const_cast, or non-const accessor? |
eroman
2012/09/26 01:36:20
Internalize the mutation of the proxy retry map in
Michael Piatek
2012/09/26 20:13:53
Done. (Although, I think proxy_info_'s list needs
eroman
2012/09/26 22:01:58
The reason I don't want proxy_info_ to be modified
Michael Piatek
2012/09/27 00:30:24
Done. (You're right -- I'm not sure what I was doi
|
+ ProxyRetryInfoMap& map = |
+ const_cast<ProxyRetryInfoMap&>(proxy_service->proxy_retry_info()); |
+ if (proxy_info_.proxy_list().Fallback(&map, net_log_)) { |
+ ResetConnectionAndRequestForResend(); |
eroman
2012/09/26 01:36:20
I thought your strategy was going to be to have th
Michael Piatek
2012/09/26 20:13:53
If there's no DIRECT option, Fallback() returns fa
eroman
2012/09/26 22:01:58
Ah good point, that resend loop won't be possible
Michael Piatek
2012/09/27 00:30:24
will do
|
+ return OK; |
+ } |
+ } |
+ } |
+ |
// Like Net.HttpResponseCode, but only for MAIN_FRAME loads. |
if (request_->load_flags & LOAD_MAIN_FRAME) { |
const int response_code = response_.headers->response_code(); |