Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed May 7, 2010
1 parent bd1fbab commit 46a6bdd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test_response.c
Expand Up @@ -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,
Expand Down

0 comments on commit 46a6bdd

Please sign in to comment.