Commit 01a83cde authored by Paul TBBle Hampson's avatar Paul TBBle Hampson Committed by Alexandre Julliard

wininet/tests: Test for handling of blank headers in HttpAddRequestHeaders.

parent 078989d4
......@@ -1274,6 +1274,17 @@ static void HttpHeaders_test(void)
strcpy(buffer,"Warning");
ok(HttpQueryInfo(hRequest,HTTP_QUERY_CUSTOM|HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer,&len,&index)==0,"Third Header Should Not Exist\n");
/* Ensure that blank headers are ignored and don't cause a failure */
todo_wine{
ok(HttpAddRequestHeaders(hRequest,"\r\nBlankTest:value\r\n\r\n",-1, HTTP_ADDREQ_FLAG_ADD_IF_NEW), "Failed to add header with blank entries in list\n");
index = 0;
len = sizeof(buffer);
strcpy(buffer,"BlankTest");
ok(HttpQueryInfo(hRequest,HTTP_QUERY_CUSTOM|HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer,&len,&index),"Unable to query header\n");
ok(index == 1, "Index was not incremented\n");
ok(strcmp(buffer,"value")==0, "incorrect string was returned(%s)\n",buffer);
}
ok(InternetCloseHandle(hRequest), "Close request handle failed\n");
done:
......
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