mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
add unit test
This commit is contained in:
1 parent
eda1e8a402
commit
0adc858c85
1 file changed
+4
@@ -899,6 +899,10 @@ static void test_http_server(void) {
|
|||||||
ASSERT(fetch(&mgr, buf, url,
|
ASSERT(fetch(&mgr, buf, url,
|
||||||
"POST /a.txt HTTP/1.0\n"
|
"POST /a.txt HTTP/1.0\n"
|
||||||
"Content-Length: 19000000000000000000\n\n") == 0);
|
"Content-Length: 19000000000000000000\n\n") == 0);
|
||||||
|
ASSERT(fetch(&mgr, buf, url,
|
||||||
|
"GET /a.txt HTTP/1.0\n"
|
||||||
|
":\n" // truncated header
|
||||||
|
"Content-Length: 1\n\n") == 0);
|
||||||
|
|
||||||
{
|
{
|
||||||
extern char *mg_http_etag(char *, size_t, size_t, time_t);
|
extern char *mg_http_etag(char *, size_t, size_t, time_t);
|
||||||
|
|||||||
Reference in new issue
Block a user