Explorar el Código

Added a test case for #396.

yhirose hace 5 años
padre
commit
f5b806d995
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      test/test.cc

+ 5 - 0
test/test.cc

@@ -2386,6 +2386,11 @@ TEST(ServerRequestParsingTest, ChunkLengthTooHighInRequest) {
   EXPECT_EQ("HTTP/1.1 400 Bad Request", out.substr(0, 24));
 }
 
+TEST(ServerRequestParsingTest, InvalidHeaderTextWithExtraCR) {
+  test_raw_request("GET /hi HTTP/1.1\r\n"
+                   "Content-Type: text/plain\r\n\r");
+}
+
 TEST(ServerStopTest, StopServerWithChunkedTransmission) {
   Server svr;