Implement mg_http_parse_header2()
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
Showing
- docs/c-api/mg_http_server.h/intro.md 1 addition, 0 deletionsdocs/c-api/mg_http_server.h/intro.md
- docs/c-api/mg_http_server.h/mg_http_parse_header.md 4 additions, 12 deletionsdocs/c-api/mg_http_server.h/mg_http_parse_header.md
- docs/c-api/mg_http_server.h/mg_http_parse_header2.md 30 additions, 0 deletionsdocs/c-api/mg_http_server.h/mg_http_parse_header2.md
- examples/cookie_auth/cookie_auth.c 21 additions, 10 deletionsexamples/cookie_auth/cookie_auth.c
- mongoose.c 202 additions, 36 deletionsmongoose.c
- mongoose.h 28 additions, 7 deletionsmongoose.h
- src/mg_http.c 202 additions, 36 deletionssrc/mg_http.c
- src/mg_http_server.h 28 additions, 7 deletionssrc/mg_http_server.h
- test/Makefile 3 additions, 1 deletiontest/Makefile
- test/unit_test.c 22 additions, 0 deletionstest/unit_test.c
Loading
Please register or sign in to comment