mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-06 11:22:26 +08:00
b9b20c6494
Which is a replacement of (deprecated) `mg_http_parse_header`, but, similarly to `asprintf`, allocates a new buffer if the client-provided one is not large enough. Also use it throughout mongoose code, and thus some header-related limitations are removed; in particular, https://github.com/cesanta/mongoose/issues/813 is fixed. CL: Mongoose Web Server: Deprecate `mg_http_parse_header()` and implement `mg_http_parse_header2()` instead, which allocates a new buffer if the client-provided one is not large enough (similarly to `asprintf`). CL: Mongoose Web Server: Fix limitations of header value lengths, e.g. when parsing authentication headers such as nonce, etc. PUBLISHED_FROM=c75b1bbbbdb294ea85075ce69b1368f115fdd1ef
482 B
482 B
title | decl_name | symbol_kind | signature |
---|---|---|---|
mg_http_parse_header() | mg_http_parse_header | func | int mg_http_parse_header(struct mg_str *hdr, const char *var_name, char *buf, size_t buf_size); |
DEPRECATED: use mg_http_parse_header2() instead.
Same as mg_http_parse_header2(), but takes buffer as a char *
(instead of
char **
), and thus it cannot allocate a new buffer if the provided one
is not enough, and just returns 0 in that case.