Commit c9f62804 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

httpapi: Allow passing NULL size to HttpReceiveRequestEntityBody().

parent d1d37e40
...@@ -278,6 +278,7 @@ ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULON ...@@ -278,6 +278,7 @@ ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULON
.bits = sizeof(void *) * 8, .bits = sizeof(void *) * 8,
}; };
ULONG ret = ERROR_SUCCESS; ULONG ret = ERROR_SUCCESS;
ULONG local_ret_size;
OVERLAPPED sync_ovl; OVERLAPPED sync_ovl;
TRACE("queue %p, id %s, flags %#lx, buffer %p, size %#lx, ret_size %p, ovl %p.\n", TRACE("queue %p, id %s, flags %#lx, buffer %p, size %#lx, ret_size %p, ovl %p.\n",
...@@ -292,6 +293,9 @@ ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULON ...@@ -292,6 +293,9 @@ ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULON
ovl = &sync_ovl; ovl = &sync_ovl;
} }
if (!ret_size)
ret_size = &local_ret_size;
if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_BODY, &params, sizeof(params), buffer, size, ret_size, ovl)) if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_BODY, &params, sizeof(params), buffer, size, ret_size, ovl))
ret = GetLastError(); ret = GetLastError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment