From: "Erich E. Hoover" Subject: [PATCH 5/5] wininet: Fix InternetCrackUrl parsing URLs containing a semicolon. Message-Id: Date: Thu, 1 Nov 2012 22:45:31 -0600 With this patch Bug #31993 (Netflix hangs with loading bar at 100%) is resolved, permitting Netflix (Silverlight 4.x only) to successfully load and play movies and TV shows. This patch changes the rules for cracking URLs containing a semicolon, which is not a delimiter that dictates the beginning of "extra" data (see the new test). From d2747ad3cefd11881246636bfa6de30c55cb726d Mon Sep 17 00:00:00 2001 From: Erich Hoover Date: Thu, 1 Nov 2012 22:26:42 -0600 Subject: wininet: Fix InternetCrackUrl parsing URLs containing a semicolon. --- dlls/wininet/internet.c | 4 +--- dlls/wininet/tests/url.c | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 0e83389..1877af9 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -1717,9 +1717,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR lpUC->nPort = INTERNET_INVALID_PORT_NUMBER; /* Parse */ - lpszParam = memchrW(lpszap, ';', dwUrlLength - (lpszap - lpszUrl)); - if(!lpszParam) - lpszParam = memchrW(lpszap, '?', dwUrlLength - (lpszap - lpszUrl)); + lpszParam = memchrW(lpszap, '?', dwUrlLength - (lpszap - lpszUrl)); if(!lpszParam) lpszParam = memchrW(lpszap, '#', dwUrlLength - (lpszap - lpszUrl)); diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c index 8559aae..96c3809 100644 --- a/dlls/wininet/tests/url.c +++ b/dlls/wininet/tests/url.c @@ -124,6 +124,9 @@ static const crack_url_test_t crack_url_tests[] = { {"http://www.winehq.org?test=123", 0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 0, 21, 9, "http", "www.winehq.org", "", "", "", "?test=123"}, + {"http://www.winehq.org/myscript.php;test=123", + 0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 22, -1, 0, + "http", "www.winehq.org", "", "", "/myscript.php;test=123", ""}, {"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", ""}, -- 1.7.9.5