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

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

Issue 4604001: Revert 65245 - Merge 65225 - Crash fix: HTTPS server responds with 407 throug... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/src/
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « no previous file | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 DCHECK(headers); 1176 DCHECK(headers);
1177 1177
1178 int status = headers->response_code(); 1178 int status = headers->response_code();
1179 if (status != 401 && status != 407) 1179 if (status != 401 && status != 407)
1180 return OK; 1180 return OK;
1181 HttpAuth::Target target = status == 407 ? 1181 HttpAuth::Target target = status == 407 ?
1182 HttpAuth::AUTH_PROXY : HttpAuth::AUTH_SERVER; 1182 HttpAuth::AUTH_PROXY : HttpAuth::AUTH_SERVER;
1183 if (target == HttpAuth::AUTH_PROXY && proxy_info_.is_direct()) 1183 if (target == HttpAuth::AUTH_PROXY && proxy_info_.is_direct())
1184 return ERR_UNEXPECTED_PROXY_AUTH; 1184 return ERR_UNEXPECTED_PROXY_AUTH;
1185 1185
1186 // This case can trigger when an HTTPS server responds with a 407 status
1187 // code through a non-authenticating proxy.
1188 if (!auth_controllers_[target].get())
1189 return ERR_UNEXPECTED_PROXY_AUTH;
1190
1191 int rv = auth_controllers_[target]->HandleAuthChallenge( 1186 int rv = auth_controllers_[target]->HandleAuthChallenge(
1192 headers, (request_->load_flags & LOAD_DO_NOT_SEND_AUTH_DATA) != 0, false, 1187 headers, (request_->load_flags & LOAD_DO_NOT_SEND_AUTH_DATA) != 0, false,
1193 net_log_); 1188 net_log_);
1194 if (auth_controllers_[target]->HaveAuthHandler()) 1189 if (auth_controllers_[target]->HaveAuthHandler())
1195 pending_auth_target_ = target; 1190 pending_auth_target_ = target;
1196 1191
1197 scoped_refptr<AuthChallengeInfo> auth_info = 1192 scoped_refptr<AuthChallengeInfo> auth_info =
1198 auth_controllers_[target]->auth_info(); 1193 auth_controllers_[target]->auth_info();
1199 if (auth_info.get()) 1194 if (auth_info.get())
1200 response_.auth_challenge = auth_info; 1195 response_.auth_challenge = auth_info;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 default: 1260 default:
1266 return priority; 1261 return priority;
1267 } 1262 }
1268 } 1263 }
1269 1264
1270 1265
1271 1266
1272 #undef STATE_CASE 1267 #undef STATE_CASE
1273 1268
1274 } // namespace net 1269 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698