Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more tests

  • Loading branch information...
commit 46a6bdd0aa2b2f4ba02a75a32d7805ec2b6ab139 1 parent bd1fbab
Kazuho Oku kazuho authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 test_response.c
13 test_response.c
View
@@ -78,7 +78,18 @@ int main(void)
ok(status == 500, "status");
ok(strrcmp(msg, msg_len, "Internal Server Error"), "msg");
ok(msg_len == sizeof("Internal Server Error")-1, "msg_len");
-
+
+ PARSE("H", 0, -2, "incomplete 1");
+ PARSE("HTTP/1.", 0, -2, "incomplete 2");
+ PARSE("HTTP/1.1", 0, -2, "incomplete 3");
+ PARSE("HTTP/1.1 ", 0, -2, "incomplete 4");
+ PARSE("HTTP/1.1 2", 0, -2, "incomplete 5");
+ PARSE("HTTP/1.1 200", 0, -2, "incomplete 6");
+ PARSE("HTTP/1.1 200 ", 0, -2, "incomplete 7");
+ PARSE("HTTP/1.1 200 O", 0, -2, "incomplete 8");
+ PARSE("HTTP/1.1 200 OK\r", 0, -2, "incomplete 9");
+ PARSE("HTTP/1.1 200 OK\r\n", 0, -2, "incomplete 10");
+
PARSE("HTTP/1.0 200 OK\r\n\r", strlen("GET /hoge HTTP/1.0\r\n\r") - 1,
-2, "slowloris (incomplete)");
PARSE("HTTP/1.0 200 OK\r\n\r\n", strlen("HTTP/1.0 200 OK\r\n\r\n") - 1,
Please sign in to comment.
Something went wrong with that request. Please try again.