mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-19 01:09:12 +08:00
Integrate cesanta/mongoose-os/pull/370
PUBLISHED_FROM=5bee629477514370f9b670771e786c4f4ddae934
This commit is contained in:
parent
00d1d2c0e7
commit
a197646867
@ -7015,6 +7015,7 @@ int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst,
|
|||||||
* -1 - src is wrong (NUUL)
|
* -1 - src is wrong (NUUL)
|
||||||
* -2 - dst is wrong (NULL)
|
* -2 - dst is wrong (NULL)
|
||||||
* -3 - failed to decode url or dst is to small
|
* -3 - failed to decode url or dst is to small
|
||||||
|
* -4 - name does not exist
|
||||||
*/
|
*/
|
||||||
if (dst == NULL || dst_len == 0) {
|
if (dst == NULL || dst_len == 0) {
|
||||||
len = -2;
|
len = -2;
|
||||||
@ -7024,7 +7025,7 @@ int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst,
|
|||||||
} else {
|
} else {
|
||||||
name_len = strlen(name);
|
name_len = strlen(name);
|
||||||
e = buf->p + buf->len;
|
e = buf->p + buf->len;
|
||||||
len = 0;
|
len = -4;
|
||||||
dst[0] = '\0';
|
dst[0] = '\0';
|
||||||
|
|
||||||
for (p = buf->p; p + name_len < e; p++) {
|
for (p = buf->p; p + name_len < e; p++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user