Changeset 7290 for trunk/src/wininet/http.c
- Timestamp:
- Nov 7, 2001, 11:56:15 AM (24 years ago)
- File:
-
- 1 edited
-
trunk/src/wininet/http.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wininet/http.c
r6712 r7290 15 15 #include "debugtools.h" 16 16 #include "winerror.h" 17 #include <shlwapi.h> 17 18 #include "winsock.h" 18 19 … … 223 224 lpwhr->nSocketFD = INVALID_SOCKET; 224 225 225 if (NULL != lpszObjectName && strlen(lpszObjectName)) 226 lpwhr->lpszPath = strdup(lpszObjectName); 226 if (NULL != lpszObjectName && strlen(lpszObjectName)) { 227 DWORD needed = 0; 228 UrlEscapeA(lpszObjectName, NULL, &needed, URL_ESCAPE_SPACES_ONLY); 229 lpwhr->lpszPath = HeapAlloc(GetProcessHeap(), 0, needed); 230 UrlEscapeA(lpszObjectName, lpwhr->lpszPath, &needed, 231 URL_ESCAPE_SPACES_ONLY); 232 } 227 233 228 234 if (NULL != lpszReferrer && strlen(lpszReferrer)) … … 601 607 if (NULL == lpwhr->lpszPath) 602 608 lpwhr->lpszPath = strdup("/"); 609 610 if(lpwhr->lpszPath[0] != '/') /* not an absolute path ?? --> fix it !! */ 611 { 612 char *fixurl = HeapAlloc(GetProcessHeap(), 0, strlen(lpwhr->lpszPath) + 2); 613 *fixurl = '/'; 614 strcpy(fixurl + 1, lpwhr->lpszPath); 615 HeapFree( GetProcessHeap(), 0, lpwhr->lpszPath ); 616 lpwhr->lpszPath = fixurl; 617 } 603 618 604 619 /* Calculate length of request string */
Note:
See TracChangeset
for help on using the changeset viewer.
