| Index: net/http/http_network_transaction.cc
|
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
|
| index 0a2c8c4c9fdcbba0913d185276ccf75d6565f7e4..cd26e4acae9ff1d2ac131cabf81dec05a48b4dd2 100644
|
| --- a/net/http/http_network_transaction.cc
|
| +++ b/net/http/http_network_transaction.cc
|
| @@ -61,6 +61,7 @@
|
| #include "net/ssl/ssl_cert_request_info.h"
|
| #include "net/ssl/ssl_connection_status_flags.h"
|
| #include "url/gurl.h"
|
| +#include "url/url_canon.h"
|
|
|
| #if defined(SPDY_PROXY_AUTH_ORIGIN)
|
| #include <algorithm>
|
| @@ -1542,6 +1543,17 @@ GURL HttpNetworkTransaction::AuthURL(HttpAuth::Target target) const {
|
| proxy_info_.proxy_server().host_port_pair().ToString());
|
| }
|
| case HttpAuth::AUTH_SERVER:
|
| + if (ForWebSocketHandshake()) {
|
| + const GURL& url = request_->url;
|
| + url::Replacements<char> ws_to_http;
|
| + if (url.SchemeIs("ws")) {
|
| + ws_to_http.SetScheme("http", url::Component(0, 4));
|
| + } else {
|
| + DCHECK(url.SchemeIs("wss"));
|
| + ws_to_http.SetScheme("https", url::Component(0, 5));
|
| + }
|
| + return url.ReplaceComponents(ws_to_http);
|
| + }
|
| return request_->url;
|
| default:
|
| return GURL();
|
|
|