Fixed problem with invalid requests including spaces in URL path

This commit is contained in:
yhirose committed 2020-12-19 12:03:08 -05:00
1 parent 24bb1387d6
commit 40db42108f
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -3004,6 +3004,12 @@ TEST(ServerRequestParsingTest, InvalidHeaderTextWithExtraCR) {
"Content-Type: text/plain\r\n\r");
}
TEST(ServerRequestParsingTest, InvalidSpaceInURL) {
std::string out;
test_raw_request("GET /h i HTTP/1.1\r\n\r\n", &out);
EXPECT_EQ("HTTP/1.1 400 Bad Request", out.substr(0, 24));
}
TEST(ServerStopTest, StopServerWithChunkedTransmission) {
Server svr;