winhttp(10/12): Allow full path in addition to relative path in headers to accomodate proxy servers
Juan Lang
juan.lang at gmail.com
Mon Jul 13 15:11:41 CDT 2009
--Juan
-------------- next part --------------
From 15c54ae54993492d3d668c9d651a65ccc005ce51 Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Mon, 13 Jul 2009 09:22:44 -0700
Subject: [PATCH 10/12] Allow full path in addition to relative path in headers to accomodate proxy servers
---
dlls/winhttp/tests/winhttp.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 74e1c9a..a0c8ff2 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -342,6 +342,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};
@@ -475,7 +477,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");
@@ -502,7 +505,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 */
--
1.6.3.2
More information about the wine-patches
mailing list