2019-02-18 13:30:42 -08:00
|
|
|
From 81d946aef87b60fa5a013eda5656c10726c5bd0a Mon Sep 17 00:00:00 2001
|
2019-01-29 21:34:25 -08:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Wed, 30 Jan 2019 16:23:25 +1100
|
|
|
|
Subject: [PATCH] httpapi: Fake success from HttpCreateServerSession
|
|
|
|
|
|
|
|
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46549
|
|
|
|
---
|
2019-02-18 13:30:42 -08:00
|
|
|
dlls/httpapi/httpapi_main.c | 10 +++++++++-
|
|
|
|
dlls/httpapi/tests/httpapi.c | 10 +++++-----
|
|
|
|
2 files changed, 14 insertions(+), 6 deletions(-)
|
2019-01-29 21:34:25 -08:00
|
|
|
|
|
|
|
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c
|
2019-02-18 13:30:42 -08:00
|
|
|
index 3ab03995e4..44e72c6f41 100644
|
2019-01-29 21:34:25 -08:00
|
|
|
--- a/dlls/httpapi/httpapi_main.c
|
|
|
|
+++ b/dlls/httpapi/httpapi_main.c
|
2019-02-18 13:30:42 -08:00
|
|
|
@@ -190,7 +190,15 @@ ULONG WINAPI HttpAddUrl( HANDLE handle, PCWSTR url, PVOID reserved )
|
2019-01-29 21:34:25 -08:00
|
|
|
ULONG WINAPI HttpCreateServerSession( HTTPAPI_VERSION version, HTTP_SERVER_SESSION_ID *id, ULONG reserved )
|
|
|
|
{
|
|
|
|
FIXME( "({%d,%d}, %p, %d): stub!\n", version.HttpApiMajorVersion, version.HttpApiMinorVersion, id, reserved );
|
|
|
|
- return ERROR_ACCESS_DENIED;
|
|
|
|
+
|
2019-02-18 13:30:42 -08:00
|
|
|
+ if(!id || reserved)
|
2019-01-29 21:34:25 -08:00
|
|
|
+ return ERROR_INVALID_PARAMETER;
|
2019-02-18 13:30:42 -08:00
|
|
|
+ if((version.HttpApiMajorVersion != 1 && version.HttpApiMajorVersion != 2) || version.HttpApiMinorVersion != 0)
|
2019-01-29 21:34:25 -08:00
|
|
|
+ return ERROR_REVISION_MISMATCH;
|
|
|
|
+
|
|
|
|
+ *id = 0xabcdefff;
|
|
|
|
+
|
|
|
|
+ return NO_ERROR;
|
|
|
|
}
|
2019-02-18 13:30:42 -08:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c
|
|
|
|
index e1437552a8..e090390b89 100644
|
|
|
|
--- a/dlls/httpapi/tests/httpapi.c
|
|
|
|
+++ b/dlls/httpapi/tests/httpapi.c
|
|
|
|
@@ -92,25 +92,26 @@ static void test_HttpCreateServerSession(void)
|
|
|
|
version.HttpApiMajorVersion = 1;
|
|
|
|
version.HttpApiMinorVersion = 0;
|
|
|
|
ret = pHttpCreateServerSession(version, NULL, 0);
|
|
|
|
-todo_wine
|
|
|
|
+ ok(ret == ERROR_INVALID_PARAMETER, "Unexpected return value %u.\n", ret);
|
|
|
|
+
|
|
|
|
+ version.HttpApiMajorVersion = 1;
|
|
|
|
+ version.HttpApiMinorVersion = 0;
|
|
|
|
+ ret = pHttpCreateServerSession(version, &session, 1);
|
|
|
|
ok(ret == ERROR_INVALID_PARAMETER, "Unexpected return value %u.\n", ret);
|
|
|
|
|
|
|
|
version.HttpApiMajorVersion = 1;
|
|
|
|
version.HttpApiMinorVersion = 1;
|
|
|
|
ret = pHttpCreateServerSession(version, &session, 0);
|
|
|
|
-todo_wine
|
|
|
|
ok(ret == ERROR_REVISION_MISMATCH, "Unexpected return value %u.\n", ret);
|
|
|
|
|
|
|
|
version.HttpApiMajorVersion = 3;
|
|
|
|
version.HttpApiMinorVersion = 0;
|
|
|
|
ret = pHttpCreateServerSession(version, &session, 0);
|
|
|
|
-todo_wine
|
|
|
|
ok(ret == ERROR_REVISION_MISMATCH, "Unexpected return value %u.\n", ret);
|
|
|
|
|
|
|
|
version.HttpApiMajorVersion = 2;
|
|
|
|
version.HttpApiMinorVersion = 0;
|
|
|
|
ret = pHttpCreateServerSession(version, &session, 0);
|
|
|
|
-todo_wine
|
|
|
|
ok(!ret, "Unexpected return value %u.\n", ret);
|
|
|
|
ret = pHttpCloseServerSession(session);
|
|
|
|
todo_wine
|
|
|
|
@@ -119,7 +120,6 @@ todo_wine
|
|
|
|
version.HttpApiMajorVersion = 1;
|
|
|
|
version.HttpApiMinorVersion = 0;
|
|
|
|
ret = pHttpCreateServerSession(version, &session, 0);
|
|
|
|
-todo_wine
|
|
|
|
ok(!ret, "Unexpected return value %u.\n", ret);
|
|
|
|
ret = pHttpCloseServerSession(session);
|
|
|
|
todo_wine
|
2019-01-29 21:34:25 -08:00
|
|
|
--
|
|
|
|
2.20.1
|
|
|
|
|