| OLD | NEW |
| 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 #include "net/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 if (request_->method == "PUT") | 922 if (request_->method == "PUT") |
| 923 return ERR_METHOD_NOT_SUPPORTED; | 923 return ERR_METHOD_NOT_SUPPORTED; |
| 924 } | 924 } |
| 925 | 925 |
| 926 // Check for an intermediate 100 Continue response. An origin server is | 926 // Check for an intermediate 100 Continue response. An origin server is |
| 927 // allowed to send this response even if we didn't ask for it, so we just | 927 // allowed to send this response even if we didn't ask for it, so we just |
| 928 // need to skip over it. | 928 // need to skip over it. |
| 929 // We treat any other 1xx in this same way (although in practice getting | 929 // We treat any other 1xx in this same way (although in practice getting |
| 930 // a 1xx that isn't a 100 is rare). | 930 // a 1xx that isn't a 100 is rare). |
| 931 if (response_.headers->response_code() / 100 == 1) { | 931 if (response_.headers->response_code() / 100 == 1) { |
| 932 response_.headers = new HttpResponseHeaders(""); | 932 response_.headers = new HttpResponseHeaders(std::string()); |
| 933 next_state_ = STATE_READ_HEADERS; | 933 next_state_ = STATE_READ_HEADERS; |
| 934 return OK; | 934 return OK; |
| 935 } | 935 } |
| 936 | 936 |
| 937 HostPortPair endpoint = HostPortPair(request_->url.HostNoBrackets(), | 937 HostPortPair endpoint = HostPortPair(request_->url.HostNoBrackets(), |
| 938 request_->url.EffectiveIntPort()); | 938 request_->url.EffectiveIntPort()); |
| 939 ProcessAlternateProtocol(session_->http_stream_factory(), | 939 ProcessAlternateProtocol(session_->http_stream_factory(), |
| 940 session_->http_server_properties(), | 940 session_->http_server_properties(), |
| 941 *response_.headers, | 941 *response_.headers, |
| 942 endpoint); | 942 endpoint); |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1461 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1462 state); | 1462 state); |
| 1463 break; | 1463 break; |
| 1464 } | 1464 } |
| 1465 return description; | 1465 return description; |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 #undef STATE_CASE | 1468 #undef STATE_CASE |
| 1469 | 1469 |
| 1470 } // namespace net | 1470 } // namespace net |
| OLD | NEW |