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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/ftp/ftp_network_transaction.cc ('k') | net/http/http_network_transaction_unittest.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) 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
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 ProcessAlternateProtocol(session_, *response_.headers.get(),
1031 request_->url.EffectiveIntPort()); 1031 HostPortPair::FromURL(request_->url));
1032 ProcessAlternateProtocol(session_,
1033 *response_.headers.get(),
1034 endpoint);
1035 1032
1036 int rv = HandleAuthChallenge(); 1033 int rv = HandleAuthChallenge();
1037 if (rv != OK) 1034 if (rv != OK)
1038 return rv; 1035 return rv;
1039 1036
1040 if (is_https_request()) 1037 if (is_https_request())
1041 stream_->GetSSLInfo(&response_.ssl_info); 1038 stream_->GetSSLInfo(&response_.ssl_info);
1042 1039
1043 headers_valid_ = true; 1040 headers_valid_ = true;
1044 1041
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1506 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1510 state); 1507 state);
1511 break; 1508 break;
1512 } 1509 }
1513 return description; 1510 return description;
1514 } 1511 }
1515 1512
1516 #undef STATE_CASE 1513 #undef STATE_CASE
1517 1514
1518 } // namespace net 1515 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698