Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48514 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48530 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/httpapi/httpapi.spec | 45 +++++++++------------------------------ 1 file changed, 10 insertions(+), 35 deletions(-)
diff --git a/dlls/httpapi/httpapi.spec b/dlls/httpapi/httpapi.spec index e1a16c39ab..efb2dedb3a 100644 --- a/dlls/httpapi/httpapi.spec +++ b/dlls/httpapi/httpapi.spec @@ -1,62 +1,37 @@ @ stub HttpAddFragmentToCache @ stdcall HttpAddUrl(ptr wstr ptr) -@ stub HttpAddUrlToConfigGroup @ stdcall HttpAddUrlToUrlGroup(int64 wstr int64 long) @ stub HttpCancelHttpRequest -@ stub HttpCreateAppPool -@ stub HttpCreateConfigGroup -@ stub HttpCreateFilter +@ stdcall HttpCloseRequestQueue(ptr) +@ stdcall HttpCloseServerSession(int64) +@ stdcall HttpCloseUrlGroup(int64) +@ stub HttpControlService @ stdcall HttpCreateHttpHandle(ptr long) @ stdcall HttpCreateRequestQueue(long wstr ptr long ptr) @ stdcall HttpCreateServerSession(long ptr long) @ stdcall HttpCreateUrlGroup(int64 ptr long) -@ stdcall HttpCloseRequestQueue(ptr) -@ stdcall HttpCloseServerSession(int64) -@ stdcall HttpCloseUrlGroup(int64) -@ stub HttpDeleteConfigGroup @ stdcall HttpDeleteServiceConfiguration(ptr long ptr long ptr) -@ stub HttpFilterAccept -@ stub HttpFilterAppRead -@ stub HttpFilterAppWrite -@ stub HttpFilterAppWriteAndRawRead -@ stub HttpFilterClose -@ stub HttpFilterRawRead -@ stub HttpFilterRawWrite -@ stub HttpFilterRawWriteAndAppRead @ stub HttpFlushResponseCache @ stub HttpGetCounters @ stdcall HttpInitialize(long long ptr) -@ stub HttpInitializeServerContext -@ stub HttpOpenAppPool -@ stub HttpOpenControlChannel -@ stub HttpOpenFilter -@ stub HttpQueryAppPoolInformation -@ stub HttpQueryConfigGroupInformation -@ stub HttpQueryControlChannelInformation -@ stub HttpQueryServerContextInformation +@ stub HttpQueryRequestQueueProperty +@ stub HttpQueryServerSessionProperty @ stdcall HttpQueryServiceConfiguration(ptr long ptr long ptr long ptr ptr) +@ stub HttpQueryUrlGroupProperty @ stub HttpReadFragmentFromCache @ stub HttpReceiveClientCertificate @ stdcall HttpReceiveHttpRequest(ptr int64 long ptr long ptr ptr) -@ stub HttpReceiveHttpResponse @ stdcall HttpReceiveRequestEntityBody(ptr int64 long ptr long ptr ptr) -@ stub HttpRemoveAllUrlsFromConfigGroup @ stdcall HttpRemoveUrl(ptr wstr) -@ stub HttpRemoveUrlFromConfigGroup @ stdcall HttpRemoveUrlFromUrlGroup(int64 wstr long) -@ stub HttpSendHttpRequest @ stdcall HttpSendHttpResponse(ptr int64 long ptr ptr ptr ptr long ptr ptr) -@ stub HttpSendRequestEntityBody @ stub HttpSendResponseEntityBody -@ stub HttpSetAppPoolInformation -@ stub HttpSetConfigGroupInformation -@ stub HttpSetControlChannelInformation @ stdcall HttpSetRequestQueueProperty(ptr long ptr long long ptr) -@ stub HttpSetServerContextInformation +@ stub HttpSetServerSessionProperty @ stdcall HttpSetServiceConfiguration(ptr long ptr long ptr) @ stdcall HttpSetUrlGroupProperty(int64 long ptr long) -@ stub HttpShutdownAppPool -@ stub HttpShutdownFilter +@ stub HttpShutdownRequestQueue @ stdcall HttpTerminate(long ptr) @ stub HttpWaitForDemandStart @ stub HttpWaitForDisconnect +@ stub HttpWaitForDisconnectEx
Same as http.sys.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/httpapi/httpapi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c index c24cadfaeb..19547fdcf8 100644 --- a/dlls/httpapi/httpapi_main.c +++ b/dlls/httpapi/httpapi_main.c @@ -25,7 +25,7 @@ #include "wine/heap.h" #include "wine/list.h"
-WINE_DEFAULT_DEBUG_CHANNEL(httpapi); +WINE_DEFAULT_DEBUG_CHANNEL(http);
static const WCHAR device_nameW[] = {'\','D','e','v','i','c','e','\','H','t','t','p','\','R','e','q','Q','u','e','u','e',0};
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48530 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/httpapi/httpapi.spec | 2 +- dlls/httpapi/httpapi_main.c | 23 +++++++++++++++++++++++ include/http.h | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/dlls/httpapi/httpapi.spec b/dlls/httpapi/httpapi.spec index efb2dedb3a..df18a12338 100644 --- a/dlls/httpapi/httpapi.spec +++ b/dlls/httpapi/httpapi.spec @@ -27,7 +27,7 @@ @ stdcall HttpSendHttpResponse(ptr int64 long ptr ptr ptr ptr long ptr ptr) @ stub HttpSendResponseEntityBody @ stdcall HttpSetRequestQueueProperty(ptr long ptr long long ptr) -@ stub HttpSetServerSessionProperty +@ stdcall HttpSetServerSessionProperty(int64 long ptr long) @ stdcall HttpSetServiceConfiguration(ptr long ptr long ptr) @ stdcall HttpSetUrlGroupProperty(int64 long ptr long) @ stub HttpShutdownRequestQueue diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c index 19547fdcf8..6143214346 100644 --- a/dlls/httpapi/httpapi_main.c +++ b/dlls/httpapi/httpapi_main.c @@ -771,3 +771,26 @@ ULONG WINAPI HttpSetRequestQueueProperty(HANDLE queue, HTTP_SERVER_PROPERTY prop queue, property, value, length, reserved1, reserved2); return ERROR_CALL_NOT_IMPLEMENTED; } + +/*********************************************************************** + * HttpSetServerSessionProperty (HTTPAPI.@) + */ +ULONG WINAPI HttpSetServerSessionProperty(HTTP_SERVER_SESSION_ID id, + HTTP_SERVER_PROPERTY property, void *value, ULONG length) +{ + TRACE("id %s, property %u, value %p, length %u.\n", + wine_dbgstr_longlong(id), property, value, length); + + switch (property) + { + case HttpServerQosProperty: + { + const HTTP_QOS_SETTING_INFO *info = value; + FIXME("Ignoring QoS setting %u.\n", info->QosType); + return ERROR_SUCCESS; + } + default: + FIXME("Unhandled property %u.\n", property); + return ERROR_CALL_NOT_IMPLEMENTED; + } +} diff --git a/include/http.h b/include/http.h index f569c1ecb5..3ab57f70bf 100644 --- a/include/http.h +++ b/include/http.h @@ -429,6 +429,39 @@ typedef struct _HTTP_BINDING_INFO HANDLE RequestQueueHandle; } HTTP_BINDING_INFO, *PHTTP_BINDING_INFO;
+typedef enum _HTTP_QOS_SETTING_TYPE +{ + HttpQosSettingTypeBandwidth, + HttpQosSettingTypeConnectionLimit, + HttpQosSettingTypeFlowRate, +} HTTP_QOS_SETTING_TYPE, *PHTTP_QOS_SETTING_TYPE; + +typedef struct _HTTP_BANDWIDTH_LIMIT_INFO +{ + HTTP_PROPERTY_FLAGS Flags; + ULONG MaxBandwidth; +} HTTP_BANDWIDTH_LIMIT_INFO, *PHTTP_BANDWIDTH_LIMIT_INFO; + +typedef struct _HTTP_CONNECTION_LIMIT_INFO +{ + HTTP_PROPERTY_FLAGS Flags; + ULONG MaxConnections; +} HTTP_CONNECTION_LIMIT_INFO, *PHTTP_CONNECTION_LIMIT_INFO; + +typedef struct _HTTP_FLOWRATE_INFO +{ + HTTP_PROPERTY_FLAGS Flags; + ULONG MaxBandwidth; + ULONG MaxPeakBandwidth; + ULONG BurstSize; +} HTTP_FLOWRATE_INFO, *PHTTP_FLOWRATE_INFO; + +typedef struct _HTTP_QOS_SETTING_INFO +{ + HTTP_QOS_SETTING_TYPE QosType; + void *QosSetting; +} HTTP_QOS_SETTING_INFO, *PHTTP_QOS_SETTING_INFO; + ULONG WINAPI HttpAddUrl(HANDLE,PCWSTR,PVOID); ULONG WINAPI HttpAddUrlToUrlGroup(HTTP_URL_GROUP_ID id, const WCHAR *url, HTTP_URL_CONTEXT context, ULONG reserved); ULONG WINAPI HttpCloseRequestQueue(HANDLE handle); @@ -448,6 +481,7 @@ ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *url); ULONG WINAPI HttpRemoveUrlFromUrlGroup(HTTP_URL_GROUP_ID id, const WCHAR *url, ULONG flags); ULONG WINAPI HttpSendHttpResponse(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, HTTP_RESPONSE *response, HTTP_CACHE_POLICY *cache_policy, ULONG *ret_size, void *reserved1, ULONG reserved2, OVERLAPPED *ovl, HTTP_LOG_DATA *log_data); ULONG WINAPI HttpSetRequestQueueProperty(HANDLE queue, HTTP_SERVER_PROPERTY property, void *value, ULONG length, ULONG reserved1, void *reserved2); +ULONG WINAPI HttpSetServerSessionProperty(HTTP_SERVER_SESSION_ID id, HTTP_SERVER_PROPERTY property, void *value, ULONG size); ULONG WINAPI HttpSetServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,LPOVERLAPPED); ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY property, void *value, ULONG length);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/httpapi/httpapi_main.c | 21 ++++++++++++++------- dlls/httpapi/tests/httpapi.c | 11 +++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c index 6143214346..9904ed18db 100644 --- a/dlls/httpapi/httpapi_main.c +++ b/dlls/httpapi/httpapi_main.c @@ -304,13 +304,17 @@ ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULON ovl = &sync_ovl; }
- if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_BODY, ¶ms, sizeof(params), buffer, size, NULL, ovl)) + if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_BODY, ¶ms, sizeof(params), buffer, size, ret_size, ovl)) ret = GetLastError();
if (ovl == &sync_ovl) { - if (!GetOverlappedResult(queue, ovl, ret_size, TRUE)) - ret = GetLastError(); + if (ret == ERROR_IO_PENDING) + { + ret = ERROR_SUCCESS; + if (!GetOverlappedResult(queue, ovl, ret_size, TRUE)) + ret = GetLastError(); + } CloseHandle(sync_ovl.hEvent); }
@@ -348,14 +352,17 @@ ULONG WINAPI HttpReceiveHttpRequest(HANDLE queue, HTTP_REQUEST_ID id, ULONG flag ovl = &sync_ovl; }
- if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_REQUEST, ¶ms, sizeof(params), request, size, NULL, ovl)) + if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_REQUEST, ¶ms, sizeof(params), request, size, ret_size, ovl)) ret = GetLastError();
if (ovl == &sync_ovl) { - ret = ERROR_SUCCESS; - if (!GetOverlappedResult(queue, ovl, ret_size, TRUE)) - ret = GetLastError(); + if (ret == ERROR_IO_PENDING) + { + ret = ERROR_SUCCESS; + if (!GetOverlappedResult(queue, ovl, ret_size, TRUE)) + ret = GetLastError(); + } CloseHandle(sync_ovl.hEvent); }
diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c index 252a712a96..01d8e4fffc 100644 --- a/dlls/httpapi/tests/httpapi.c +++ b/dlls/httpapi/tests/httpapi.c @@ -188,6 +188,10 @@ static void test_v1_server(void) ret = CloseHandle(queue2); ok(ret, "Failed to close queue handle, error %u.\n", GetLastError());
+ ret_size = 0xdeadbeef; + ret = HttpReceiveHttpRequest(NULL, HTTP_NULL_ID, 0, (HTTP_REQUEST *)req, sizeof(req_buffer), &ret_size, NULL); + ok(ret == ERROR_INVALID_HANDLE, "Got error %u.\n", ret); + ok(!ret_size, "Got size %u.\n", ret_size); ret = HttpReceiveHttpRequest(NULL, HTTP_NULL_ID, 0, (HTTP_REQUEST *)req, sizeof(req_buffer), NULL, &ovl); ok(ret == ERROR_INVALID_HANDLE, "Got error %u.\n", ret); ret = HttpReceiveHttpRequest(queue, 0xdeadbeef, 0, (HTTP_REQUEST *)req, sizeof(req_buffer), NULL, &ovl); @@ -791,6 +795,13 @@ static void test_v1_entity_body(void)
/* Test HttpReceiveRequestEntityBody(). */
+ ret_size = 0xdeadbeef; + ret = HttpReceiveRequestEntityBody(NULL, HTTP_NULL_ID, 0, recv_body, sizeof(recv_body), &ret_size, NULL); + ok(ret == ERROR_INVALID_HANDLE, "Got error %u.\n", ret); + ok(!ret_size, "Got size %u.\n", ret_size); + ret = HttpReceiveRequestEntityBody(NULL, HTTP_NULL_ID, 0, recv_body, sizeof(recv_body), NULL, &ovl); + ok(ret == ERROR_INVALID_HANDLE, "Got error %u.\n", ret); + sprintf(req_text, post_req, port); ret = send(s, req_text, strlen(req_text) + 1, 0); ok(ret == strlen(req_text) + 1, "send() returned %d.\n", ret);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=66020
Your paranoid android.
=== wxppro (32 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
=== w2008s64 (32 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
=== w8 (32 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
=== w8adm (32 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
=== w864 (32 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
=== w2008s64 (64 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
=== w864 (64 bit report) ===
httpapi: httpapi.c:194: Test failed: Got size 3735928559. httpapi.c:779: Test failed: Got size 3735928559.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48530 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/httpapi/httpapi_main.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c index 9904ed18db..6be4d11d35 100644 --- a/dlls/httpapi/httpapi_main.c +++ b/dlls/httpapi/httpapi_main.c @@ -657,25 +657,29 @@ ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID id) ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY property, void *value, ULONG length) { struct url_group *group = get_url_group(id); - const HTTP_BINDING_INFO *info = value;
TRACE("id %s, property %u, value %p, length %u.\n", wine_dbgstr_longlong(id), property, value, length);
- if (property != HttpServerBindingProperty) + switch (property) { - FIXME("Unhandled property %u.\n", property); - return ERROR_CALL_NOT_IMPLEMENTED; - } - - TRACE("Binding to queue %p.\n", info->RequestQueueHandle); - - group->queue = info->RequestQueueHandle; - - if (group->url) - add_url(group->queue, group->url, group->context); + case HttpServerBindingProperty: + { + const HTTP_BINDING_INFO *info = value;
- return ERROR_SUCCESS; + TRACE("Binding to queue %p.\n", info->RequestQueueHandle); + group->queue = info->RequestQueueHandle; + if (group->url) + add_url(group->queue, group->url, group->context); + return ERROR_SUCCESS; + } + case HttpServerLoggingProperty: + WARN("Ignoring logging property.\n"); + return ERROR_SUCCESS; + default: + FIXME("Unhandled property %u.\n", property); + return ERROR_CALL_NOT_IMPLEMENTED; + } }
/***********************************************************************