Embedded Web Server
#pragma one
#ifdef __cplusplus
qos
and retain
params to mg_mqtt_{pub,sub}
mg_iobuf_append()
mg_random()
for Espressif buildsmg_mqtt_next_unsub()
MG_EV_HTTP_CHUNK
eventmg_mqtt_{ping,pong,disconnect}
functionsstruct mg_mgr::userdata
pointerstruct mg_http_message::head
which contains HTTP line and all headersThis is a bugfix and cleanup release after the major version 7.0 release. A significant number of small issues were fixed, and some new examples added.
mg_http_serve_dir()
This is a major release, aimed primarily at refactoring and cleanup of the codebase. The main focus is made on the embedded usage. The documentation has been fully revamped, and published at https://cesanta.com/docs. Porting from the 6.x version is not straightforward, despite all concepts stayed intact. The major changes include:
CGI support has been removed
WebDAV support has been removed
Socks5 support has been factored to the example
Digest auth support has been removed. The anticipated usage is Basic + TLS
The non-amalgamated sources are kept in src/
, and amalgamation is performed by Makefile. Set -DMG_ENABLE_LINES
compiler option to enable non-amalgamated diagnostics.
A Circle CI tests are established, to test on the common platforms and compilers, for both ISO C and ISO C++ mode. Also, an automatic test coverage tracking is performed.
The plan for the next releases is to add platform-specific examples (like for ESP32, STM32, etc) and integrate them into CI, to ensure they do not break as development continues.
Mongoose is integrated into Google's https://oss-fuzz.com/ service, to enable continuous fuzzing code tests. This helps to find security issues early on.
parse_mqtt()
, CVE-2019-19307parse_mqtt()
fixed - credit goes to Yakun Zhang and Zheng Huang of Baidu Security Labs for discovering and reporting the issuemg_resolve2()
incorrect memory init fixedlwip_net_if
mg_net_if_lwip
MG_MK_STR_N()
, mg_str_starts_with()
, mg_strfree()
mbuf_clear()
, mbuf_append_and_free()
, mbuf_move()
MG_CTL_MSG_MESSAGE_SIZE
overridabletcp_recved_tcpip()