Should use length of the exected response, not the response sent by the user.
CL: mg: Fix digest auth result comparison
PUBLISHED_FROM=23375133b8babac0b276b51395917ad975e1bd3c
Clean the HTTP connection state when ia request/response has been fully
buffered and handler invoked.
Fixes https://github.com/cesanta/mongoose/issues/971
CL: mg: Fix handling of keepalive HTTP requests/responses
PUBLISHED_FROM=70c854aa306aacb9161f6ee48841f38dc0312e6b
Can be used for cases where device has no networking but mongoose is still needed for its event loop.
CL: mg: Add net_if_null, a no-op net interface
PUBLISHED_FROM=e79b4a8667508bbde1437dda9dad77ce3a3aa630
* Change return type of mg_mgr_poll to return number of events
* Add mg_mgr_min_timer
* Refactor main poll loop to remove LwIP-specific stuff
CL: Refactor mg polling
PUBLISHED_FROM=dc94618b32fa3c84a2f053bd04d134297780ec82
h/t @YankunLi
Closes https://github.com/cesanta/mongoose/pull/939
CL: mg: Fix a bug in mg_mgr_init_opt with opts.num_ifaces
PUBLISHED_FROM=a87518b3505429a3cf9cd6d84b3b781e7dbdcfd5
Do not clear buffer at the end of multipart request to allow following request to proceed.
Closes https://github.com/cesanta/mongoose/pull/940
CL: mg: Fix pipelining issue with multipart upload
PUBLISHED_FROM=cc7d38b126eaa863553ee4e124cfafcd72030fcf
curl -F file1 -F file2 ...
Add a unit test and fix a minor memory leak when returning an error.
CL: mg_file_upload_handler: Support multiple files
PUBLISHED_FROM=5c4bf2be676346fb782e80f50f79df6a6721ac88
Set CLOSE_IMMEDIATELY flag when destroying conn.
This avoid some races in LWIP adapter.
CL: mg_lwip: Fix race during clean conenction teardown
PUBLISHED_FROM=5c67982390dfaf83527e85d1291f64c6050aa932
Per standard, cookies are delimited by `; `.
CL: Fix mg_http_parse_header: treat ";" as a delimiter.
PUBLISHED_FROM=039243c30f5fabf4a4700a43506f841b3268306a
A major cleanup, disentangling net_if and ssl_if.
Pulled a lot of common logic into the core and reduced size of net_if implementations.
CL: Mongoose net_if and ssl_if refactoring
PUBLISHED_FROM=29bd4dcb264a1fd96b3dd164e2d880e1c2c0921e
Consume buffer as soon as we know there is no boundary there, no need to delay until next chunk arrives.
This prevents stall where buffer fills up in one go and next chunk never arrives.
CL: Fix an edge case in multipart HTTP upload parsing
PUBLISHED_FROM=025f9001d272df2a75ece22b199b1944d5db9840
* Limit total amount of headroom, in absolute terms (`MBUF_SIZE_MAX_HEADROOM`).
* If unable to allocate with headroom, fall back to allocating the required minimum.
* For mOS, set default `MBUF_SIZE_MULTIPLIER` to 2 to avoid floating point operations.
Since max headroom size is now capped to 128 bytes, this will not result in much of a bloat.
PUBLISHED_FROM=11d4fc65a46a805bb7c8960f89a3d0b753c58bb8
freshen: implement ota rollback
freshen: api for rpc
freshen: implement rpc api (without transport)
PUBLISHED_FROM=9f935f676161c81464a0dc53d5d8d085b2437ffb
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
In certain files it was necessary to make tests work from public
mongoose repo, so this commit makes things consistent.
PUBLISHED_FROM=694454d0ff007229c65d524a2a2beaf126420f15
Before it resulted in an endless recursion.
Resolves https://github.com/cesanta/mongoose/issues/871
CL: Mongoose Web Server: Fail if passed a NULL handler to `mg_bind` or `mg_bind_opt`.
PUBLISHED_FROM=376e5d330a643fa530f6a27a422a1500f986c721
CL: Mongoose Web Server: Digest authentication: Fix nonce validity check (expired nonce or nonce from the future did not cause the the check to fail)
CL: Mongoose Web Server: Digest authentication: Fix nonce request value; it worked before because nonce validity check was broken as well
CL: Mongoose Web Server: Digest authentication: Add `nonce` argument to `mg_http_create_digest_auth_header()`: clients should use the value received from the server's authentication request.
Resolves https://github.com/cesanta/mongoose/issues/809
PUBLISHED_FROM=5e59f90ed6b2a4311ed6763159da81c2aaf6af4c
CL: Mongoose Web Server: Websocket: Respond to Ping with Pong
CL: Mongoose Web Server: Websocket: Properly close a connection with Close frame (in response to a client's close and when protocol failure is detected)
CL: Mongoose Web Server: Websocket: Fix support of fragmented messages
CL: Mongoose Web Server: Websocket: Add support for control frames interjected in the middle of a fragmented message
PUBLISHED_FROM=e2b3794aaacc64633540c493194cccc62afa2077
`path_info` was dereferenced without checking for NULL, and a few lines
below, it was checked for NULL.
CL: none
PUBLISHED_FROM=9f14dc68c152b9b1119b276f047686d831bace38