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

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

Issue 9307093: Don't use IDENT_SRC_URL for HttpAuth challenges. IE hasn't supported it for years, and at worst ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 HttpAuth::Target target = status == 407 ? 1283 HttpAuth::Target target = status == 407 ?
1284 HttpAuth::AUTH_PROXY : HttpAuth::AUTH_SERVER; 1284 HttpAuth::AUTH_PROXY : HttpAuth::AUTH_SERVER;
1285 if (target == HttpAuth::AUTH_PROXY && proxy_info_.is_direct()) 1285 if (target == HttpAuth::AUTH_PROXY && proxy_info_.is_direct())
1286 return ERR_UNEXPECTED_PROXY_AUTH; 1286 return ERR_UNEXPECTED_PROXY_AUTH;
1287 1287
1288 // This case can trigger when an HTTPS server responds with a 407 status 1288 // This case can trigger when an HTTPS server responds with a 407 status
1289 // code through a non-authenticating proxy. 1289 // code through a non-authenticating proxy.
1290 if (!auth_controllers_[target].get()) 1290 if (!auth_controllers_[target].get())
1291 return ERR_UNEXPECTED_PROXY_AUTH; 1291 return ERR_UNEXPECTED_PROXY_AUTH;
1292 1292
1293 int option_mask = 0;
1294 if (!(request_->load_flags & LOAD_DO_NOT_SEND_AUTH_DATA))
1295 option_mask |= HttpAuthController::CHALLENGE_OPTION_SEND_SERVER_AUTH;
1296 if ((request_->load_flags & LOAD_ENABLE_EMBEDDED_IDENTITY))
1297 option_mask |= HttpAuthController::CHALLENGE_OPTION_USE_EMBEDDED_AUTH;
1298
1293 int rv = auth_controllers_[target]->HandleAuthChallenge( 1299 int rv = auth_controllers_[target]->HandleAuthChallenge(
1294 headers, (request_->load_flags & LOAD_DO_NOT_SEND_AUTH_DATA) != 0, false, 1300 headers, option_mask, net_log_);
1295 net_log_);
1296 if (auth_controllers_[target]->HaveAuthHandler()) 1301 if (auth_controllers_[target]->HaveAuthHandler())
1297 pending_auth_target_ = target; 1302 pending_auth_target_ = target;
1298 1303
1299 scoped_refptr<AuthChallengeInfo> auth_info = 1304 scoped_refptr<AuthChallengeInfo> auth_info =
1300 auth_controllers_[target]->auth_info(); 1305 auth_controllers_[target]->auth_info();
1301 if (auth_info.get()) 1306 if (auth_info.get())
1302 response_.auth_challenge = auth_info; 1307 response_.auth_challenge = auth_info;
1303 1308
1304 return rv; 1309 return rv;
1305 } 1310 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1357 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1353 state); 1358 state);
1354 break; 1359 break;
1355 } 1360 }
1356 return description; 1361 return description;
1357 } 1362 }
1358 1363
1359 #undef STATE_CASE 1364 #undef STATE_CASE
1360 1365
1361 } // namespace net 1366 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698