Author: akhaldi
Date: Sun Nov 22 10:15:25 2015
New Revision: 70009
URL:
http://svn.reactos.org/svn/reactos?rev=70009&view=rev
Log:
[WININET] Sync with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/reactos/dll/win32/wininet/http.c
trunk/reactos/dll/win32/wininet/internet.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/wininet/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Sun Nov 22 10:15:25 2015
@@ -4877,6 +4877,16 @@
return ret;
}
+static void set_content_length_header( http_request_t *request, DWORD len, DWORD flags )
+{
+ static const WCHAR fmtW[] =
+
{'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':','
','%','u','\r','\n',0};
+ WCHAR buf[sizeof(fmtW)/sizeof(fmtW[0]) + 10];
+
+ sprintfW( buf, fmtW, len );
+ HTTP_HttpAddRequestHeadersW( request, buf, ~0u, flags );
+}
+
/***********************************************************************
* HTTP_HttpSendRequestW (internal)
*
@@ -4891,12 +4901,9 @@
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
DWORD dwContentLength, BOOL bEndRequest)
{
- static const WCHAR szContentLength[] =
- {
'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':','
','%','l','i','\r','\n',0 };
BOOL redirected = FALSE, secure_proxy_connect = FALSE, loop_next;
LPWSTR requestString = NULL;
INT responseLen, cnt;
- WCHAR contentLengthStr[sizeof szContentLength/2 /* includes \r\n */ + 20 /* int */
];
DWORD res;
TRACE("--> %p\n", request);
@@ -4912,8 +4919,7 @@
if (dwContentLength || strcmpW(request->verb, szGET))
{
- sprintfW(contentLengthStr, szContentLength, dwContentLength);
- HTTP_HttpAddRequestHeadersW(request, contentLengthStr, -1L,
HTTP_ADDREQ_FLAG_ADD_IF_NEW);
+ set_content_length_header(request, dwContentLength,
HTTP_ADDREQ_FLAG_ADD_IF_NEW);
request->bytesToWrite = dwContentLength;
}
if (request->session->appInfo->agent)
@@ -5002,6 +5008,10 @@
{
static const WCHAR connectW[] =
{'C','O','N','N','E','C','T',0};
const WCHAR *target = request->server->host_port;
+
+ if (HTTP_GetCustomHeaderIndex(request, szContent_Length, 0, TRUE) >= 0)
+ set_content_length_header(request, 0, HTTP_ADDREQ_FLAG_REPLACE);
+
requestString = build_request_header(request, connectW, target, g_szHttp1_1,
TRUE);
}
else if (request->proxy && !(request->hdr.dwFlags &
INTERNET_FLAG_SECURE))
@@ -5011,7 +5021,12 @@
heap_free(url);
}
else
+ {
+ if (request->proxy && HTTP_GetCustomHeaderIndex(request,
szContent_Length, 0, TRUE) >= 0)
+ set_content_length_header(request, dwContentLength,
HTTP_ADDREQ_FLAG_REPLACE);
+
requestString = build_request_header(request, request->verb,
request->path, request->version, TRUE);
+ }
TRACE("Request header -> %s\n", debugstr_w(requestString) );
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] Sun Nov 22 10:15:25 2015
@@ -322,7 +322,7 @@
}
else
{
- if ((ret = RegDeleteValueW( key, szProxyServer )))
+ if ((ret = RegDeleteValueW( key, szProxyServer )) && ret !=
ERROR_FILE_NOT_FOUND)
{
RegCloseKey( key );
return ret;
@@ -1283,9 +1283,8 @@
HINTERNET rc = NULL;
DWORD res = ERROR_SUCCESS;
- TRACE("(%p, %s, %i, %s, %s, %i, %x, %lx)\n", hInternet,
debugstr_w(lpszServerName),
- nServerPort, debugstr_w(lpszUserName), debugstr_w(lpszPassword),
- dwService, dwFlags, dwContext);
+ TRACE("(%p, %s, %u, %s, %p, %u, %x, %lx)\n", hInternet,
debugstr_w(lpszServerName),
+ nServerPort, debugstr_w(lpszUserName), lpszPassword, dwService, dwFlags,
dwContext);
if (!lpszServerName)
{
@@ -2382,7 +2381,8 @@
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 FALSE;
#endif
}
@@ -2730,6 +2730,15 @@
case INTERNET_OPTION_SETTINGS_CHANGED:
FIXME("INTERNETOPTION_SETTINGS_CHANGED semi-stub\n");
collect_connections(COLLECT_CONNECTIONS);
+ return ERROR_SUCCESS;
+
+ case INTERNET_OPTION_SUPPRESS_BEHAVIOR:
+ FIXME("INTERNET_OPTION_SUPPRESS_BEHAVIOR stub\n");
+
+ if(size != sizeof(ULONG))
+ return ERROR_INTERNET_BAD_OPTION_LENGTH;
+
+ FIXME("%08x\n", *(ULONG*)buf);
return ERROR_SUCCESS;
}
@@ -3002,6 +3011,12 @@
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);
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Nov 22 10:15:25 2015
@@ -205,7 +205,7 @@
reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.7.47
reactos/dll/win32/wing32 # Synced to WineStaging-1.7.55
reactos/dll/win32/winhttp # Synced to WineStaging-1.7.55
-reactos/dll/win32/wininet # Synced to WineStaging-1.7.47
+reactos/dll/win32/wininet # Synced to WineStaging-1.7.55
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