Commit 8e307b2e authored by Julian Klemann's avatar Julian Klemann Committed by Alexandre Julliard

http.sys: Do not add URLs with query parameters to queue.

parent 296852b2
......@@ -729,6 +729,8 @@ static NTSTATUS http_add_url(struct request_queue *queue, IRP *irp)
return STATUS_INVALID_PARAMETER;
if (!(addr.sin_port = htons(strtol(strchr(params->url + 7, ':') + 1, &endptr, 10))) || *endptr != '/')
return STATUS_INVALID_PARAMETER;
if (strchr(params->url, '?'))
return STATUS_INVALID_PARAMETER;
if (!(url = malloc(strlen(params->url)+1)))
return STATUS_NO_MEMORY;
......
......@@ -1210,6 +1210,10 @@ static void test_v1_relative_urls(void)
ret = HttpAddUrl(queue2, url2, NULL);
ok(ret == ERROR_ALREADY_EXISTS, "Got error %u.\n", ret);
swprintf(url2, ARRAY_SIZE(url2), L"http://localhost:%u/barfoo?a=b", port);
ret = HttpAddUrl(queue2, url2, NULL);
ok(ret == ERROR_INVALID_PARAMETER, "Got error %u.\n", ret);
ret = CloseHandle(queue);
ok(ret, "Failed to close queue handle, error %lu.\n", GetLastError());
ret = CloseHandle(queue2);
......
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