Author: fireball Date: Fri Nov 20 15:22:05 2009 New Revision: 44236
URL: http://svn.reactos.org/svn/reactos?rev=44236&view=rev Log: [wininet] - Update wininet to Wine-1.1.33.
Added: trunk/reactos/dll/win32/wininet/wininet_Lt.rc (with props) Modified: trunk/reactos/dll/win32/wininet/cookie.c trunk/reactos/dll/win32/wininet/ftp.c trunk/reactos/dll/win32/wininet/http.c trunk/reactos/dll/win32/wininet/internet.c trunk/reactos/dll/win32/wininet/netconnection.c trunk/reactos/dll/win32/wininet/urlcache.c trunk/reactos/dll/win32/wininet/wininet.spec
Modified: trunk/reactos/dll/win32/wininet/cookie.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/cookie.c?... ============================================================================== --- trunk/reactos/dll/win32/wininet/cookie.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/cookie.c [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -163,7 +163,6 @@ 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 @@ 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] != '/') - { - LPWSTR ptr; - ptr = strrchrW(path,'/'); - if (ptr) - *(++ptr) = 0; - else - { - path[0] = '/'; - path[1] = 0; - } - } - return rc; + if (UrlComponents.dwUrlPathLength) + { + if (path[UrlComponents.dwUrlPathLength - 1] != '/') + { + WCHAR *ptr; + if ((ptr = strrchrW(path, '/'))) *(++ptr) = 0; + else + { + path[0] = '/'; + path[1] = 0; + } + } + } + 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 @@ 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;
Modified: trunk/reactos/dll/win32/wininet/ftp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/ftp.c?rev... ============================================================================== --- trunk/reactos/dll/win32/wininet/ftp.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/ftp.c [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -1293,6 +1293,7 @@ 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;
Modified: trunk/reactos/dll/win32/wininet/http.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?re... ============================================================================== --- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -3340,8 +3340,16 @@ 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;
Modified: trunk/reactos/dll/win32/wininet/internet.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet.... ============================================================================== --- trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -1133,11 +1133,14 @@ 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 @@ 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));
Modified: trunk/reactos/dll/win32/wininet/netconnection.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/netconnec... ============================================================================== --- trunk/reactos/dll/win32/wininet/netconnection.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/netconnection.c [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -289,14 +289,6 @@ #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) @@ -304,6 +296,12 @@ if (ctx) 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 }
Modified: trunk/reactos/dll/win32/wininet/urlcache.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/urlcache.... ============================================================================== --- trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -1449,6 +1449,28 @@ }
/*********************************************************************** + * 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.@) * */
Modified: trunk/reactos/dll/win32/wininet/wininet.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet.s... ============================================================================== --- trunk/reactos/dll/win32/wininet/wininet.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/wininet.spec [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -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)
Added: trunk/reactos/dll/win32/wininet/wininet_Lt.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_L... ============================================================================== --- trunk/reactos/dll/win32/wininet/wininet_Lt.rc (added) +++ trunk/reactos/dll/win32/wininet/wininet_Lt.rc [iso-8859-1] Fri Nov 20 15:22:05 2009 @@ -1,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" +}
Propchange: trunk/reactos/dll/win32/wininet/wininet_Lt.rc ------------------------------------------------------------------------------ svn:eol-style = native