mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Fixes bug
This commit is contained in:
parent
f864ebcadb
commit
d3be11ab85
@ -533,17 +533,6 @@ nsLDAPChannel::AsyncOpen(nsIStreamListener* aListener,
|
||||
nsXPIDLCString host;
|
||||
PRInt32 port;
|
||||
|
||||
// save off the args
|
||||
//
|
||||
mResponseContext = aCtxt;
|
||||
mUnproxiedListener = aListener;
|
||||
|
||||
// add ourselves to the appropriate loadgroup
|
||||
//
|
||||
if (mLoadGroup) {
|
||||
mLoadGroup->AddRequest(this, mResponseContext);
|
||||
}
|
||||
|
||||
// slurp out relevant pieces of the URL
|
||||
//
|
||||
rv = mURI->GetHost(getter_Copies(host));
|
||||
@ -557,10 +546,24 @@ nsLDAPChannel::AsyncOpen(nsIStreamListener* aListener,
|
||||
NS_ERROR("nsLDAPChannel::AsyncRead(): mURI->GetPort failed\n");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (port == -1)
|
||||
port = LDAP_PORT;
|
||||
|
||||
rv = NS_CheckPortSafety(port, "ldap");
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
// save off the args
|
||||
//
|
||||
mResponseContext = aCtxt;
|
||||
mUnproxiedListener = aListener;
|
||||
|
||||
// add ourselves to the appropriate loadgroup
|
||||
//
|
||||
if (mLoadGroup) {
|
||||
mLoadGroup->AddRequest(this, mResponseContext);
|
||||
}
|
||||
|
||||
// we don't currently allow for a default host
|
||||
//
|
||||
if (nsCRT::strlen(host) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user