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

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

Issue 4264: If we read nothing (EOF) after sending a request on a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 | « net/base/ssl_client_socket.cc ('k') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Called to handle a certificate error. Returns OK if the error should be 80 // Called to handle a certificate error. Returns OK if the error should be
81 // ignored. Otherwise, stores the certificate in response_.ssl_info and 81 // ignored. Otherwise, stores the certificate in response_.ssl_info and
82 // returns the same error code. 82 // returns the same error code.
83 int HandleCertificateError(int error); 83 int HandleCertificateError(int error);
84 84
85 // Called to possibly recover from the given error. Sets next_state_ and 85 // Called to possibly recover from the given error. Sets next_state_ and
86 // returns OK if recovering from the error. Otherwise, the same error code 86 // returns OK if recovering from the error. Otherwise, the same error code
87 // is returned. 87 // is returned.
88 int HandleIOError(int error); 88 int HandleIOError(int error);
89 89
90 // Called when we reached EOF or got an error. If we should resend the
91 // request, sets next_state_ and returns true. Otherwise, does nothing and
92 // returns false.
93 bool ShouldResendRequest();
94
90 // Return true if based on the bytes read so far, the start of the 95 // Return true if based on the bytes read so far, the start of the
91 // status line is known. This is used to distingish between HTTP/0.9 96 // status line is known. This is used to distingish between HTTP/0.9
92 // responses (which have no status line). 97 // responses (which have no status line) and HTTP/1.x responses.
93 bool has_found_status_line_start() const { 98 bool has_found_status_line_start() const {
94 return header_buf_http_offset_ != -1; 99 return header_buf_http_offset_ != -1;
95 } 100 }
96 101
97 CompletionCallbackImpl<HttpNetworkTransaction> io_callback_; 102 CompletionCallbackImpl<HttpNetworkTransaction> io_callback_;
98 CompletionCallback* user_callback_; 103 CompletionCallback* user_callback_;
99 104
100 scoped_refptr<HttpNetworkSession> session_; 105 scoped_refptr<HttpNetworkSession> session_;
101 106
102 const HttpRequestInfo* request_; 107 const HttpRequestInfo* request_;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 STATE_READ_BODY_COMPLETE, 179 STATE_READ_BODY_COMPLETE,
175 STATE_NONE 180 STATE_NONE
176 }; 181 };
177 State next_state_; 182 State next_state_;
178 }; 183 };
179 184
180 } // namespace net 185 } // namespace net
181 186
182 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 187 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
183 188
OLDNEW
« no previous file with comments | « net/base/ssl_client_socket.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698