Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: net/http/http_network_transaction.cc

Issue 99283006: Retry idempotent methods on Chrome-Proxy: bypass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 4b55a5f78da7e0e074526bea6cd01f303a48d9e5..65486a6c757e319cc8397b2fe6e5bcf38e11c55e 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -987,9 +987,13 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
if (proxy_service->MarkProxyAsBad(proxy_info_, bypass_duration,
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" ||
mef 2013/12/18 16:34:41 Is request_->method guaranteed to be upper case?
bengr 2013/12/18 19:39:47 Yes. From RFC 2616, sec 5.1.1 Method: "The Method
+ request_->method == "OPTIONS" ||
+ request_->method == "HEAD" ||
+ request_->method == "PUT" ||
+ request_->method == "DELETE" ||
+ request_->method == "TRACE") {
ResetConnectionAndRequestForResend();
return OK;
}
« net/http/http_network_layer_unittest.cc ('K') | « net/http/http_network_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698