[wininet]

- Update wininet to Wine-1.1.33.

svn path=/trunk/; revision=44236
This commit is contained in:
Aleksey Bragin 2009-11-20 14:22:05 +00:00
parent d6c7749eba
commit ad2dffe030
8 changed files with 133 additions and 27 deletions

View file

@ -163,7 +163,6 @@ static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
{
URL_COMPONENTSW UrlComponents;
BOOL rc;
UrlComponents.lpszExtraInfo = NULL;
UrlComponents.lpszPassword = NULL;
@ -178,22 +177,28 @@ static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostName
UrlComponents.dwHostNameLength = hostNameLen;
UrlComponents.dwUrlPathLength = pathLen;
rc = InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
if (!InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents)) return FALSE;
/* discard the webpage off the end of the path */
if (pathLen > 0 && path[pathLen-1] != '/')
if (UrlComponents.dwUrlPathLength)
{
LPWSTR ptr;
ptr = strrchrW(path,'/');
if (ptr)
*(++ptr) = 0;
else
if (path[UrlComponents.dwUrlPathLength - 1] != '/')
{
path[0] = '/';
path[1] = 0;
WCHAR *ptr;
if ((ptr = strrchrW(path, '/'))) *(++ptr) = 0;
else
{
path[0] = '/';
path[1] = 0;
}
}
}
return rc;
else if (pathLen >= 2)
{
path[0] = '/';
path[1] = 0;
}
return TRUE;
}
/* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
@ -569,7 +574,7 @@ BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
return FALSE;
}
hostName[0] = path[0] = 0;
hostName[0] = 0;
ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
if (!ret || !hostName[0]) return FALSE;

View file

@ -1293,6 +1293,7 @@ HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs,
lpwh->hdr.vtbl = &FTPFILEVtbl;
lpwh->hdr.dwFlags = dwFlags;
lpwh->hdr.dwContext = dwContext;
lpwh->hdr.dwInternalFlags = 0;
lpwh->hdr.refs = 1;
lpwh->hdr.lpfnStatusCB = lpwfs->hdr.lpfnStatusCB;
lpwh->nDataSocket = nDataSocket;

View file

@ -3340,8 +3340,16 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
req = &workRequest.u.HttpSendRequestW;
if (lpBuffersIn)
{
/* FIXME: this should use dwHeadersLength or may not be necessary at all */
req->lpszHeader = heap_strdupW(lpBuffersIn->lpcszHeader);
DWORD size;
if (lpBuffersIn->dwHeadersLength == ~0u)
size = (strlenW( lpBuffersIn->lpcszHeader ) + 1) * sizeof(WCHAR);
else
size = lpBuffersIn->dwHeadersLength * sizeof(WCHAR);
req->lpszHeader = HeapAlloc( GetProcessHeap(), 0, size );
memcpy( req->lpszHeader, lpBuffersIn->lpcszHeader, size );
req->dwHeaderLength = lpBuffersIn->dwHeadersLength;
req->lpOptional = lpBuffersIn->lpvBuffer;
req->dwOptionalLength = lpBuffersIn->dwBufferLength;

View file

@ -1133,11 +1133,14 @@ static void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentL
DWORD nASCIILength=WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,NULL,0,NULL,NULL);
if (*lppszComponent == NULL)
{
int nASCIIOffset=WideCharToMultiByte(CP_ACP,0,lpwszStart,lpwszComponent-lpwszStart,NULL,0,NULL,NULL);
if (lpwszComponent)
*lppszComponent = (LPSTR)lpszStart+nASCIIOffset;
{
int offset = WideCharToMultiByte(CP_ACP, 0, lpwszStart, lpwszComponent-lpwszStart, NULL, 0, NULL, NULL);
*lppszComponent = (LPSTR)lpszStart + offset;
}
else
*lppszComponent = NULL;
*dwComponentLen = nASCIILength;
}
else
@ -1184,7 +1187,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
InternetCrackUrlW should not include it */
if (dwUrlLength == -1) nLength--;
lpwszUrl=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR)*nLength);
lpwszUrl = HeapAlloc(GetProcessHeap(), 0, nLength * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP,0,lpszUrl,dwUrlLength,lpwszUrl,nLength);
memset(&UCW,0,sizeof(UCW));

View file

@ -289,14 +289,6 @@ void NETCON_unload(void)
#if defined(SONAME_LIBSSL) && defined(SONAME_LIBCRYPTO)
if (OpenSSL_crypto_handle)
{
if (ssl_locks)
{
int i;
for (i = 0; i < pCRYPTO_num_locks(); i++)
DeleteCriticalSection(&ssl_locks[i]);
HeapFree(GetProcessHeap(), 0, ssl_locks);
}
wine_dlclose(OpenSSL_crypto_handle, NULL, 0);
}
if (OpenSSL_ssl_handle)
@ -305,6 +297,12 @@ void NETCON_unload(void)
pSSL_CTX_free(ctx);
wine_dlclose(OpenSSL_ssl_handle, NULL, 0);
}
if (ssl_locks)
{
int i;
for (i = 0; i < pCRYPTO_num_locks(); i++) DeleteCriticalSection(&ssl_locks[i]);
HeapFree(GetProcessHeap(), 0, ssl_locks);
}
#endif
}

View file

@ -1448,6 +1448,28 @@ static BOOL URLCache_EnumHashTableEntries(LPCURLCACHE_HEADER pHeader, const HASH
return FALSE;
}
/***********************************************************************
* FreeUrlCacheSpaceA (WININET.@)
*
*/
BOOL WINAPI FreeUrlCacheSpaceA(LPCSTR lpszCachePath, DWORD dwSize, DWORD dwFilter)
{
FIXME("stub!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* FreeUrlCacheSpaceW (WININET.@)
*
*/
BOOL WINAPI FreeUrlCacheSpaceW(LPCWSTR lpszCachePath, DWORD dwSize, DWORD dwFilter)
{
FIXME("stub!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* GetUrlCacheEntryInfoExA (WININET.@)
*

View file

@ -50,8 +50,8 @@
@ stdcall FindNextUrlCacheGroup(long ptr ptr)
@ stub ForceNexusLookup
@ stub ForceNexusLookupExW
@ stub FreeUrlCacheSpaceA
@ stub FreeUrlCacheSpaceW
@ stdcall FreeUrlCacheSpaceA(str long long)
@ stdcall FreeUrlCacheSpaceW(wstr long long)
@ stdcall FtpCommandA(long long long str ptr ptr)
@ stdcall FtpCommandW(long long long wstr ptr ptr)
@ stdcall FtpCreateDirectoryA(ptr str)

View file

@ -0,0 +1,69 @@
/*
* Copyright 2009 Aurimas Fišeras <aurimas@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "resource.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Įveskite tinklo slaptažodį"
FONT 8, "MS Shell Dlg"
{
LTEXT "Įveskite savo naudotojo vardą ir slaptažodį:", -1, 40, 6, 150, 15
LTEXT "Įgaliot. serv.", -1, 40, 26, 50, 10
LTEXT "Sritis", -1, 40, 46, 50, 10
LTEXT "Naudotojas", -1, 40, 66, 50, 10
LTEXT "Slaptažodis", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "Į&rašyti šį slaptažodį (nesaugu)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Gerai", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Atsisakyti", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Reikalingas tapatumo nustatymas"
FONT 8, "MS Shell Dlg"
{
LTEXT "Įveskite savo naudotojo vardą ir slaptažodį:", -1, 40, 6, 150, 15
LTEXT "Serveris", -1, 40, 26, 50, 10
LTEXT "Sritis", -1, 40, 46, 50, 10
LTEXT "Naudotojas", -1, 40, 66, 50, 10
LTEXT "Slaptažodis", -1, 40, 86, 50, 10
LTEXT "" IDC_SERVER, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "Į&rašyti šį slaptažodį (nesaugu)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Gerai", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Atsisakyti", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Vietinio tinklo ryšys"
}