Changeset 7290 for trunk/src


Ignore:
Timestamp:
Nov 7, 2001, 11:56:15 AM (24 years ago)
Author:
phaller
Message:

.

Location:
trunk/src/wininet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wininet/http.c

    r6712 r7290  
    1515#include "debugtools.h"
    1616#include "winerror.h"
     17#include <shlwapi.h>
    1718#include "winsock.h"
    1819
     
    223224    lpwhr->nSocketFD = INVALID_SOCKET;
    224225
    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    }
    227233
    228234    if (NULL != lpszReferrer && strlen(lpszReferrer))
     
    601607    if (NULL == lpwhr->lpszPath)
    602608        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    }
    603618
    604619    /* Calculate length of request string */
  • trunk/src/wininet/wininet.def

    r5419 r7290  
    1 ; $Id: wininet.def,v 1.3 2001-04-01 10:30:32 sandervl Exp $
     1; $Id: wininet.def,v 1.4 2001-11-07 10:56:15 phaller Exp $
    22
    33;
     
    77DESCRIPTION 'Odin32 System DLL - WinINet'
    88DATA MULTIPLE NONSHARED
     9
     10IMPORTS
     11   _UrlEscapeA@16                    = SHLWAPI.691
    912
    1013EXPORTS
Note: See TracChangeset for help on using the changeset viewer.