|
|
@@ -6664,7 +6664,14 @@ TEST_F(ServerTest, GetMethodDirMountWithoutTrailingSlash) {
|
|
|
auto res = cli_.Get("/mount/dir");
|
|
|
ASSERT_TRUE(res) << "Error: " << to_string(res.error());
|
|
|
EXPECT_EQ(StatusCode::MovedPermanently_301, res->status);
|
|
|
- EXPECT_EQ("/mount/dir/", res->get_header_value("Location"));
|
|
|
+ EXPECT_EQ("./dir/", res->get_header_value("Location"));
|
|
|
+}
|
|
|
+
|
|
|
+TEST_F(ServerTest, GetMethodDirWithLeadingDoubleSlash) {
|
|
|
+ auto res = cli_.Get("//dir");
|
|
|
+ ASSERT_TRUE(res) << "Error: " << to_string(res.error());
|
|
|
+ EXPECT_EQ(StatusCode::MovedPermanently_301, res->status);
|
|
|
+ EXPECT_EQ("./dir/", res->get_header_value("Location"));
|
|
|
}
|
|
|
|
|
|
TEST_F(ServerTest, PostMethod303) {
|