Put the URL parameter list in with the URL path if the ExtraInfo
buffer isn't specified.
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 79b556d..d71aefa 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -646,9 +646,27 @@
*/
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 @@
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;
}