Integrate cesanta/mongoose-os/pull/370

PUBLISHED_FROM=5bee629477514370f9b670771e786c4f4ddae934
This commit is contained in:
Бобби 2017-11-09 08:39:14 +00:00 committed by Cesanta Bot
parent 00d1d2c0e7
commit a197646867

View File

@ -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++) {