mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[WININET] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
13ce1b5f17
commit
bc01cef03a
|
@ -22,7 +22,7 @@ list(APPEND SOURCE
|
|||
netconnection.c
|
||||
urlcache.c
|
||||
utility.c
|
||||
internet.h)
|
||||
precomp.h)
|
||||
|
||||
add_library(wininet SHARED
|
||||
${SOURCE}
|
||||
|
@ -34,5 +34,5 @@ set_module_type(wininet win32dll)
|
|||
target_link_libraries(wininet wine ${PSEH_LIB} zlib)
|
||||
add_delay_importlibs(wininet secur32 crypt32 cryptui)
|
||||
add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 normaliz kernel32_vista msvcrt kernel32 ntdll)
|
||||
add_pch(wininet internet.h SOURCE)
|
||||
add_pch(wininet precomp.h SOURCE)
|
||||
add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -20,12 +20,28 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "ws2tcpip.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
#include "lmcons.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
|
||||
#include <lmcons.h>
|
||||
|
||||
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
|
||||
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
/* FIXME
|
||||
* Cookies could use A LOT OF MEMORY. We need some kind of memory management here!
|
||||
*/
|
||||
|
|
|
@ -18,13 +18,32 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "ws2tcpip.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "wininet.h"
|
||||
#include "winnetwk.h"
|
||||
#include "wine/debug.h"
|
||||
#include "winerror.h"
|
||||
#define NO_SHLWAPI_STREAM
|
||||
#include "shlwapi.h"
|
||||
#include "cryptuiapi.h"
|
||||
|
||||
#include "internet.h"
|
||||
|
||||
#include <winnetwk.h>
|
||||
#include <cryptuiapi.h>
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#define MAX_STRING_LEN 1024
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
struct WININET_ErrorDlgParams
|
||||
{
|
||||
http_request_t *req;
|
||||
|
@ -554,6 +573,15 @@ BOOL WINAPI InternetShowSecurityInfoByURLW(LPCWSTR url, HWND window)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ParseX509EncodedCertificateForListBoxEntry (@)
|
||||
*/
|
||||
DWORD WINAPI ParseX509EncodedCertificateForListBoxEntry(LPBYTE cert, DWORD len, LPSTR szlistbox, LPDWORD listbox)
|
||||
{
|
||||
FIXME("stub: %p %d %s %p\n", cert, len, debugstr_a(szlistbox), listbox);
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ShowX509EncodedCertificate (@)
|
||||
*/
|
||||
|
|
|
@ -27,8 +27,31 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "ws2tcpip.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wininet.h"
|
||||
#include "winnls.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
#define RESPONSE_TIMEOUT 30
|
||||
|
||||
typedef struct _ftp_session_t ftp_session_t;
|
||||
|
|
|
@ -18,7 +18,17 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "internet.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
/***********************************************************************
|
||||
* GopherCreateLocatorA (WININET.@)
|
||||
|
|
|
@ -27,15 +27,42 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "internet.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
# include <zlib.h>
|
||||
#endif
|
||||
|
||||
#include <winternl.h>
|
||||
#include "winsock2.h"
|
||||
#include "ws2ipdef.h"
|
||||
|
||||
#include <wine/exception.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
#include "winerror.h"
|
||||
#include "winternl.h"
|
||||
#define NO_SHLWAPI_STREAM
|
||||
#define NO_SHLWAPI_REG
|
||||
#define NO_SHLWAPI_STRFCNS
|
||||
#define NO_SHLWAPI_GDI
|
||||
#include "shlwapi.h"
|
||||
#include "sspi.h"
|
||||
#include "wincrypt.h"
|
||||
#include "winuser.h"
|
||||
|
||||
#include "internet.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/exception.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
static const WCHAR g_szHttp1_0[] = {'H','T','T','P','/','1','.','0',0};
|
||||
static const WCHAR g_szHttp1_1[] = {'H','T','T','P','/','1','.','1',0};
|
||||
|
@ -742,10 +769,18 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
|||
int HeaderIndex;
|
||||
int numCookies = 0;
|
||||
LPHTTPHEADERW setCookieHeader;
|
||||
WCHAR *path, *tmp;
|
||||
|
||||
if(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)
|
||||
return;
|
||||
|
||||
path = heap_strdupW(request->path);
|
||||
if (!path)
|
||||
return;
|
||||
|
||||
tmp = strrchrW(path, '/');
|
||||
if (tmp && tmp[1]) tmp[1] = 0;
|
||||
|
||||
EnterCriticalSection( &request->headers_section );
|
||||
|
||||
while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1)
|
||||
|
@ -764,10 +799,11 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
|||
|
||||
name = substr(setCookieHeader->lpszValue, data - setCookieHeader->lpszValue);
|
||||
data++;
|
||||
set_cookie(substrz(request->server->name), substrz(request->path), name, substrz(data), INTERNET_COOKIE_HTTPONLY);
|
||||
set_cookie(substrz(request->server->name), substrz(path), name, substrz(data), INTERNET_COOKIE_HTTPONLY);
|
||||
}
|
||||
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
heap_free(path);
|
||||
}
|
||||
|
||||
static void strip_spaces(LPWSTR start)
|
||||
|
@ -2326,11 +2362,6 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer,
|
|||
if (!(req->session->appInfo->proxyPassword = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY;
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
case INTERNET_OPTION_HTTP_DECODING:
|
||||
if(size != sizeof(BOOL))
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
req->decoding = *(BOOL*)buffer;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
return INET_SetOption(hdr, option, buffer, size);
|
||||
|
@ -2900,7 +2931,7 @@ static DWORD set_content_length(http_request_t *request)
|
|||
request->contentLength = ~0u;
|
||||
}
|
||||
|
||||
if(request->decoding) {
|
||||
if(request->hdr.decoding) {
|
||||
int encoding_idx;
|
||||
|
||||
static const WCHAR deflateW[] = {'d','e','f','l','a','t','e',0};
|
||||
|
@ -3286,6 +3317,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
|||
request->hdr.htype = WH_HHTTPREQ;
|
||||
request->hdr.dwFlags = dwFlags;
|
||||
request->hdr.dwContext = dwContext;
|
||||
request->hdr.decoding = session->hdr.decoding;
|
||||
request->contentLength = ~0u;
|
||||
|
||||
request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl;
|
||||
|
@ -5032,7 +5064,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
|
|||
res = set_content_length(request);
|
||||
if(res != ERROR_SUCCESS)
|
||||
goto lend;
|
||||
if(!request->contentLength)
|
||||
if(!request->contentLength && !secure_proxy_connect)
|
||||
http_release_netconn(request, TRUE);
|
||||
|
||||
if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_AUTO_REDIRECT) && responseLen)
|
||||
|
@ -5793,6 +5825,7 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
|
|||
session->hdr.dwFlags = dwFlags;
|
||||
session->hdr.dwContext = dwContext;
|
||||
session->hdr.dwInternalFlags |= dwInternalFlags;
|
||||
session->hdr.decoding = hIC->hdr.decoding;
|
||||
|
||||
WININET_AddRef( &hIC->hdr );
|
||||
session->appInfo = hIC;
|
||||
|
@ -6050,34 +6083,112 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer)
|
|||
|
||||
static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier)
|
||||
{
|
||||
LPHTTPHEADERW lphttpHdr = NULL;
|
||||
LPHTTPHEADERW lphttpHdr;
|
||||
INT index;
|
||||
BOOL request_only = !!(dwModifier & HTTP_ADDHDR_FLAG_REQ);
|
||||
DWORD res = ERROR_HTTP_INVALID_HEADER;
|
||||
DWORD res = ERROR_SUCCESS;
|
||||
|
||||
TRACE("--> %s: %s - 0x%08x\n", debugstr_w(field), debugstr_w(value), dwModifier);
|
||||
|
||||
EnterCriticalSection( &request->headers_section );
|
||||
|
||||
/* REPLACE wins out over ADD */
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE)
|
||||
dwModifier &= ~HTTP_ADDHDR_FLAG_ADD;
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_ADD)
|
||||
index = -1;
|
||||
else
|
||||
index = HTTP_GetCustomHeaderIndex(request, field, 0, request_only);
|
||||
|
||||
index = HTTP_GetCustomHeaderIndex(request, field, 0, request_only);
|
||||
if (index >= 0)
|
||||
{
|
||||
lphttpHdr = &request->custHeaders[index];
|
||||
|
||||
/* replace existing header if FLAG_REPLACE is given */
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE)
|
||||
{
|
||||
HTTP_DeleteCustomHeader( request, index );
|
||||
|
||||
if (value && value[0])
|
||||
{
|
||||
HTTPHEADERW hdr;
|
||||
|
||||
hdr.lpszField = (LPWSTR)field;
|
||||
hdr.lpszValue = (LPWSTR)value;
|
||||
hdr.wFlags = hdr.wCount = 0;
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||
hdr.wFlags |= HDR_ISREQUEST;
|
||||
|
||||
res = HTTP_InsertCustomHeader( request, &hdr );
|
||||
}
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* do not add new header if FLAG_ADD_IF_NEW is set */
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_ADD_IF_NEW)
|
||||
{
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return ERROR_HTTP_INVALID_HEADER;
|
||||
res = ERROR_HTTP_INVALID_HEADER; /* FIXME */
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* handle appending to existing header */
|
||||
if (dwModifier & COALESCEFLAGS)
|
||||
{
|
||||
LPWSTR lpsztmp;
|
||||
WCHAR ch = 0;
|
||||
INT len = 0;
|
||||
INT origlen = strlenW(lphttpHdr->lpszValue);
|
||||
INT valuelen = strlenW(value);
|
||||
|
||||
/* FIXME: Should it really clear HDR_ISREQUEST? */
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||
lphttpHdr->wFlags |= HDR_ISREQUEST;
|
||||
else
|
||||
lphttpHdr->wFlags &= ~HDR_ISREQUEST;
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA)
|
||||
{
|
||||
ch = ',';
|
||||
lphttpHdr->wFlags |= HDR_COMMADELIMITED;
|
||||
}
|
||||
else if (dwModifier & HTTP_ADDHDR_FLAG_COALESCE_WITH_SEMICOLON)
|
||||
{
|
||||
ch = ';';
|
||||
lphttpHdr->wFlags |= HDR_COMMADELIMITED;
|
||||
}
|
||||
|
||||
len = origlen + valuelen + ((ch > 0) ? 2 : 0);
|
||||
|
||||
lpsztmp = heap_realloc(lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR));
|
||||
if (lpsztmp)
|
||||
{
|
||||
lphttpHdr->lpszValue = lpsztmp;
|
||||
/* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */
|
||||
if (ch > 0)
|
||||
{
|
||||
lphttpHdr->lpszValue[origlen] = ch;
|
||||
origlen++;
|
||||
lphttpHdr->lpszValue[origlen] = ' ';
|
||||
origlen++;
|
||||
}
|
||||
|
||||
memcpy(&lphttpHdr->lpszValue[origlen], value, valuelen*sizeof(WCHAR));
|
||||
lphttpHdr->lpszValue[len] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
WARN("heap_realloc (%d bytes) failed\n",len+1);
|
||||
res = ERROR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
goto out;
|
||||
}
|
||||
lphttpHdr = &request->custHeaders[index];
|
||||
}
|
||||
else if (value)
|
||||
|
||||
/* FIXME: What about other combinations? */
|
||||
if ((dwModifier & ~HTTP_ADDHDR_FLAG_REQ) == HTTP_ADDHDR_FLAG_REPLACE)
|
||||
{
|
||||
res = ERROR_HTTP_HEADER_NOT_FOUND;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* FIXME: What if value == ""? */
|
||||
if (value)
|
||||
{
|
||||
HTTPHEADERW hdr;
|
||||
|
||||
|
@ -6088,89 +6199,12 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
|
|||
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||
hdr.wFlags |= HDR_ISREQUEST;
|
||||
|
||||
res = HTTP_InsertCustomHeader(request, &hdr);
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return res;
|
||||
}
|
||||
/* no value to delete */
|
||||
else
|
||||
{
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return ERROR_SUCCESS;
|
||||
res = HTTP_InsertCustomHeader( request, &hdr );
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||
lphttpHdr->wFlags |= HDR_ISREQUEST;
|
||||
else
|
||||
lphttpHdr->wFlags &= ~HDR_ISREQUEST;
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE)
|
||||
{
|
||||
HTTP_DeleteCustomHeader( request, index );
|
||||
|
||||
if (value && value[0])
|
||||
{
|
||||
HTTPHEADERW hdr;
|
||||
|
||||
hdr.lpszField = (LPWSTR)field;
|
||||
hdr.lpszValue = (LPWSTR)value;
|
||||
hdr.wFlags = hdr.wCount = 0;
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||
hdr.wFlags |= HDR_ISREQUEST;
|
||||
|
||||
res = HTTP_InsertCustomHeader(request, &hdr);
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return res;
|
||||
}
|
||||
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (dwModifier & COALESCEFLAGS)
|
||||
{
|
||||
LPWSTR lpsztmp;
|
||||
WCHAR ch = 0;
|
||||
INT len = 0;
|
||||
INT origlen = strlenW(lphttpHdr->lpszValue);
|
||||
INT valuelen = strlenW(value);
|
||||
|
||||
if (dwModifier & HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA)
|
||||
{
|
||||
ch = ',';
|
||||
lphttpHdr->wFlags |= HDR_COMMADELIMITED;
|
||||
}
|
||||
else if (dwModifier & HTTP_ADDHDR_FLAG_COALESCE_WITH_SEMICOLON)
|
||||
{
|
||||
ch = ';';
|
||||
lphttpHdr->wFlags |= HDR_COMMADELIMITED;
|
||||
}
|
||||
|
||||
len = origlen + valuelen + ((ch > 0) ? 2 : 0);
|
||||
|
||||
lpsztmp = heap_realloc(lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR));
|
||||
if (lpsztmp)
|
||||
{
|
||||
lphttpHdr->lpszValue = lpsztmp;
|
||||
/* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */
|
||||
if (ch > 0)
|
||||
{
|
||||
lphttpHdr->lpszValue[origlen] = ch;
|
||||
origlen++;
|
||||
lphttpHdr->lpszValue[origlen] = ' ';
|
||||
origlen++;
|
||||
}
|
||||
|
||||
memcpy(&lphttpHdr->lpszValue[origlen], value, valuelen*sizeof(WCHAR));
|
||||
lphttpHdr->lpszValue[len] = '\0';
|
||||
res = ERROR_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
WARN("heap_realloc (%d bytes) failed\n",len+1);
|
||||
res = ERROR_OUTOFMEMORY;
|
||||
}
|
||||
}
|
||||
/* FIXME: What if value == NULL? */
|
||||
out:
|
||||
TRACE("<-- %d\n", res);
|
||||
LeaveCriticalSection( &request->headers_section );
|
||||
return res;
|
||||
|
|
|
@ -26,7 +26,46 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_CORESERVICES_CORESERVICES_H
|
||||
#define GetCurrentThread MacGetCurrentThread
|
||||
#define LoadResource MacLoadResource
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#undef GetCurrentThread
|
||||
#undef LoadResource
|
||||
#undef DPRINTF
|
||||
#endif
|
||||
|
||||
#include "winsock2.h"
|
||||
#include "ws2ipdef.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winuser.h"
|
||||
#include "wininet.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
#include "winerror.h"
|
||||
#define NO_SHLWAPI_STREAM
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "wine/exception.h"
|
||||
|
||||
#include "internet.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -1625,7 +1664,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
|
|||
|
||||
if (dwFlags & ICU_DECODE)
|
||||
{
|
||||
WCHAR *url_tmp;
|
||||
WCHAR *url_tmp, *buffer;
|
||||
DWORD len = dwUrlLength + 1;
|
||||
BOOL ret;
|
||||
|
||||
|
@ -1634,9 +1673,24 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
|
|||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
ret = InternetCanonicalizeUrlW(url_tmp, url_tmp, &len, ICU_DECODE | ICU_NO_ENCODE);
|
||||
|
||||
buffer = url_tmp;
|
||||
ret = InternetCanonicalizeUrlW(url_tmp, buffer, &len, ICU_DECODE | ICU_NO_ENCODE);
|
||||
if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
|
||||
{
|
||||
buffer = heap_alloc(len * sizeof(WCHAR));
|
||||
if (!buffer)
|
||||
{
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
heap_free(url_tmp);
|
||||
return FALSE;
|
||||
}
|
||||
ret = InternetCanonicalizeUrlW(url_tmp, buffer, &len, ICU_DECODE | ICU_NO_ENCODE);
|
||||
}
|
||||
if (ret)
|
||||
ret = InternetCrackUrlW(url_tmp, len, dwFlags & ~ICU_DECODE, lpUC);
|
||||
ret = InternetCrackUrlW(buffer, len, dwFlags & ~ICU_DECODE, lpUC);
|
||||
|
||||
if (buffer != url_tmp) heap_free(buffer);
|
||||
heap_free(url_tmp);
|
||||
return ret;
|
||||
}
|
||||
|
@ -2271,7 +2325,8 @@ static WCHAR *get_proxy_autoconfig_url(void)
|
|||
CFRelease( settings );
|
||||
return ret;
|
||||
#else
|
||||
FIXME( "no support on this platform\n" );
|
||||
static int once;
|
||||
if (!once++) FIXME( "no support on this platform\n" );
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
@ -2821,10 +2876,21 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
|
|||
FIXME("Option INTERNET_OPTION_DISABLE_AUTODIAL; STUB\n");
|
||||
break;
|
||||
case INTERNET_OPTION_HTTP_DECODING:
|
||||
FIXME("INTERNET_OPTION_HTTP_DECODING; STUB\n");
|
||||
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
||||
ret = FALSE;
|
||||
{
|
||||
if (!lpwhh)
|
||||
{
|
||||
SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
||||
return FALSE;
|
||||
}
|
||||
if (!lpBuffer || dwBufferLength != sizeof(BOOL))
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
ret = FALSE;
|
||||
}
|
||||
else
|
||||
lpwhh->decoding = *(BOOL *)lpBuffer;
|
||||
break;
|
||||
}
|
||||
case INTERNET_OPTION_COOKIES_3RD_PARTY:
|
||||
FIXME("INTERNET_OPTION_COOKIES_3RD_PARTY; STUB\n");
|
||||
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
||||
|
@ -2911,6 +2977,12 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
|
|||
ret = (res == ERROR_SUCCESS);
|
||||
break;
|
||||
}
|
||||
case INTERNET_OPTION_SETTINGS_CHANGED:
|
||||
FIXME("INTERNET_OPTION_SETTINGS_CHANGED; STUB\n");
|
||||
break;
|
||||
case INTERNET_OPTION_REFRESH:
|
||||
FIXME("INTERNET_OPTION_REFRESH; STUB\n");
|
||||
break;
|
||||
default:
|
||||
FIXME("Option %d STUB\n",dwOption);
|
||||
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
||||
|
|
|
@ -23,69 +23,13 @@
|
|||
#ifndef _WINE_INTERNET_H_
|
||||
#define _WINE_INTERNET_H_
|
||||
|
||||
#include <wine/config.h>
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winreg.h>
|
||||
#include <winuser.h>
|
||||
#include <wininet.h>
|
||||
#define NO_SHLWAPI_STREAM
|
||||
#define NO_SHLWAPI_REG
|
||||
#define NO_SHLWAPI_GDI
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <wine/list.h>
|
||||
#include <wine/debug.h>
|
||||
#include <wine/unicode.h>
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <sys/types.h>
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined (_MSC_VER)
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#define closesocket close
|
||||
#define ioctlsocket ioctl
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#include <winineti.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
#include "winineti.h"
|
||||
|
||||
extern HMODULE WININET_hModule DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -146,31 +90,11 @@ typedef struct
|
|||
BOOL is_valid_netconn(netconn_t *) DECLSPEC_HIDDEN;
|
||||
void close_netconn(netconn_t *) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
|
||||
{
|
||||
return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
}
|
||||
|
||||
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len)
|
||||
{
|
||||
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
||||
}
|
||||
|
||||
static inline void * __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t len)
|
||||
{
|
||||
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
|
||||
}
|
||||
|
||||
static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len)
|
||||
{
|
||||
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len);
|
||||
}
|
||||
|
||||
static inline BOOL heap_free(void *mem)
|
||||
{
|
||||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
}
|
||||
|
||||
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
||||
{
|
||||
LPWSTR ret = NULL;
|
||||
|
@ -357,6 +281,7 @@ struct _object_header_t
|
|||
ULONG ErrorMask;
|
||||
DWORD dwInternalFlags;
|
||||
LONG refs;
|
||||
BOOL decoding;
|
||||
INTERNET_STATUS_CALLBACK lpfnStatusCB;
|
||||
struct list entry;
|
||||
struct list children;
|
||||
|
@ -453,7 +378,6 @@ typedef struct
|
|||
DWORD read_size; /* valid data size in read_buf */
|
||||
BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */
|
||||
|
||||
BOOL decoding;
|
||||
data_stream_t *data_stream;
|
||||
netconn_stream_t netconn_stream;
|
||||
} http_request_t;
|
||||
|
|
|
@ -21,20 +21,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "ws2tcpip.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "wine/library.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_FILIO_H
|
||||
# include <sys/filio.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
# include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
static DWORD netconn_verify_cert(netconn_t *conn, PCCERT_CONTEXT cert, HCERTSTORE store)
|
||||
{
|
||||
|
|
64
dll/win32/wininet/precomp.h
Normal file
64
dll/win32/wininet/precomp.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
|
||||
#ifndef _WININET_PRECOMP_H_
|
||||
#define _WININET_PRECOMP_H_
|
||||
|
||||
#include <wine/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winreg.h>
|
||||
#include <winuser.h>
|
||||
#include <wininet.h>
|
||||
#define NO_SHLWAPI_STREAM
|
||||
#define NO_SHLWAPI_REG
|
||||
#define NO_SHLWAPI_GDI
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <sys/types.h>
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined (_MSC_VER)
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#define closesocket close
|
||||
#define ioctlsocket ioctl
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#include "internet.h"
|
||||
#include "resource.h"
|
||||
|
||||
#endif /* !_WININET_PRECOMP_H_ */
|
|
@ -20,6 +20,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <windef.h>
|
||||
#include <winuser.h>
|
||||
|
||||
#define IDD_INVCERTDLG 0x398
|
||||
#define IDD_AUTHDLG 0x399
|
||||
#define IDD_PROXYDLG 0x400
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
#include <winuser.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,10 +22,33 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "ws2tcpip.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wininet.h"
|
||||
#include "winineti.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
#include "shlobj.h"
|
||||
#include "shellapi.h"
|
||||
|
||||
#include "internet.h"
|
||||
|
||||
#include <shlobj.h>
|
||||
#include <shellapi.h>
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
static const char urlcache_ver_prefix[] = "WINE URLCache Ver ";
|
||||
static const char urlcache_ver[] = "0.2012001";
|
||||
|
|
|
@ -22,10 +22,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "ws2tcpip.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
|
||||
// ReactOS
|
||||
#ifdef __REACTOS__
|
||||
#include <stdio.h>
|
||||
#include "inet_ntop.c"
|
||||
#endif
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
#define TIME_STRING_LEN 30
|
||||
|
||||
|
|
|
@ -25,4 +25,4 @@
|
|||
#define WINE_PRODUCTVERSION 8,00,7601,17601
|
||||
#define WINE_PRODUCTVERSION_STR "8.00.7601.17601"
|
||||
|
||||
#include <wine/wine_common_ver.rc>
|
||||
#include "wine/wine_common_ver.rc"
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
@ stdcall IsUrlCacheEntryExpiredA(str long ptr)
|
||||
@ stdcall IsUrlCacheEntryExpiredW(wstr long ptr)
|
||||
@ stdcall LoadUrlCacheContent()
|
||||
@ stdcall -stub ParseX509EncodedCertificateForListBoxEntry(ptr long str ptr)
|
||||
@ stdcall ParseX509EncodedCertificateForListBoxEntry(ptr long str ptr)
|
||||
@ stdcall PrivacyGetZonePreferenceW(long long ptr ptr ptr)
|
||||
@ stdcall PrivacySetZonePreferenceW(long long long wstr)
|
||||
@ stdcall ReadUrlCacheEntryStream(ptr long ptr ptr long)
|
||||
|
|
|
@ -201,7 +201,7 @@ reactos/dll/win32/windowscodecsext # Synced to WineStaging-2.9
|
|||
reactos/dll/win32/winemp3.acm # Synced to WineStaging-3.3
|
||||
reactos/dll/win32/wing32 # Synced to WineStaging-3.3
|
||||
reactos/dll/win32/winhttp # Synced to WineStaging-3.3
|
||||
reactos/dll/win32/wininet # Synced to Wine-3.0
|
||||
reactos/dll/win32/wininet # Synced to WineStaging-3.3
|
||||
reactos/dll/win32/winmm # Forked at Wine-20050628
|
||||
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
|
||||
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
|
||||
|
|
Loading…
Reference in a new issue