summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 21:30:14 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 21:30:14 +0000
commit6457ac4218710a7bb4c8acc5647a704f2fef884d (patch)
tree25011ed139522c7b08b447dc136d39f29c31b637 /net
parentda641c911e80ddaf4d0f4274bdbb6351bda06b04 (diff)
downloadchromium_src-6457ac4218710a7bb4c8acc5647a704f2fef884d.zip
chromium_src-6457ac4218710a7bb4c8acc5647a704f2fef884d.tar.gz
chromium_src-6457ac4218710a7bb4c8acc5647a704f2fef884d.tar.bz2
If we receive an HTTP authentication header with a non-ASCII
realm string, the ASCIIToWide call in PopulateAuthChallenge hits a DCHECK failure. Change the ASCIIToWide call to a base::SysNativeMBToWide call, which produces the correct result when the OS "language for non-Unicode programs" is set to the language of the realm string. R=darin,jungshik BUG=1348130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_transaction_winhttp.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/http/http_transaction_winhttp.cc b/net/http/http_transaction_winhttp.cc
index f310dd7..46da038 100644
--- a/net/http/http_transaction_winhttp.cc
+++ b/net/http/http_transaction_winhttp.cc
@@ -1522,13 +1522,13 @@ void HttpTransactionWinHttp::PopulateAuthChallenge() {
return;
// TODO(darin): Need to support RFC 2047 encoded realm strings. For now, we
- // just match Mozilla and limit our support to ASCII realm strings.
- std::wstring auth_header = ASCIIToWide(header_value);
+ // limit our support to ASCII and "native code page" realm strings.
+ std::wstring auth_header = base::SysNativeMBToWide(header_value);
// auth_header is a string which looks like:
// Digest realm="The Awesome Site", domain="/page.html", ...
std::wstring::const_iterator space = find(auth_header.begin(),
- auth_header.end(), ' ');
+ auth_header.end(), L' ');
auth_info->scheme.assign(auth_header.begin(), space);
auth_info->realm = GetHeaderParamValue(auth_header, L"realm");