wininet: Correctly set lpszUrlPath in InternetCrackUrlW for urls without path component.
Signed-off-by: Michael Müller <michael@fds-team.de> Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
060d8c6abb
commit
cacad1df98
|
@ -1917,9 +1917,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
|
|||
}
|
||||
else
|
||||
{
|
||||
if (lpUC->lpszUrlPath && (lpUC->dwUrlPathLength > 0))
|
||||
lpUC->lpszUrlPath[0] = 0;
|
||||
lpUC->dwUrlPathLength = 0;
|
||||
set_url_component(&lpUC->lpszUrlPath, &lpUC->dwUrlPathLength, lpszcp, 0);
|
||||
}
|
||||
|
||||
TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", debugstr_wn(lpszUrl,dwUrlLength),
|
||||
|
|
|
@ -130,6 +130,9 @@ static const crack_url_test_t crack_url_tests[] = {
|
|||
{"HtTp://www.winehq.org/scheme",
|
||||
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 7, -1, 0,
|
||||
"HtTp", "www.winehq.org", "", "", "/scheme", ""},
|
||||
{"http://www.winehq.org",
|
||||
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 0, -1, 0,
|
||||
"http", "www.winehq.org", "", "", "", ""},
|
||||
{"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
|
||||
0, 4, INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0,
|
||||
"file", "", "", "", "C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", ""},
|
||||
|
|
Loading…
Reference in New Issue