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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
878 } | 878 } |
879 | 879 |
880 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) | 880 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) |
881 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( | 881 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( |
882 &request_headers_); | 882 &request_headers_); |
883 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) | 883 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) |
884 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( | 884 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( |
885 &request_headers_); | 885 &request_headers_); |
886 | 886 |
887 if (using_proxy && !before_proxy_headers_sent_callback_.is_null()) | 887 if (using_proxy && !before_proxy_headers_sent_callback_.is_null()) |
888 before_proxy_headers_sent_callback_.Run(proxy_info_); | 888 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_); |
mmenke
2014/07/01 18:08:54
Should move this below "request_headers_.MergeFrom
bengr
2014/07/01 18:18:51
Done.
| |
889 | 889 |
890 request_headers_.MergeFrom(request_->extra_headers); | 890 request_headers_.MergeFrom(request_->extra_headers); |
891 response_.did_use_http_auth = | 891 response_.did_use_http_auth = |
892 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || | 892 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || |
893 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); | 893 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); |
894 } | 894 } |
895 | 895 |
896 int HttpNetworkTransaction::DoInitRequestBody() { | 896 int HttpNetworkTransaction::DoInitRequestBody() { |
897 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; | 897 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; |
898 int rv = OK; | 898 int rv = OK; |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1559 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1559 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1560 state); | 1560 state); |
1561 break; | 1561 break; |
1562 } | 1562 } |
1563 return description; | 1563 return description; |
1564 } | 1564 } |
1565 | 1565 |
1566 #undef STATE_CASE | 1566 #undef STATE_CASE |
1567 | 1567 |
1568 } // namespace net | 1568 } // namespace net |
OLD | NEW |