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

Unified Diff: net/http/http_network_transaction.cc

Issue 53111: Treat all 1xx the same as a 100 (continue). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Move Ignores1xx to appear AFTER Ignores100, and add a comment on how it differs Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 12592)
+++ net/http/http_network_transaction.cc (working copy)
@@ -1041,9 +1041,11 @@
// Check for an intermediate 100 Continue response. An origin server is
// allowed to send this response even if we didn't ask for it, so we just
// need to skip over it.
- if (headers->response_code() == 100) {
+ // We treat any other 1xx in this same way (although in practice getting
+ // a 1xx that isn't a 100 is rare).
+ if (headers->response_code() / 100 == 1) {
header_buf_len_ -= header_buf_body_offset_;
- // If we've already received some bytes after the 100 Continue response,
+ // If we've already received some bytes after the 1xx response,
// move them to the beginning of header_buf_.
if (header_buf_len_) {
memmove(header_buf_.get(), header_buf_.get() + header_buf_body_offset_,
@@ -1071,6 +1073,7 @@
// MUST NOT include a message-body. All other responses do include a
// message-body, although it MAY be of zero length.
switch (response_.headers->response_code()) {
+ // Note that 1xx was already handled earlier.
case 204: // No Content
case 205: // Reset Content
case 304: // Not Modified
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698