Commit 4d2bd364 authored by John R. Sheets's avatar John R. Sheets Committed by Alexandre Julliard

Put the URL parameter list in with the URL path if the ExtraInfo

buffer isn't specified.
parent 9fe0e634
......@@ -646,9 +646,27 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
*/
if (lpszcp != 0 && *lpszcp != '\0' && (!lpszParam || lpszcp < lpszParam))
{
INT len;
/* Only truncate the parameter list if it's already been saved
* in lpUrlComponents->lpszExtraInfo.
*/
if (lpszParam && lpUrlComponents->dwExtraInfoLength)
len = lpszParam - lpszcp;
else
{
/* Leave the parameter list in lpszUrlPath. Strip off any trailing
* newlines if necessary.
*/
LPSTR lpsznewline = strchr (lpszcp, '\n');
if (lpsznewline != NULL)
len = lpsznewline - lpszcp;
else
len = strlen(lpszcp);
}
if (!SetUrlComponentValue(&lpUrlComponents->lpszUrlPath,
&lpUrlComponents->dwUrlPathLength, lpszcp,
lpszParam ? lpszParam - lpszcp : strlen(lpszcp)))
&lpUrlComponents->dwUrlPathLength, lpszcp, len))
return FALSE;
}
else
......@@ -656,7 +674,8 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
lpUrlComponents->dwUrlPathLength = 0;
}
TRACE("%s: host(%s) path(%s)\n", lpszUrl, lpUrlComponents->lpszHostName, lpUrlComponents->lpszUrlPath);
TRACE("%s: host(%s) path(%s) extra(%s)\n", lpszUrl, lpUrlComponents->lpszHostName,
lpUrlComponents->lpszUrlPath, lpUrlComponents->lpszExtraInfo);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment