mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
Avoid computing offset twice
This commit is contained in:
1 parent
b938728c2a
commit
9123330f72
3 files changed
+12
-2
No files matched your search
@@ -1758,6 +1758,14 @@ static void test_http_pipeline(void) {
|
||||
for (i = 0; i < 20; i++) mg_mgr_poll(&mgr, 1);
|
||||
ASSERT(ok == 1);
|
||||
ASSERT(ok2 == 1);
|
||||
// A bodyless POST must not consume the following pipelined request
|
||||
ok = ok2 = 0;
|
||||
c = mg_http_connect(&mgr, url, f6, (void *) &ok2);
|
||||
mg_printf(c, "POST /x HTTP/1.1\r\nHost: h\r\n\r\n"
|
||||
"GET /next HTTP/1.1\r\nHost: h\r\n\r\n");
|
||||
for (i = 0; i < 20; i++) mg_mgr_poll(&mgr, 1);
|
||||
ASSERT(ok == 2);
|
||||
ASSERT(ok2 == 2);
|
||||
// MG_INFO(("-----> [%d] [%d]", ok, ok2));
|
||||
mg_mgr_free(&mgr);
|
||||
ASSERT(mgr.conns == NULL);
|
||||
|
||||
Reference in new issue
Block a user