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

Side by Side Diff: net/http/http_network_transaction.h

Issue 197283012: Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indentation Created 6 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int HandleSSLHandshakeError(int error); 203 int HandleSSLHandshakeError(int error);
204 204
205 // Called to possibly recover from the given error. Sets next_state_ and 205 // Called to possibly recover from the given error. Sets next_state_ and
206 // returns OK if recovering from the error. Otherwise, the same error code 206 // returns OK if recovering from the error. Otherwise, the same error code
207 // is returned. 207 // is returned.
208 int HandleIOError(int error); 208 int HandleIOError(int error);
209 209
210 // Gets the response headers from the HttpStream. 210 // Gets the response headers from the HttpStream.
211 HttpResponseHeaders* GetResponseHeaders() const; 211 HttpResponseHeaders* GetResponseHeaders() const;
212 212
213 // Called when we reached EOF or got an error. Returns true if we should 213 // Called when the socket is unexpectedly closed. Returns true if the request
214 // resend the request. |error| is OK when we reached EOF. 214 // should be resent in case of a socket reuse/close race.
215 bool ShouldResendRequest(int error) const; 215 bool ShouldResendRequest() const;
216 216
217 // Resets the connection and the request headers for resend. Called when 217 // Resets the connection and the request headers for resend. Called when
218 // ShouldResendRequest() is true. 218 // ShouldResendRequest() is true.
219 void ResetConnectionAndRequestForResend(); 219 void ResetConnectionAndRequestForResend();
220 220
221 // Sets up the state machine to restart the transaction with auth. 221 // Sets up the state machine to restart the transaction with auth.
222 void PrepareForAuthRestart(HttpAuth::Target target); 222 void PrepareForAuthRestart(HttpAuth::Target target);
223 223
224 // Called when we don't need to drain the response body or have drained it. 224 // Called when we don't need to drain the response body or have drained it.
225 // Resets |connection_| unless |keep_alive| is true, then calls 225 // Resets |connection_| unless |keep_alive| is true, then calls
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 websocket_handshake_stream_base_create_helper_; 334 websocket_handshake_stream_base_create_helper_;
335 335
336 BeforeNetworkStartCallback before_network_start_callback_; 336 BeforeNetworkStartCallback before_network_start_callback_;
337 337
338 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); 338 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
339 }; 339 };
340 340
341 } // namespace net 341 } // namespace net
342 342
343 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 343 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698