winhttp: Allow full path in addition to relative path in headers to accomodate proxy servers.
This commit is contained in:
parent
31545206fb
commit
5c24a1c824
|
@ -343,6 +343,8 @@ static void test_WinHttpAddHeaders(void)
|
|||
|
||||
static const WCHAR test_header_begin[] =
|
||||
{'P','O','S','T',' ','/','p','o','s','t','t','e','s','t','.','p','h','p',' ','H','T','T','P','/','1'};
|
||||
static const WCHAR full_path_test_header_begin[] =
|
||||
{'P','O','S','T',' ','h','t','t','p',':','/','/','c','r','o','s','s','o','v','e','r','.','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m',':','8','0','/','p','o','s','t','t','e','s','t','.','p','h','p',' ','H','T','T','P','/','1'};
|
||||
static const WCHAR test_header_end[] = {'\r','\n','\r','\n',0};
|
||||
static const WCHAR test_header_name[] = {'W','a','r','n','i','n','g',0};
|
||||
|
||||
|
@ -476,7 +478,8 @@ static void test_WinHttpAddHeaders(void)
|
|||
ok(len + sizeof(WCHAR) <= oldlen, "WinHttpQueryHeaders resulting length longer than advertized.\n");
|
||||
ok((len < sizeof(buffer) - sizeof(WCHAR)) && buffer[len / sizeof(WCHAR)] == 0, "WinHttpQueryHeaders did not append NULL terminator\n");
|
||||
ok(len == lstrlenW(buffer) * sizeof(WCHAR), "WinHttpQueryHeaders returned incorrect length.\n");
|
||||
ok(memcmp(buffer, test_header_begin, sizeof(test_header_begin)) == 0,
|
||||
ok(memcmp(buffer, test_header_begin, sizeof(test_header_begin)) == 0 ||
|
||||
memcmp(buffer, full_path_test_header_begin, sizeof(full_path_test_header_begin)) == 0,
|
||||
"WinHttpQueryHeaders returned invalid beginning of header string.\n");
|
||||
ok(memcmp(buffer + lstrlenW(buffer) - 4, test_header_end, sizeof(test_header_end)) == 0,
|
||||
"WinHttpQueryHeaders returned invalid end of header string.\n");
|
||||
|
@ -503,7 +506,9 @@ static void test_WinHttpAddHeaders(void)
|
|||
ok(len + sizeof(WCHAR) <= oldlen, "resulting length longer than advertized\n");
|
||||
ok((len < sizeof(buffer) - sizeof(WCHAR)) && !buffer[len / sizeof(WCHAR)] && !buffer[len / sizeof(WCHAR) - 1],
|
||||
"no double NULL terminator\n");
|
||||
ok(!memcmp(buffer, test_header_begin, sizeof(test_header_begin)), "invalid beginning of header string\n");
|
||||
ok(memcmp(buffer, test_header_begin, sizeof(test_header_begin)) == 0 ||
|
||||
memcmp(buffer, full_path_test_header_begin, sizeof(full_path_test_header_begin)) == 0,
|
||||
"invalid beginning of header string.\n");
|
||||
ok(index == 0, "header index was incremented\n");
|
||||
|
||||
/* tests for more indices */
|
||||
|
|
Loading…
Reference in New Issue