| Index: net/http/http_auth_handler_ntlm.cc
|
| diff --git a/net/http/http_auth_handler_ntlm.cc b/net/http/http_auth_handler_ntlm.cc
|
| index dab239d7790b34f1421d5fe4f881a7f6c0967dfb..ed3eb3a1224b7fe2913925c6e2ab85780ca10cd2 100644
|
| --- a/net/http/http_auth_handler_ntlm.cc
|
| +++ b/net/http/http_auth_handler_ntlm.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "net/base/net_errors.h"
|
| +#include "net/base/net_util.h"
|
|
|
| namespace net {
|
|
|
| @@ -22,7 +23,7 @@ int HttpAuthHandlerNTLM::GenerateAuthToken(
|
| return auth_sspi_.GenerateAuthToken(
|
| &username,
|
| &password,
|
| - origin_,
|
| + CreateSPN(origin_),
|
| request,
|
| proxy,
|
| auth_token);
|
| @@ -109,4 +110,13 @@ bool HttpAuthHandlerNTLM::ParseChallenge(
|
| #endif // defined(NTLM_SSPI)
|
| }
|
|
|
| +// static
|
| +std::wstring HttpAuthHandlerNTLM::CreateSPN(const GURL& origin) {
|
| + // The service principal name of the destination server. See
|
| + // http://msdn.microsoft.com/en-us/library/ms677949%28VS.85%29.aspx
|
| + std::wstring target(L"HTTP/");
|
| + target.append(ASCIIToWide(GetHostAndPort(origin)));
|
| + return target;
|
| +}
|
| +
|
| } // namespace net
|
|
|