mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:15:59 +00:00
[WININET] Sync with Wine 3.0. CORE-14225
This commit is contained in:
parent
eec2e288be
commit
c95e9203e6
6 changed files with 123 additions and 171 deletions
|
@ -554,15 +554,6 @@ BOOL WINAPI InternetShowSecurityInfoByURLW(LPCWSTR url, HWND window)
|
||||||
return FALSE;
|
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 (@)
|
* ShowX509EncodedCertificate (@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -253,7 +253,7 @@ server_t *get_server(substr_t name, INTERNET_PORT port, BOOL is_https, BOOL do_c
|
||||||
EnterCriticalSection(&connection_pool_cs);
|
EnterCriticalSection(&connection_pool_cs);
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(iter, &connection_pool, server_t, entry) {
|
LIST_FOR_EACH_ENTRY(iter, &connection_pool, server_t, entry) {
|
||||||
if(iter->port == port && name.len == strlenW(iter->name) && !strncmpW(iter->name, name.str, name.len)
|
if(iter->port == port && name.len == strlenW(iter->name) && !strncmpiW(iter->name, name.str, name.len)
|
||||||
&& iter->is_https == is_https) {
|
&& iter->is_https == is_https) {
|
||||||
server = iter;
|
server = iter;
|
||||||
server_addref(server);
|
server_addref(server);
|
||||||
|
@ -742,18 +742,10 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
||||||
int HeaderIndex;
|
int HeaderIndex;
|
||||||
int numCookies = 0;
|
int numCookies = 0;
|
||||||
LPHTTPHEADERW setCookieHeader;
|
LPHTTPHEADERW setCookieHeader;
|
||||||
WCHAR *path, *tmp;
|
|
||||||
|
|
||||||
if(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)
|
if(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
path = heap_strdupW(request->path);
|
|
||||||
if (!path)
|
|
||||||
return;
|
|
||||||
|
|
||||||
tmp = strrchrW(path, '/');
|
|
||||||
if (tmp && tmp[1]) tmp[1] = 0;
|
|
||||||
|
|
||||||
EnterCriticalSection( &request->headers_section );
|
EnterCriticalSection( &request->headers_section );
|
||||||
|
|
||||||
while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1)
|
while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1)
|
||||||
|
@ -772,11 +764,10 @@ static void HTTP_ProcessCookies( http_request_t *request )
|
||||||
|
|
||||||
name = substr(setCookieHeader->lpszValue, data - setCookieHeader->lpszValue);
|
name = substr(setCookieHeader->lpszValue, data - setCookieHeader->lpszValue);
|
||||||
data++;
|
data++;
|
||||||
set_cookie(substrz(request->server->name), substrz(path), name, substrz(data), INTERNET_COOKIE_HTTPONLY);
|
set_cookie(substrz(request->server->name), substrz(request->path), name, substrz(data), INTERNET_COOKIE_HTTPONLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaveCriticalSection( &request->headers_section );
|
LeaveCriticalSection( &request->headers_section );
|
||||||
heap_free(path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void strip_spaces(LPWSTR start)
|
static void strip_spaces(LPWSTR start)
|
||||||
|
@ -1725,7 +1716,7 @@ static BOOL HTTP_DomainMatches(LPCWSTR server, substr_t domain)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
len = strlenW(dot + 1);
|
len = strlenW(dot + 1);
|
||||||
if(len <= domain.len - 2)
|
if(len < domain.len - 2)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* The server's domain is longer than the wildcard, so it
|
/* The server's domain is longer than the wildcard, so it
|
||||||
|
@ -2335,6 +2326,11 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer,
|
||||||
if (!(req->session->appInfo->proxyPassword = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY;
|
if (!(req->session->appInfo->proxyPassword = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY;
|
||||||
return ERROR_SUCCESS;
|
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);
|
return INET_SetOption(hdr, option, buffer, size);
|
||||||
|
@ -2904,7 +2900,7 @@ static DWORD set_content_length(http_request_t *request)
|
||||||
request->contentLength = ~0u;
|
request->contentLength = ~0u;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(request->hdr.decoding) {
|
if(request->decoding) {
|
||||||
int encoding_idx;
|
int encoding_idx;
|
||||||
|
|
||||||
static const WCHAR deflateW[] = {'d','e','f','l','a','t','e',0};
|
static const WCHAR deflateW[] = {'d','e','f','l','a','t','e',0};
|
||||||
|
@ -3290,7 +3286,6 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
|
||||||
request->hdr.htype = WH_HHTTPREQ;
|
request->hdr.htype = WH_HHTTPREQ;
|
||||||
request->hdr.dwFlags = dwFlags;
|
request->hdr.dwFlags = dwFlags;
|
||||||
request->hdr.dwContext = dwContext;
|
request->hdr.dwContext = dwContext;
|
||||||
request->hdr.decoding = session->hdr.decoding;
|
|
||||||
request->contentLength = ~0u;
|
request->contentLength = ~0u;
|
||||||
|
|
||||||
request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl;
|
request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl;
|
||||||
|
@ -5798,7 +5793,6 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
|
||||||
session->hdr.dwFlags = dwFlags;
|
session->hdr.dwFlags = dwFlags;
|
||||||
session->hdr.dwContext = dwContext;
|
session->hdr.dwContext = dwContext;
|
||||||
session->hdr.dwInternalFlags |= dwInternalFlags;
|
session->hdr.dwInternalFlags |= dwInternalFlags;
|
||||||
session->hdr.decoding = hIC->hdr.decoding;
|
|
||||||
|
|
||||||
WININET_AddRef( &hIC->hdr );
|
WININET_AddRef( &hIC->hdr );
|
||||||
session->appInfo = hIC;
|
session->appInfo = hIC;
|
||||||
|
@ -6056,112 +6050,34 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer)
|
||||||
|
|
||||||
static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier)
|
static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier)
|
||||||
{
|
{
|
||||||
LPHTTPHEADERW lphttpHdr;
|
LPHTTPHEADERW lphttpHdr = NULL;
|
||||||
INT index;
|
INT index;
|
||||||
BOOL request_only = !!(dwModifier & HTTP_ADDHDR_FLAG_REQ);
|
BOOL request_only = !!(dwModifier & HTTP_ADDHDR_FLAG_REQ);
|
||||||
DWORD res = ERROR_SUCCESS;
|
DWORD res = ERROR_HTTP_INVALID_HEADER;
|
||||||
|
|
||||||
TRACE("--> %s: %s - 0x%08x\n", debugstr_w(field), debugstr_w(value), dwModifier);
|
TRACE("--> %s: %s - 0x%08x\n", debugstr_w(field), debugstr_w(value), dwModifier);
|
||||||
|
|
||||||
EnterCriticalSection( &request->headers_section );
|
EnterCriticalSection( &request->headers_section );
|
||||||
|
|
||||||
index = HTTP_GetCustomHeaderIndex(request, field, 0, request_only);
|
/* 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);
|
||||||
|
|
||||||
if (index >= 0)
|
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)
|
if (dwModifier & HTTP_ADDHDR_FLAG_ADD_IF_NEW)
|
||||||
{
|
{
|
||||||
res = ERROR_HTTP_INVALID_HEADER; /* FIXME */
|
LeaveCriticalSection( &request->headers_section );
|
||||||
goto out;
|
return ERROR_HTTP_INVALID_HEADER;
|
||||||
}
|
|
||||||
|
|
||||||
/* 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;
|
HTTPHEADERW hdr;
|
||||||
|
|
||||||
|
@ -6172,12 +6088,89 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
|
||||||
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||||
hdr.wFlags |= HDR_ISREQUEST;
|
hdr.wFlags |= HDR_ISREQUEST;
|
||||||
|
|
||||||
res = HTTP_InsertCustomHeader( request, &hdr );
|
res = HTTP_InsertCustomHeader(request, &hdr);
|
||||||
goto out;
|
LeaveCriticalSection( &request->headers_section );
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
/* no value to delete */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LeaveCriticalSection( &request->headers_section );
|
||||||
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: What if value == NULL? */
|
if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
|
||||||
out:
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
TRACE("<-- %d\n", res);
|
TRACE("<-- %d\n", res);
|
||||||
LeaveCriticalSection( &request->headers_section );
|
LeaveCriticalSection( &request->headers_section );
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -1625,7 +1625,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
|
||||||
|
|
||||||
if (dwFlags & ICU_DECODE)
|
if (dwFlags & ICU_DECODE)
|
||||||
{
|
{
|
||||||
WCHAR *url_tmp, *buffer;
|
WCHAR *url_tmp;
|
||||||
DWORD len = dwUrlLength + 1;
|
DWORD len = dwUrlLength + 1;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
|
@ -1634,24 +1634,9 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
|
||||||
SetLastError(ERROR_OUTOFMEMORY);
|
SetLastError(ERROR_OUTOFMEMORY);
|
||||||
return FALSE;
|
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)
|
if (ret)
|
||||||
ret = InternetCrackUrlW(buffer, len, dwFlags & ~ICU_DECODE, lpUC);
|
ret = InternetCrackUrlW(url_tmp, len, dwFlags & ~ICU_DECODE, lpUC);
|
||||||
|
|
||||||
if (buffer != url_tmp) heap_free(buffer);
|
|
||||||
heap_free(url_tmp);
|
heap_free(url_tmp);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -2286,8 +2271,7 @@ static WCHAR *get_proxy_autoconfig_url(void)
|
||||||
CFRelease( settings );
|
CFRelease( settings );
|
||||||
return ret;
|
return ret;
|
||||||
#else
|
#else
|
||||||
static int once;
|
FIXME( "no support on this platform\n" );
|
||||||
if (!once++) FIXME( "no support on this platform\n" );
|
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -2837,21 +2821,10 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
|
||||||
FIXME("Option INTERNET_OPTION_DISABLE_AUTODIAL; STUB\n");
|
FIXME("Option INTERNET_OPTION_DISABLE_AUTODIAL; STUB\n");
|
||||||
break;
|
break;
|
||||||
case INTERNET_OPTION_HTTP_DECODING:
|
case INTERNET_OPTION_HTTP_DECODING:
|
||||||
{
|
FIXME("INTERNET_OPTION_HTTP_DECODING; STUB\n");
|
||||||
if (!lpwhh)
|
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
||||||
{
|
ret = FALSE;
|
||||||
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;
|
break;
|
||||||
}
|
|
||||||
case INTERNET_OPTION_COOKIES_3RD_PARTY:
|
case INTERNET_OPTION_COOKIES_3RD_PARTY:
|
||||||
FIXME("INTERNET_OPTION_COOKIES_3RD_PARTY; STUB\n");
|
FIXME("INTERNET_OPTION_COOKIES_3RD_PARTY; STUB\n");
|
||||||
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
||||||
|
@ -2938,12 +2911,6 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
|
||||||
ret = (res == ERROR_SUCCESS);
|
ret = (res == ERROR_SUCCESS);
|
||||||
break;
|
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:
|
default:
|
||||||
FIXME("Option %d STUB\n",dwOption);
|
FIXME("Option %d STUB\n",dwOption);
|
||||||
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
SetLastError(ERROR_INTERNET_INVALID_OPTION);
|
||||||
|
@ -4469,6 +4436,11 @@ BOOL WINAPI InternetGetSecurityInfoByURLW(LPCWSTR lpszURL, PCCERT_CHAIN_CONTEXT
|
||||||
|
|
||||||
TRACE("(%s %p %p)\n", debugstr_w(lpszURL), ppCertChain, pdwSecureFlags);
|
TRACE("(%s %p %p)\n", debugstr_w(lpszURL), ppCertChain, pdwSecureFlags);
|
||||||
|
|
||||||
|
if (!ppCertChain && !pdwSecureFlags) {
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
url.dwHostNameLength = 1;
|
url.dwHostNameLength = 1;
|
||||||
res = InternetCrackUrlW(lpszURL, 0, 0, &url);
|
res = InternetCrackUrlW(lpszURL, 0, 0, &url);
|
||||||
if(!res || url.nScheme != INTERNET_SCHEME_HTTPS) {
|
if(!res || url.nScheme != INTERNET_SCHEME_HTTPS) {
|
||||||
|
@ -4483,15 +4455,11 @@ BOOL WINAPI InternetGetSecurityInfoByURLW(LPCWSTR lpszURL, PCCERT_CHAIN_CONTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
if(server->cert_chain) {
|
if(server->cert_chain) {
|
||||||
const CERT_CHAIN_CONTEXT *chain_dup;
|
if(pdwSecureFlags)
|
||||||
|
|
||||||
chain_dup = CertDuplicateCertificateChain(server->cert_chain);
|
|
||||||
if(chain_dup) {
|
|
||||||
*ppCertChain = chain_dup;
|
|
||||||
*pdwSecureFlags = server->security_flags & _SECURITY_ERROR_FLAGS_MASK;
|
*pdwSecureFlags = server->security_flags & _SECURITY_ERROR_FLAGS_MASK;
|
||||||
}else {
|
|
||||||
|
if(ppCertChain && !(*ppCertChain = CertDuplicateCertificateChain(server->cert_chain)))
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
}
|
|
||||||
}else {
|
}else {
|
||||||
SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND);
|
SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND);
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
|
|
|
@ -357,7 +357,6 @@ struct _object_header_t
|
||||||
ULONG ErrorMask;
|
ULONG ErrorMask;
|
||||||
DWORD dwInternalFlags;
|
DWORD dwInternalFlags;
|
||||||
LONG refs;
|
LONG refs;
|
||||||
BOOL decoding;
|
|
||||||
INTERNET_STATUS_CALLBACK lpfnStatusCB;
|
INTERNET_STATUS_CALLBACK lpfnStatusCB;
|
||||||
struct list entry;
|
struct list entry;
|
||||||
struct list children;
|
struct list children;
|
||||||
|
@ -454,6 +453,7 @@ typedef struct
|
||||||
DWORD read_size; /* valid data size in read_buf */
|
DWORD read_size; /* valid data size in read_buf */
|
||||||
BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */
|
BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */
|
||||||
|
|
||||||
|
BOOL decoding;
|
||||||
data_stream_t *data_stream;
|
data_stream_t *data_stream;
|
||||||
netconn_stream_t netconn_stream;
|
netconn_stream_t netconn_stream;
|
||||||
} http_request_t;
|
} http_request_t;
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
@ stdcall IsUrlCacheEntryExpiredA(str long ptr)
|
@ stdcall IsUrlCacheEntryExpiredA(str long ptr)
|
||||||
@ stdcall IsUrlCacheEntryExpiredW(wstr long ptr)
|
@ stdcall IsUrlCacheEntryExpiredW(wstr long ptr)
|
||||||
@ stdcall LoadUrlCacheContent()
|
@ stdcall LoadUrlCacheContent()
|
||||||
@ stdcall ParseX509EncodedCertificateForListBoxEntry(ptr long str ptr)
|
@ stdcall -stub ParseX509EncodedCertificateForListBoxEntry(ptr long str ptr)
|
||||||
@ stdcall PrivacyGetZonePreferenceW(long long ptr ptr ptr)
|
@ stdcall PrivacyGetZonePreferenceW(long long ptr ptr ptr)
|
||||||
@ stdcall PrivacySetZonePreferenceW(long long long wstr)
|
@ stdcall PrivacySetZonePreferenceW(long long long wstr)
|
||||||
@ stdcall ReadUrlCacheEntryStream(ptr long ptr ptr long)
|
@ 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 Wine-3.0
|
reactos/dll/win32/winemp3.acm # Synced to Wine-3.0
|
||||||
reactos/dll/win32/wing32 # Synced to WineStaging-2.9
|
reactos/dll/win32/wing32 # Synced to WineStaging-2.9
|
||||||
reactos/dll/win32/winhttp # Synced to Wine-3.0
|
reactos/dll/win32/winhttp # Synced to Wine-3.0
|
||||||
reactos/dll/win32/wininet # Synced to WineStaging-2.16
|
reactos/dll/win32/wininet # Synced to Wine-3.0
|
||||||
reactos/dll/win32/winmm # Forked at Wine-20050628
|
reactos/dll/win32/winmm # Forked at Wine-20050628
|
||||||
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
|
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
|
||||||
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
|
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue