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=="))
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;
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");
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);