File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1863,6 +1863,32 @@ TEST(PathUrlEncodeTest, PathUrlEncode) {
1863
1863
}
1864
1864
}
1865
1865
1866
+ TEST (PathUrlEncodeTest, IncludePercentEncodingLF) {
1867
+ Server svr;
1868
+
1869
+ svr.Get (" /" , [](const Request &req, Response &res) {
1870
+ EXPECT_EQ (" \x0A " , req.get_param_value (" something" ));
1871
+ });
1872
+
1873
+ auto thread = std::thread ([&]() { svr.listen (HOST, PORT); });
1874
+ auto se = detail::scope_exit ([&] {
1875
+ svr.stop ();
1876
+ thread.join ();
1877
+ ASSERT_FALSE (svr.is_running ());
1878
+ });
1879
+
1880
+ svr.wait_until_ready ();
1881
+
1882
+ {
1883
+ Client cli (HOST, PORT);
1884
+ cli.set_url_encode (false );
1885
+
1886
+ auto res = cli.Get (" /?something=%0A" );
1887
+ ASSERT_TRUE (res);
1888
+ EXPECT_EQ (StatusCode::OK_200, res->status );
1889
+ }
1890
+ }
1891
+
1866
1892
TEST (BindServerTest, DISABLED_BindDualStack) {
1867
1893
Server svr;
1868
1894
You can’t perform that action at this time.
0 commit comments