[BUG] http: body parsing must consider the start of message
When parsing body for URL parameters, we must not consider that
data are available from buf->data but from buf->data + msg->som.
This is not a problem right now but may become with keep-alive.
diff --git a/src/backend.c b/src/backend.c
index 6a2670a..8ce981c 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -248,8 +248,8 @@
const char *params = req->data + msg->sov;
const char *p = params;
- if (len > req->l - msg->sov)
- len = req->l - msg->sov;
+ if (len > req->l - (msg->sov - msg->som))
+ len = req->l - (msg->sov - msg->som);
if (len == 0)
return NULL;