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

Side by Side Diff: net/url_request/url_request_http_job.h

Issue 8496016: Report ERR_CONTENT_LENGTH_MISMATCH when the count of bytes received doesn't match Content-Length. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Clear error Created 9 years, 1 month 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
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/url_request/url_request_http_job.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Callback functions for Cookie Monster 166 // Callback functions for Cookie Monster
167 void DoLoadCookies(); 167 void DoLoadCookies();
168 void CheckCookiePolicyAndLoad(const CookieList& cookie_list); 168 void CheckCookiePolicyAndLoad(const CookieList& cookie_list);
169 void OnCookiesLoaded( 169 void OnCookiesLoaded(
170 const std::string& cookie_line, 170 const std::string& cookie_line,
171 const std::vector<CookieStore::CookieInfo>& cookie_infos); 171 const std::vector<CookieStore::CookieInfo>& cookie_infos);
172 void DoStartTransaction(); 172 void DoStartTransaction();
173 void OnCookieSaved(bool cookie_status); 173 void OnCookieSaved(bool cookie_status);
174 void CookieHandled(); 174 void CookieHandled();
175 175
176 // Some servers send the body compressed, but specify the content length as
177 // the uncompressed size. If this is the case, we return true in order
178 // to request to work around this non-adherence to the HTTP standard.
179 // |rv| is the standard return value of a read function indicating the number
180 // of bytes read or, if negative, an error code.
181 bool ShouldFixMismatchedContentLength(int rv) const;
182
183 // Returns the effective response headers, considering that they may be 176 // Returns the effective response headers, considering that they may be
184 // overridden by |override_response_headers_|. 177 // overridden by |override_response_headers_|.
185 HttpResponseHeaders* GetResponseHeaders() const; 178 HttpResponseHeaders* GetResponseHeaders() const;
186 179
187 base::Time request_creation_time_; 180 base::Time request_creation_time_;
188 181
189 // Data used for statistics gathering. This data is only used for histograms 182 // Data used for statistics gathering. This data is only used for histograms
190 // and is not required. It is only gathered if packet_timing_enabled_ == true. 183 // and is not required. It is only gathered if packet_timing_enabled_ == true.
191 // 184 //
192 // TODO(jar): improve the quality of the gathered info by gathering most times 185 // TODO(jar): improve the quality of the gathered info by gathering most times
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, 221 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet,
229 // to inform the NetworkDelegate that it may not call back. 222 // to inform the NetworkDelegate that it may not call back.
230 bool awaiting_callback_; 223 bool awaiting_callback_;
231 224
232 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); 225 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob);
233 }; 226 };
234 227
235 } // namespace net 228 } // namespace net
236 229
237 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 230 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698