Add chunked transfer decoding to redbean

This commit is contained in:
Justine Tunney 2021-07-05 01:03:45 -07:00
parent 8d5f60a9cd
commit 58fb2fb3d3
13 changed files with 693 additions and 292 deletions

View file

@ -273,6 +273,15 @@ ACCEPT-encoding: bzip2\r\n\
EXPECT_FALSE(HeaderHas(req, m, kHttpAcceptEncoding, "funzip", -1));
}
TEST(HeaderHas, testEmptyHeaderName_isNotAllowed) {
static const char m[] = "\
GET / HTTP/1.1\r\n\
: boop\r\n\
\r\n";
InitHttpMessage(req, kHttpRequest);
EXPECT_EQ(-1, ParseHttpMessage(req, m, strlen(m)));
}
TEST(HeaderHas, testHeaderOnSameLIne) {
static const char m[] = "\
GET / HTTP/1.1\r\n\