Bug 403480: make it impossible to set nsIURI::port to it's default value, r+sr=biesi, a=schrep
git-svn-id: svn://10.0.0.236/trunk@239954 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1515,6 +1515,9 @@ nsStandardURL::SetPort(PRInt32 port)
|
||||
ShiftFromPath(buf.Length());
|
||||
}
|
||||
else if (port == -1 || port == mDefaultPort) {
|
||||
// Don't allow mPort == mDefaultPort
|
||||
port = -1;
|
||||
|
||||
// need to remove the port number from the URL spec
|
||||
PRUint32 start = mHost.mPos + mHost.mLen;
|
||||
PRUint32 lengthToCut = mPath.mPos - start;
|
||||
|
||||
Reference in New Issue
Block a user