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

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

Issue 13609002: fix a problem that android cannot download files with basic authentication (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 } 767 }
768 768
769 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) 769 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY))
770 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( 770 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader(
771 &request_headers_); 771 &request_headers_);
772 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) 772 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER))
773 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( 773 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader(
774 &request_headers_); 774 &request_headers_);
775 775
776 request_headers_.MergeFrom(request_->extra_headers); 776 request_headers_.MergeFrom(request_->extra_headers);
777 response_.did_use_http_auth =
778 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) ||
779 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization);
777 } 780 }
778 781
779 int HttpNetworkTransaction::DoInitRequestBody() { 782 int HttpNetworkTransaction::DoInitRequestBody() {
780 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; 783 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE;
781 int rv = OK; 784 int rv = OK;
782 if (request_->upload_data_stream) 785 if (request_->upload_data_stream)
783 rv = request_->upload_data_stream->Init(io_callback_); 786 rv = request_->upload_data_stream->Init(io_callback_);
784 return rv; 787 return rv;
785 } 788 }
786 789
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1464 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1462 state); 1465 state);
1463 break; 1466 break;
1464 } 1467 }
1465 return description; 1468 return description;
1466 } 1469 }
1467 1470
1468 #undef STATE_CASE 1471 #undef STATE_CASE
1469 1472
1470 } // namespace net 1473 } // namespace net
OLDNEW
« no previous file with comments | « chrome/browser/android/intercept_download_resource_throttle.cc ('k') | net/http/http_response_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698