[WININET_WINETEST] Sync with Wine Staging 2.2. CORE-12823
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 28 Feb 2017 15:52:04 +0000 (15:52 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 28 Feb 2017 15:52:04 +0000 (15:52 +0000)
svn path=/trunk/; revision=74001

rostests/winetests/wininet/http.c
rostests/winetests/wininet/internet.c

index 741bd0c..8c63c80 100644 (file)
@@ -2468,6 +2468,10 @@ static DWORD CALLBACK server_thread(LPVOID param)
             send(c, okmsg, sizeof(okmsg)-1, 0);
             send(c, buffer, strlen(buffer), 0);
         }
+        if (strstr(buffer, "GET /test_remove_dot_segments"))
+        {
+            send(c, okmsg, sizeof(okmsg)-1, 0);
+        }
         if (strstr(buffer, "HEAD /test_auth_host1"))
         {
             if (strstr(buffer, "Authorization: Basic dGVzdDE6cGFzcw=="))
@@ -5133,6 +5137,20 @@ static void test_long_url(int port)
     close_request(&req);
 }
 
+static void test_remove_dot_segments(int port)
+{
+    test_request_t req;
+    BOOL ret;
+
+    open_simple_request(&req, "localhost", port, NULL, "/A/../B/./C/../../test_remove_dot_segments");
+
+    ret = HttpSendRequestA(req.request, NULL, 0, NULL, 0);
+    ok(ret, "HttpSendRequest failed: %u\n", GetLastError());
+    test_status_code(req.request, 200);
+
+    close_request(&req);
+}
+
 static void test_http_connection(void)
 {
     struct server_info si;
@@ -5184,6 +5202,7 @@ static void test_http_connection(void)
     test_async_read(si.port);
     test_http_read(si.port);
     test_long_url(si.port);
+    test_remove_dot_segments(si.port);
 
     /* send the basic request again to shutdown the server thread */
     test_basic_request(si.port, "GET", "/quit");
index a712a94..8a06be8 100644 (file)
@@ -1202,7 +1202,7 @@ static void test_end_browser_session(void)
     ok(len != 0, "len = 0\n");
 
     ret = InternetSetOptionA(NULL, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0);
-    ok(ret, "InternetSetOptio(INTERNET_OPTION_END_BROWSER_SESSION) failed: %u\n", GetLastError());
+    ok(ret, "InternetSetOption(INTERNET_OPTION_END_BROWSER_SESSION) failed: %u\n", GetLastError());
 
     len = 1024;
     ret = InternetGetCookieA("http://www.example.com/test_end", NULL, NULL, &len);