Index: net/http/http_network_transaction.cc |
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc |
index a6d50699c0f1854036772b67c2a0ea1b1e62ae63..973ab32cfb533ef14b347cb542c0e56e71140c7f 100644 |
--- a/net/http/http_network_transaction.cc |
+++ b/net/http/http_network_transaction.cc |
@@ -975,9 +975,9 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { |
else |
proxy_bypass_event = ProxyService::LONG_BYPASS; |
} else { |
- // Additionally, fallback if a 500 or 502 is returned via the data |
- // reduction proxy. This is conservative, as the 500 or 502 might have |
- // been generated by the origin, and not the proxy. |
+ // Additionally, fallback if a 500, 502 or 503 is returned via the data |
+ // reduction proxy. This is conservative, as the 500, 501 or 502 might |
+ // have been generated by the origin, and not the proxy. |
if (response_.headers->response_code() == HTTP_INTERNAL_SERVER_ERROR || |
response_.headers->response_code() == HTTP_BAD_GATEWAY || |
response_.headers->response_code() == HTTP_SERVICE_UNAVAILABLE) { |
@@ -1008,9 +1008,13 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { |
chrome_proxy_info.bypass_duration, |
proxy_server, |
net_log_)) { |
- // Only retry in the case of GETs. We don't want to resubmit a POST |
- // if the proxy took some action. |
- if (request_->method == "GET") { |
+ // Only retry idempotent methods. |
+ if (request_->method == "GET" || |
+ request_->method == "OPTIONS" || |
mef
2013/12/18 20:36:23
I'd keep 'We don't want to resubmit a POST if the
bengr
2013/12/18 21:05:10
Done.
|
+ request_->method == "HEAD" || |
+ request_->method == "PUT" || |
+ request_->method == "DELETE" || |
+ request_->method == "TRACE") { |
ResetConnectionAndRequestForResend(); |
return OK; |
} |