wininet fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This corrects some problems wininet/InternetOpenUrlA was 
giving me when creating HTTP requests on URLs with
;<params>?<query> in them.  It was simply discarding
everything after the first semicolon.

John Lightsey  <john@wazzim.com>
---

? wine/tools/winelauncher
Index: wine/dlls/wininet/internet.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/internet.c,v
retrieving revision 1.35
diff -u -r1.35 internet.c
--- wine/dlls/wininet/internet.c	21 Jun 2002 23:59:49 -0000	1.35
+++ wine/dlls/wininet/internet.c	4 Jul 2002 09:11:08 -0000
@@ -574,7 +574,7 @@
     }
 
     /* Parse <params> */
-    lpszParam = strpbrk(lpszap, ";?");
+    lpszParam = strpbrk(lpszap, ";");
     if (lpszParam != NULL)
     {
         if (!SetUrlComponentValue(&lpUrlComponents->lpszExtraInfo,
@@ -582,7 +582,9 @@
         {
 	    return FALSE;
         }
-        }
+    } else {
+	lpUrlComponents->dwExtraInfoLength=0;
+    }
 
     if (bIsAbsolute) /* Parse <protocol>:[//<net_loc>] */
         {
@@ -1276,7 +1278,13 @@
     client = InternetConnectA(hInternet, hostName, urlComponents.nPort, userName, password, INTERNET_SERVICE_HTTP, dwFlags, dwContext);
     if(client == NULL)
       return NULL;
-    client1 = HttpOpenRequestA(hInternet, NULL, path, NULL, NULL, accept, dwFlags, dwContext);
+    char pathextra[3073];
+    strcpy(pathextra,path);
+    if (urlComponents.dwExtraInfoLength) {
+      strcat(pathextra,";");
+      strcat(pathextra,extra);
+    }
+    client1 = HttpOpenRequestA(client, NULL, pathextra, NULL, NULL, accept, dwFlags, dwContext);
     if(client1 == NULL) {
       InternetCloseHandle(client);
       return NULL;



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux