|
|
@@ -6660,6 +6660,13 @@ TEST_F(ServerTest, GetMethodOutOfBaseDirMountWithBackslash) {
|
|
|
EXPECT_EQ(StatusCode::NotFound_404, res->status);
|
|
|
}
|
|
|
|
|
|
+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"));
|
|
|
+}
|
|
|
+
|
|
|
TEST_F(ServerTest, PostMethod303) {
|
|
|
auto res = cli_.Post("/1", "body", "text/plain");
|
|
|
ASSERT_TRUE(res) << "Error: " << to_string(res.error());
|