Commit a1976468 authored by Бобби's avatar Бобби Committed by Cesanta Bot

Integrate cesanta/mongoose-os/pull/370

PUBLISHED_FROM=5bee629477514370f9b670771e786c4f4ddae934
parent 00d1d2c0
......@@ -7015,6 +7015,7 @@ int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst,
* -1 - src is wrong (NUUL)
* -2 - dst is wrong (NULL)
* -3 - failed to decode url or dst is to small
* -4 - name does not exist
*/
if (dst == NULL || dst_len == 0) {
len = -2;
......@@ -7024,7 +7025,7 @@ int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst,
} else {
name_len = strlen(name);
e = buf->p + buf->len;
len = 0;
len = -4;
dst[0] = '\0';
for (p = buf->p; p + name_len < e; p++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment