OLD | NEW |
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_proxy_client_socket.h" | 5 #include "net/http/http_proxy_client_socket.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
9 #include "net/base/host_port_pair.h" | 9 #include "net/base/host_port_pair.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 &request_line, &request_headers); | 312 &request_line, &request_headers); |
313 if (net_log_.HasListener()) { | 313 if (net_log_.HasListener()) { |
314 net_log_.AddEvent( | 314 net_log_.AddEvent( |
315 NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS, | 315 NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS, |
316 new NetLogHttpRequestParameter( | 316 new NetLogHttpRequestParameter( |
317 request_line, request_headers)); | 317 request_line, request_headers)); |
318 } | 318 } |
319 request_headers_ = request_line + request_headers.ToString(); | 319 request_headers_ = request_line + request_headers.ToString(); |
320 } | 320 } |
321 | 321 |
322 http_stream_.reset(new HttpBasicStream(transport_.get(), net_log_)); | 322 http_stream_.reset(new HttpBasicStream(transport_.get())); |
323 | 323 http_stream_->InitializeStream(&request_, net_log_, NULL); |
324 return http_stream_->SendRequest(&request_, request_headers_, NULL, | 324 return http_stream_->SendRequest(request_headers_, NULL, |
325 &response_, &io_callback_); | 325 &response_, &io_callback_); |
326 } | 326 } |
327 | 327 |
328 int HttpProxyClientSocket::DoSendRequestComplete(int result) { | 328 int HttpProxyClientSocket::DoSendRequestComplete(int result) { |
329 if (result < 0) | 329 if (result < 0) |
330 return result; | 330 return result; |
331 | 331 |
332 next_state_ = STATE_READ_HEADERS; | 332 next_state_ = STATE_READ_HEADERS; |
333 return OK; | 333 return OK; |
334 } | 334 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 int rv = auth_->HandleAuthChallenge(response_.headers, false, true, net_log_); | 412 int rv = auth_->HandleAuthChallenge(response_.headers, false, true, net_log_); |
413 response_.auth_challenge = auth_->auth_info(); | 413 response_.auth_challenge = auth_->auth_info(); |
414 if (rv == OK) | 414 if (rv == OK) |
415 return ERR_PROXY_AUTH_REQUESTED; | 415 return ERR_PROXY_AUTH_REQUESTED; |
416 | 416 |
417 return rv; | 417 return rv; |
418 } | 418 } |
419 | 419 |
420 } // namespace net | 420 } // namespace net |
OLD | NEW |