bug 1040930 - part 2 allow proxy connects if uri host is not yet known r=hurley

--HG--
extra : rebase_source : cbccec4785861bec7c25ed980df01c66c7001ac8
This commit is contained in:
Patrick McManus 2014-07-18 15:05:41 -04:00
parent 81558340be
commit 9140d8ea95

View File

@ -999,8 +999,12 @@ nsSocketTransport::ResolveHost()
#endif
// When not resolving mHost locally, we still want to ensure that
// it only contains valid characters. See bug 304904 for details.
if (!net_IsValidHostName(mHost))
// Sometimes the end host is not yet known and mHost is *
if (!net_IsValidHostName(mHost) &&
!mHost.Equals(NS_LITERAL_CSTRING("*"))) {
SOCKET_LOG((" invalid hostname %s\n", mHost.get()));
return NS_ERROR_UNKNOWN_HOST;
}
}
if (mProxyTransparentResolvesHost) {
// Name resolution is done on the server side. Just pretend