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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1020 // We treat any other 1xx in this same way (although in practice getting | 1020 // We treat any other 1xx in this same way (although in practice getting |
1021 // a 1xx that isn't a 100 is rare). | 1021 // a 1xx that isn't a 100 is rare). |
1022 // Unless this is a WebSocket request, in which case we pass it on up. | 1022 // Unless this is a WebSocket request, in which case we pass it on up. |
1023 if (response_.headers->response_code() / 100 == 1 && | 1023 if (response_.headers->response_code() / 100 == 1 && |
1024 !ForWebSocketHandshake()) { | 1024 !ForWebSocketHandshake()) { |
1025 response_.headers = new HttpResponseHeaders(std::string()); | 1025 response_.headers = new HttpResponseHeaders(std::string()); |
1026 next_state_ = STATE_READ_HEADERS; | 1026 next_state_ = STATE_READ_HEADERS; |
1027 return OK; | 1027 return OK; |
1028 } | 1028 } |
1029 | 1029 |
1030 HostPortPair endpoint = HostPortPair(request_->url.HostNoBrackets(), | 1030 HostPortPair endpoint = HostPortPair( |
1031 request_->url.EffectiveIntPort()); | 1031 request_->url.HostNoBrackets(), |
1032 static_cast<uint16>(request_->url.EffectiveIntPort())); | |
mmenke
2014/11/18 21:06:39
HostPortPair::FromURL(request.url)
Peter Kasting
2014/11/18 23:38:42
Done.
| |
1032 ProcessAlternateProtocol(session_, | 1033 ProcessAlternateProtocol(session_, |
1033 *response_.headers.get(), | 1034 *response_.headers.get(), |
1034 endpoint); | 1035 endpoint); |
1035 | 1036 |
1036 int rv = HandleAuthChallenge(); | 1037 int rv = HandleAuthChallenge(); |
1037 if (rv != OK) | 1038 if (rv != OK) |
1038 return rv; | 1039 return rv; |
1039 | 1040 |
1040 if (is_https_request()) | 1041 if (is_https_request()) |
1041 stream_->GetSSLInfo(&response_.ssl_info); | 1042 stream_->GetSSLInfo(&response_.ssl_info); |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1509 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1510 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1510 state); | 1511 state); |
1511 break; | 1512 break; |
1512 } | 1513 } |
1513 return description; | 1514 return description; |
1514 } | 1515 } |
1515 | 1516 |
1516 #undef STATE_CASE | 1517 #undef STATE_CASE |
1517 | 1518 |
1518 } // namespace net | 1519 } // namespace net |
OLD | NEW |