Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f18e026e
Commit
f18e026e
authored
Aug 29, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpapi: Implement HttpAddUrlToUrlGroup() and HttpRemoveUrlFromUrlGroup().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f0458b21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
9 deletions
+82
-9
httpapi.spec
dlls/httpapi/httpapi.spec
+2
-0
httpapi_main.c
dlls/httpapi/httpapi_main.c
+78
-9
http.h
include/http.h
+2
-0
No files found.
dlls/httpapi/httpapi.spec
View file @
f18e026e
@ stub HttpAddFragmentToCache
@ stdcall HttpAddUrl(ptr wstr ptr)
@ stub HttpAddUrlToConfigGroup
@ stdcall HttpAddUrlToUrlGroup(int64 wstr int64 long)
@ stub HttpCancelHttpRequest
@ stub HttpCreateAppPool
@ stub HttpCreateConfigGroup
...
...
@@ -40,6 +41,7 @@
@ 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
...
...
dlls/httpapi/httpapi_main.c
View file @
f18e026e
...
...
@@ -27,6 +27,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
httpapi
);
static
WCHAR
*
heap_strdupW
(
const
WCHAR
*
str
)
{
int
len
=
wcslen
(
str
)
+
1
;
WCHAR
*
ret
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
wcscpy
(
ret
,
str
);
return
ret
;
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
lpv
)
{
switch
(
reason
)
...
...
@@ -247,21 +255,13 @@ ULONG WINAPI HttpAddUrl(HANDLE queue, const WCHAR *url, void *reserved)
return
add_url
(
queue
,
url
,
0
);
}
/***********************************************************************
* HttpRemoveUrl (HTTPAPI.@)
*/
ULONG
WINAPI
HttpRemoveUrl
(
HANDLE
queue
,
const
WCHAR
*
urlW
)
static
ULONG
remove_url
(
HANDLE
queue
,
const
WCHAR
*
urlW
)
{
ULONG
ret
=
ERROR_SUCCESS
;
OVERLAPPED
ovl
=
{};
char
*
url
;
int
len
;
TRACE
(
"queue %p, url %s.
\n
"
,
queue
,
debugstr_w
(
urlW
));
if
(
!
queue
)
return
ERROR_INVALID_PARAMETER
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
urlW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
url
=
heap_alloc
(
len
)))
return
ERROR_OUTOFMEMORY
;
...
...
@@ -277,6 +277,19 @@ ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *urlW)
}
/***********************************************************************
* HttpRemoveUrl (HTTPAPI.@)
*/
ULONG
WINAPI
HttpRemoveUrl
(
HANDLE
queue
,
const
WCHAR
*
url
)
{
TRACE
(
"queue %p, url %s.
\n
"
,
queue
,
debugstr_w
(
url
));
if
(
!
queue
)
return
ERROR_INVALID_PARAMETER
;
return
remove_url
(
queue
,
url
);
}
/***********************************************************************
* HttpReceiveHttpRequest (HTTPAPI.@)
*/
ULONG
WINAPI
HttpReceiveHttpRequest
(
HANDLE
queue
,
HTTP_REQUEST_ID
id
,
ULONG
flags
,
...
...
@@ -475,6 +488,8 @@ struct url_group
{
struct
list
entry
,
session_entry
;
HANDLE
queue
;
WCHAR
*
url
;
HTTP_URL_CONTEXT
context
;
};
static
struct
list
url_groups
=
LIST_INIT
(
url_groups
);
...
...
@@ -622,5 +637,59 @@ ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY
group
->
queue
=
info
->
RequestQueueHandle
;
if
(
group
->
url
)
add_url
(
group
->
queue
,
group
->
url
,
group
->
context
);
return
ERROR_SUCCESS
;
}
/***********************************************************************
* HttpAddUrlToUrlGroup (HTTPAPI.@)
*/
ULONG
WINAPI
HttpAddUrlToUrlGroup
(
HTTP_URL_GROUP_ID
id
,
const
WCHAR
*
url
,
HTTP_URL_CONTEXT
context
,
ULONG
reserved
)
{
struct
url_group
*
group
=
get_url_group
(
id
);
TRACE
(
"id %s, url %s, context %s, reserved %#x.
\n
"
,
wine_dbgstr_longlong
(
id
),
debugstr_w
(
url
),
wine_dbgstr_longlong
(
context
),
reserved
);
if
(
group
->
url
)
{
FIXME
(
"Multiple URLs are not handled!
\n
"
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
if
(
!
(
group
->
url
=
heap_strdupW
(
url
)))
return
ERROR_OUTOFMEMORY
;
group
->
context
=
context
;
if
(
group
->
queue
)
return
add_url
(
group
->
queue
,
url
,
context
);
return
ERROR_SUCCESS
;
}
/***********************************************************************
* HttpRemoveUrlFromUrlGroup (HTTPAPI.@)
*/
ULONG
WINAPI
HttpRemoveUrlFromUrlGroup
(
HTTP_URL_GROUP_ID
id
,
const
WCHAR
*
url
,
ULONG
flags
)
{
struct
url_group
*
group
=
get_url_group
(
id
);
TRACE
(
"id %s, url %s, flags %#x.
\n
"
,
wine_dbgstr_longlong
(
id
),
debugstr_w
(
url
),
flags
);
if
(
!
group
->
url
)
return
ERROR_FILE_NOT_FOUND
;
if
(
flags
)
FIXME
(
"Ignoring flags %#x.
\n
"
,
flags
);
heap_free
(
group
->
url
);
group
->
url
=
NULL
;
if
(
group
->
queue
)
return
remove_url
(
group
->
queue
,
url
);
return
ERROR_SUCCESS
;
}
include/http.h
View file @
f18e026e
...
...
@@ -425,6 +425,7 @@ typedef struct _HTTP_BINDING_INFO
}
HTTP_BINDING_INFO
,
*
PHTTP_BINDING_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
HttpCloseServerSession
(
HTTP_SERVER_SESSION_ID
id
);
ULONG
WINAPI
HttpCloseUrlGroup
(
HTTP_URL_GROUP_ID
id
);
ULONG
WINAPI
HttpCreateHttpHandle
(
PHANDLE
,
ULONG
);
...
...
@@ -436,6 +437,7 @@ ULONG WINAPI HttpTerminate(ULONG flags, void *reserved);
ULONG
WINAPI
HttpQueryServiceConfiguration
(
HANDLE
,
HTTP_SERVICE_CONFIG_ID
,
PVOID
,
ULONG
,
PVOID
,
ULONG
,
PULONG
,
LPOVERLAPPED
);
ULONG
WINAPI
HttpReceiveHttpRequest
(
HANDLE
queue
,
HTTP_REQUEST_ID
id
,
ULONG
flags
,
HTTP_REQUEST
*
request
,
ULONG
size
,
ULONG
*
ret_size
,
OVERLAPPED
*
ovl
);
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
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment