Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/http.sys/http.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 7690867fcd6..1c4dd12d69c 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -279,6 +279,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
if (conn->unk_verb_len) irp_size += conn->unk_verb_len + 1; + irp_size += conn->url_len + 1;
TRACE("Need %u bytes, have %u.\n", irp_size, output_len); irp->IoStatus.Information = irp_size; @@ -312,6 +313,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) req->Version = conn->version; req->Verb = conn->verb; req->UnknownVerbLength = conn->unk_verb_len; + req->RawUrlLength = conn->url_len;
if (conn->unk_verb_len) { @@ -321,6 +323,11 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) buffer[offset++] = 0; }
+ req->pRawUrl = params.addr + offset; + memcpy(buffer + offset, conn->url, conn->url_len); + offset += conn->url_len; + buffer[offset++] = 0; + req->BytesReceived = conn->req_len; } else @@ -335,6 +342,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) req->Version = conn->version; req->Verb = conn->verb; req->UnknownVerbLength = conn->unk_verb_len; + req->RawUrlLength = conn->url_len;
if (conn->unk_verb_len) { @@ -344,6 +352,11 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) buffer[offset++] = 0; }
+ req->pRawUrl = params.addr + offset; + memcpy(buffer + offset, conn->url, conn->url_len); + offset += conn->url_len; + buffer[offset++] = 0; + req->BytesReceived = conn->req_len; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/http.sys/http.c | 70 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-)
diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 1c4dd12d69c..120866953b1 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -266,12 +266,14 @@ static int parse_token(const char *str, const char *end)
static NTSTATUS complete_irp(struct connection *conn, IRP *irp) { + static const WCHAR httpW[] = {'h','t','t','p',':','/','/'}; const struct http_receive_request_params params = *(struct http_receive_request_params *)irp->AssociatedIrp.SystemBuffer; DWORD irp_size = (params.bits == 32) ? sizeof(struct http_request_32) : sizeof(struct http_request_64); IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); const DWORD output_len = stack->Parameters.DeviceIoControl.OutputBufferLength; - ULONG offset; + ULONG cooked_len, host_len, abs_path_len, query_len, offset; + const char *p, *host, *abs_path, *query;
TRACE("Completing IRP %p.\n", irp);
@@ -281,6 +283,32 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) irp_size += conn->unk_verb_len + 1; irp_size += conn->url_len + 1;
+ /* cooked URL */ + if (conn->url[0] == '/') + { + p = host = conn->host; + while (isgraph(*p)) ++p; + host_len = p - conn->host; + abs_path = conn->url; + abs_path_len = conn->url_len; + } + else + { + host = conn->url + 7; + abs_path = strchr(host, '/'); + host_len = abs_path - host; + abs_path_len = (conn->url + conn->url_len) - abs_path; + } + if ((query = memchr(abs_path, '?', abs_path_len))) + { + query_len = (abs_path + abs_path_len) - query; + abs_path_len = query - abs_path; + } + else + query_len = 0; + cooked_len = (7 /* scheme */ + host_len + abs_path_len + query_len) * sizeof(WCHAR); + irp_size += cooked_len + sizeof(WCHAR); + TRACE("Need %u bytes, have %u.\n", irp_size, output_len); irp->IoStatus.Information = irp_size;
@@ -328,6 +356,26 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) offset += conn->url_len; buffer[offset++] = 0;
+ req->CookedUrl.FullUrlLength = cooked_len; + req->CookedUrl.HostLength = host_len * sizeof(WCHAR); + req->CookedUrl.AbsPathLength = abs_path_len * sizeof(WCHAR); + req->CookedUrl.QueryStringLength = query_len * sizeof(WCHAR); + req->CookedUrl.pFullUrl = params.addr + offset; + req->CookedUrl.pHost = req->CookedUrl.pFullUrl + 7 * sizeof(WCHAR); + req->CookedUrl.pAbsPath = req->CookedUrl.pHost + host_len * sizeof(WCHAR); + if (query) + req->CookedUrl.pQueryString = req->CookedUrl.pAbsPath + abs_path_len * sizeof(WCHAR); + + memcpy(buffer + offset, httpW, sizeof(httpW)); + offset += 7 * sizeof(WCHAR); + MultiByteToWideChar(CP_ACP, 0, host, host_len, (WCHAR *)(buffer + offset), host_len * sizeof(WCHAR)); + offset += host_len * sizeof(WCHAR); + MultiByteToWideChar(CP_ACP, 0, abs_path, abs_path_len + query_len, + (WCHAR *)(buffer + offset), (abs_path_len + query_len) * sizeof(WCHAR)); + offset += (abs_path_len + query_len) * sizeof(WCHAR); + buffer[offset++] = 0; + buffer[offset++] = 0; + req->BytesReceived = conn->req_len; } else @@ -357,6 +405,26 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) offset += conn->url_len; buffer[offset++] = 0;
+ req->CookedUrl.FullUrlLength = cooked_len; + req->CookedUrl.HostLength = host_len * sizeof(WCHAR); + req->CookedUrl.AbsPathLength = abs_path_len * sizeof(WCHAR); + req->CookedUrl.QueryStringLength = query_len * sizeof(WCHAR); + req->CookedUrl.pFullUrl = params.addr + offset; + req->CookedUrl.pHost = req->CookedUrl.pFullUrl + 7 * sizeof(WCHAR); + req->CookedUrl.pAbsPath = req->CookedUrl.pHost + host_len * sizeof(WCHAR); + if (query) + req->CookedUrl.pQueryString = req->CookedUrl.pAbsPath + abs_path_len * sizeof(WCHAR); + + memcpy(buffer + offset, httpW, sizeof(httpW)); + offset += 7 * sizeof(WCHAR); + MultiByteToWideChar(CP_ACP, 0, host, host_len, (WCHAR *)(buffer + offset), host_len * sizeof(WCHAR)); + offset += host_len * sizeof(WCHAR); + MultiByteToWideChar(CP_ACP, 0, abs_path, abs_path_len + query_len, + (WCHAR *)(buffer + offset), (abs_path_len + query_len) * sizeof(WCHAR)); + offset += (abs_path_len + query_len) * sizeof(WCHAR); + buffer[offset++] = 0; + buffer[offset++] = 0; + req->BytesReceived = conn->req_len; }
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=55858
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/http.sys/http.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 120866953b1..8c46282b57b 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -274,6 +274,8 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) const DWORD output_len = stack->Parameters.DeviceIoControl.OutputBufferLength; ULONG cooked_len, host_len, abs_path_len, query_len, offset; const char *p, *host, *abs_path, *query; + struct sockaddr_in addr; + int len;
TRACE("Completing IRP %p.\n", irp);
@@ -309,6 +311,9 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) cooked_len = (7 /* scheme */ + host_len + abs_path_len + query_len) * sizeof(WCHAR); irp_size += cooked_len + sizeof(WCHAR);
+ /* addresses */ + irp_size += 2 * sizeof(addr); + TRACE("Need %u bytes, have %u.\n", irp_size, output_len); irp->IoStatus.Information = irp_size;
@@ -376,6 +381,18 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) buffer[offset++] = 0; buffer[offset++] = 0;
+ req->Address.pRemoteAddress = params.addr + offset; + len = sizeof(addr); + getpeername(conn->socket, (struct sockaddr *)&addr, &len); + memcpy(buffer + offset, &addr, sizeof(addr)); + offset += sizeof(addr); + + req->Address.pLocalAddress = params.addr + offset; + len = sizeof(addr); + getsockname(conn->socket, (struct sockaddr *)&addr, &len); + memcpy(buffer + offset, &addr, sizeof(addr)); + offset += sizeof(addr); + req->BytesReceived = conn->req_len; } else @@ -425,6 +442,18 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) buffer[offset++] = 0; buffer[offset++] = 0;
+ req->Address.pRemoteAddress = params.addr + offset; + len = sizeof(addr); + getpeername(conn->socket, (struct sockaddr *)&addr, &len); + memcpy(buffer + offset, &addr, sizeof(addr)); + offset += sizeof(addr); + + req->Address.pLocalAddress = params.addr + offset; + len = sizeof(addr); + getsockname(conn->socket, (struct sockaddr *)&addr, &len); + memcpy(buffer + offset, &addr, sizeof(addr)); + offset += sizeof(addr); + req->BytesReceived = conn->req_len; }
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=55859
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 error: patch failed: dlls/http.sys/http.c:274 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 error: patch failed: dlls/http.sys/http.c:274 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/http.sys/http.c | 198 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 196 insertions(+), 2 deletions(-)
diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 8c46282b57b..2607af5a3d9 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -37,6 +37,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(http); * be consumed; httpapi has no opportunity to massage it. Since it contains * pointers, this is somewhat nontrivial. */
+struct http_unknown_header_32 +{ + USHORT NameLength; + USHORT RawValueLength; + ULONG pName; /* char string */ + ULONG pRawValue; /* char string */ +}; + struct http_request_32 { ULONG Flags; @@ -86,6 +94,14 @@ struct http_request_32 ULONG pRequestInfo; /* NULL (FIXME) */ };
+struct http_unknown_header_64 +{ + USHORT NameLength; + USHORT RawValueLength; + ULONGLONG pName; /* char string */ + ULONGLONG pRawValue; /* char string */ +}; + struct http_request_64 { ULONG Flags; @@ -264,6 +280,76 @@ static int parse_token(const char *str, const char *end) return p - str; }
+static HTTP_HEADER_ID parse_header_name(const char *header, int len) +{ + static const char *const headers[] = + { + "Cache-Control", + "Connection", + "Date", + "Keep-Alive", + "Pragma", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Via", + "Warning", + "Allow", + "Content-Length", + "Content-Type", + "Content-Encoding", + "Content-Language", + "Content-Location", + "Content-MD5", + "Content-Range", + "Expires", + "Last-Modified", + "Accept", + "Accept-Charset", + "Accept-Encoding", + "Accept-Language", + "Authorization", + "Cookie", + "Expect", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Max-Forwards", + "Proxy-Authorization", + "Referer", + "Range", + "TE", + "Translate", + "User-Agent", + }; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(headers); ++i) + { + if (!strncmp(header, headers[i], len)) + return i; + } + return HttpHeaderRequestMaximum; +} + +static void parse_header(const char *name, int *name_len, const char **value, int *value_len) +{ + const char *p = name; + *name_len = parse_token(name, NULL); + p += *name_len; + while (*p == ' ' || *p == '\t') ++p; + ++p; /* skip colon */ + while (*p == ' ' || *p == '\t') ++p; + *value = p; + while (isprint(*p) || *p == '\t') ++p; + while (isspace(*p)) --p; /* strip trailing LWS */ + *value_len = p - *value + 1; +} + static NTSTATUS complete_irp(struct connection *conn, IRP *irp) { static const WCHAR httpW[] = {'h','t','t','p',':','/','/'}; @@ -273,9 +359,10 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); const DWORD output_len = stack->Parameters.DeviceIoControl.OutputBufferLength; ULONG cooked_len, host_len, abs_path_len, query_len, offset; - const char *p, *host, *abs_path, *query; + const char *p, *name, *value, *host, *abs_path, *query; + USHORT unk_headers_count = 0, unk_header_idx; + int name_len, value_len, len; struct sockaddr_in addr; - int len;
TRACE("Completing IRP %p.\n", irp);
@@ -314,6 +401,27 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) /* addresses */ irp_size += 2 * sizeof(addr);
+ /* headers */ + p = strstr(conn->buffer, "\r\n") + 2; + while (memcmp(p, "\r\n", 2)) + { + name = p; + parse_header(name, &name_len, &value, &value_len); + if (parse_header_name(name, name_len) == HttpHeaderRequestMaximum) + { + irp_size += name_len + 1; + ++unk_headers_count; + } + irp_size += value_len + 1; + p = strstr(p, "\r\n") + 2; + } + p += 2; + + if (params.bits == 32) + irp_size += unk_headers_count * sizeof(struct http_unknown_header_32); + else + irp_size += unk_headers_count * sizeof(struct http_unknown_header_64); + TRACE("Need %u bytes, have %u.\n", irp_size, output_len); irp->IoStatus.Information = irp_size;
@@ -337,6 +445,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) if (params.bits == 32) { struct http_request_32 *req = irp->AssociatedIrp.SystemBuffer; + struct http_unknown_header_32 *unk_headers = NULL; char *buffer = irp->AssociatedIrp.SystemBuffer;
offset = sizeof(*req); @@ -393,11 +502,54 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) memcpy(buffer + offset, &addr, sizeof(addr)); offset += sizeof(addr);
+ req->Headers.UnknownHeaderCount = unk_headers_count; + if (unk_headers_count) + { + req->Headers.pUnknownHeaders = params.addr + offset; + unk_headers = (struct http_unknown_header_32 *)(buffer + offset); + offset += unk_headers_count * sizeof(*unk_headers); + } + + unk_header_idx = 0; + p = strstr(conn->buffer, "\r\n") + 2; + while (memcmp(p, "\r\n", 2)) + { + HTTP_HEADER_ID id; + + name = p; + parse_header(name, &name_len, &value, &value_len); + if ((id = parse_header_name(name, name_len)) == HttpHeaderRequestMaximum) + { + unk_headers[unk_header_idx].NameLength = name_len; + unk_headers[unk_header_idx].RawValueLength = value_len; + unk_headers[unk_header_idx].pName = params.addr + offset; + memcpy(buffer + offset, name, name_len); + offset += name_len; + buffer[offset++] = 0; + unk_headers[unk_header_idx].pRawValue = params.addr + offset; + memcpy(buffer + offset, value, value_len); + offset += value_len; + buffer[offset++] = 0; + ++unk_header_idx; + } + else + { + req->Headers.KnownHeaders[id].RawValueLength = value_len; + req->Headers.KnownHeaders[id].pRawValue = params.addr + offset; + memcpy(buffer + offset, value, value_len); + offset += value_len; + buffer[offset++] = 0; + } + p = strstr(p, "\r\n") + 2; + } + p += 2; + req->BytesReceived = conn->req_len; } else { struct http_request_64 *req = irp->AssociatedIrp.SystemBuffer; + struct http_unknown_header_64 *unk_headers = NULL; char *buffer = irp->AssociatedIrp.SystemBuffer;
offset = sizeof(*req); @@ -454,6 +606,48 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) memcpy(buffer + offset, &addr, sizeof(addr)); offset += sizeof(addr);
+ req->Headers.UnknownHeaderCount = unk_headers_count; + if (unk_headers_count) + { + req->Headers.pUnknownHeaders = params.addr + offset; + unk_headers = (struct http_unknown_header_64 *)(buffer + offset); + offset += unk_headers_count * sizeof(*unk_headers); + } + + unk_header_idx = 0; + p = strstr(conn->buffer, "\r\n") + 2; + while (memcmp(p, "\r\n", 2)) + { + HTTP_HEADER_ID id; + + name = p; + parse_header(name, &name_len, &value, &value_len); + if ((id = parse_header_name(name, name_len)) == HttpHeaderRequestMaximum) + { + unk_headers[unk_header_idx].NameLength = name_len; + unk_headers[unk_header_idx].RawValueLength = value_len; + unk_headers[unk_header_idx].pName = params.addr + offset; + memcpy(buffer + offset, name, name_len); + offset += name_len; + buffer[offset++] = 0; + unk_headers[unk_header_idx].pRawValue = params.addr + offset; + memcpy(buffer + offset, value, value_len); + offset += value_len; + buffer[offset++] = 0; + ++unk_header_idx; + } + else + { + req->Headers.KnownHeaders[id].RawValueLength = value_len; + req->Headers.KnownHeaders[id].pRawValue = params.addr + offset; + memcpy(buffer + offset, value, value_len); + offset += value_len; + buffer[offset++] = 0; + } + p = strstr(p, "\r\n") + 2; + } + p += 2; + req->BytesReceived = conn->req_len; }
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=55860
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 error: patch failed: dlls/http.sys/http.c:274 error: patch failed: dlls/http.sys/http.c:37 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 error: patch failed: dlls/http.sys/http.c:274 error: patch failed: dlls/http.sys/http.c:37 Task: Patch failed to apply
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/http.sys/http.c | 84 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-)
diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 2607af5a3d9..fe5363895f6 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -45,6 +45,26 @@ struct http_unknown_header_32 ULONG pRawValue; /* char string */ };
+struct http_data_chunk_32 +{ + HTTP_DATA_CHUNK_TYPE DataChunkType; + union + { + struct + { + ULONG pBuffer; /* char string */ + ULONG BufferLength; + } FromMemory; + /* for the struct size */ + struct + { + ULARGE_INTEGER StartingOffset; + ULARGE_INTEGER Length; + HANDLE FileHandle; + } FromFileHandle; + }; +}; + struct http_request_32 { ULONG Flags; @@ -102,6 +122,26 @@ struct http_unknown_header_64 ULONGLONG pRawValue; /* char string */ };
+struct http_data_chunk_64 +{ + HTTP_DATA_CHUNK_TYPE DataChunkType; + union + { + struct + { + ULONGLONG pBuffer; /* char string */ + ULONG BufferLength; + } FromMemory; + /* for the struct size */ + struct + { + ULARGE_INTEGER StartingOffset; + ULARGE_INTEGER Length; + HANDLE FileHandle; + } FromFileHandle; + }; +}; + struct http_request_64 { ULONG Flags; @@ -358,7 +398,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) DWORD irp_size = (params.bits == 32) ? sizeof(struct http_request_32) : sizeof(struct http_request_64); IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); const DWORD output_len = stack->Parameters.DeviceIoControl.OutputBufferLength; - ULONG cooked_len, host_len, abs_path_len, query_len, offset; + ULONG cooked_len, host_len, abs_path_len, query_len, chunk_len = 0, offset; const char *p, *name, *value, *host, *abs_path, *query; USHORT unk_headers_count = 0, unk_header_idx; int name_len, value_len, len; @@ -447,6 +487,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) struct http_request_32 *req = irp->AssociatedIrp.SystemBuffer; struct http_unknown_header_32 *unk_headers = NULL; char *buffer = irp->AssociatedIrp.SystemBuffer; + struct http_data_chunk_32 *chunk = NULL;
offset = sizeof(*req);
@@ -544,6 +585,26 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) } p += 2;
+ if (irp_size + sizeof(*chunk) < output_len && (params.flags & HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY)) + chunk_len = min(conn->content_len, output_len - (irp_size + sizeof(*chunk))); + if (chunk_len) + { + req->EntityChunkCount = 1; + req->pEntityChunks = params.addr + offset; + chunk = (struct http_data_chunk_32 *)(buffer + offset); + offset += sizeof(*chunk); + chunk->DataChunkType = HttpDataChunkFromMemory; + chunk->FromMemory.BufferLength = chunk_len; + chunk->FromMemory.pBuffer = params.addr + offset; + memcpy(buffer + offset, p, chunk_len); + offset += chunk_len; + + irp->IoStatus.Information = irp_size + sizeof(*chunk) + chunk_len; + } + + if (chunk_len < conn->content_len) + req->Flags |= HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS; + req->BytesReceived = conn->req_len; } else @@ -551,6 +612,7 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) struct http_request_64 *req = irp->AssociatedIrp.SystemBuffer; struct http_unknown_header_64 *unk_headers = NULL; char *buffer = irp->AssociatedIrp.SystemBuffer; + struct http_data_chunk_64 *chunk = NULL;
offset = sizeof(*req);
@@ -648,6 +710,26 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) } p += 2;
+ if (irp_size + sizeof(*chunk) < output_len && (params.flags & HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY)) + chunk_len = min(conn->content_len, output_len - (irp_size + sizeof(*chunk))); + if (chunk_len) + { + req->EntityChunkCount = 1; + req->pEntityChunks = params.addr + offset; + chunk = (struct http_data_chunk_64 *)(buffer + offset); + offset += sizeof(*chunk); + chunk->DataChunkType = HttpDataChunkFromMemory; + chunk->FromMemory.BufferLength = chunk_len; + chunk->FromMemory.pBuffer = params.addr + offset; + memcpy(buffer + offset, p, chunk_len); + offset += chunk_len; + + irp->IoStatus.Information = irp_size + sizeof(*chunk) + chunk_len; + } + + if (chunk_len < conn->content_len) + req->Flags |= HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS; + req->BytesReceived = conn->req_len; }
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=55861
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 error: patch failed: dlls/http.sys/http.c:274 error: patch failed: dlls/http.sys/http.c:37 error: patch failed: dlls/http.sys/http.c:45 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 error: patch failed: dlls/http.sys/http.c:266 error: patch failed: dlls/http.sys/http.c:274 error: patch failed: dlls/http.sys/http.c:37 error: patch failed: dlls/http.sys/http.c:45 Task: Patch failed to apply
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=55857
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/http.sys/http.c:279 Task: Patch failed to apply