fixes bug 111072 "nsIOService::ExtractUrlPart does not return correct HOST
(flag=IOService.url_Host)" r=cmanske,andreas.otte, sr=mscott git-svn-id: svn://10.0.0.236/trunk@108766 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
6da005ee84
commit
605cc59292
@ -540,6 +540,9 @@ nsIOService::ExtractUrlPart(const char *urlString, PRInt16 flag, PRUint32 *start
|
||||
nsresult rv;
|
||||
nsXPIDLCString scheme;
|
||||
|
||||
if (urlPart)
|
||||
*urlPart = nsnull;
|
||||
|
||||
ExtractScheme(urlString, startPos, endPos, getter_Copies(scheme));
|
||||
|
||||
if (flag == url_Scheme) {
|
||||
@ -569,6 +572,9 @@ nsIOService::ExtractUrlPart(const char *urlString, PRInt16 flag, PRUint32 *start
|
||||
PRInt32 usernameLen, passwordLen, hostnameLen;
|
||||
PRInt32 port;
|
||||
|
||||
if (authLen < 0)
|
||||
return NS_OK;
|
||||
|
||||
rv = parser->ParseAuthority(urlString + authPos, authLen,
|
||||
&usernamePos, &usernameLen,
|
||||
&passwordPos, &passwordLen,
|
||||
@ -617,6 +623,9 @@ nsIOService::ExtractUrlPart(const char *urlString, PRInt16 flag, PRUint32 *start
|
||||
PRUint32 filepathPos, paramPos, queryPos, refPos;
|
||||
PRInt32 filepathLen, paramLen, queryLen, refLen;
|
||||
|
||||
if (pathLen < 0)
|
||||
return NS_OK;
|
||||
|
||||
rv = parser->ParsePath(urlString + pathPos, pathLen,
|
||||
&filepathPos, &filepathLen,
|
||||
¶mPos, ¶mLen,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user