mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-24 09:59:24 -04:00
Testing of redirection to URLs with special symbols
This commit is contained in:
1 parent
497c0700b5
commit
78b2c1a273
5 files changed
+24
No files matched your search
@@ -1196,6 +1196,17 @@ TEST_F(ServerTest, NonEndpointUrlsAreRedirectedToContentUrls)
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ServerTest, RedirectionsToURLsWithSpecialSymbols)
|
||||
{
|
||||
auto g = zfs1_->GET("/ROOT/content/corner_cases/wtf.html");
|
||||
ASSERT_EQ(302, g->status);
|
||||
ASSERT_TRUE(g->has_header("Location"));
|
||||
ASSERT_EQ(g->get_header_value("Location"), "/ROOT/content/corner_cases/wtf?.html");
|
||||
ASSERT_EQ(getCacheControlHeader(*g), "max-age=0, must-revalidate");
|
||||
ASSERT_FALSE(g->has_header("ETag"));
|
||||
}
|
||||
|
||||
|
||||
TEST_F(ServerTest, BookMainPageIsRedirectedToArticleIndex)
|
||||
{
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user