Juan Lang : winhttp: Allow full path in addition to relative path in headers to accomodate proxy servers .

Alexandre Julliard julliard at winehq.org
Wed Jul 15 09:47:10 CDT 2009


Module: wine
Branch: master
Commit: 5c24a1c824be04ac7684ff77c40e6255c7318629
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5c24a1c824be04ac7684ff77c40e6255c7318629

Author: Juan Lang <juan.lang at gmail.com>
Date:   Tue Jul 14 13:04:20 2009 -0700

winhttp: 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 5a1db48..78c4777 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -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 */




More information about the wine-cvs mailing list