tcpip_callback doesn't wait for the callback to run (as was previosuly assumed).
CL: mg_net_if_lwip: Fix invoking callbacks on tcpip thread
PUBLISHED_FROM=930c45f1346f9c3b024e5e684f4a452c762db92b
Check response code, make sure it's 101.
Pass http_message to the client to keep it appraised.
This represents a slight change in the API -
in case of an error MG_EV_WEBSOCKET_HANDSHAKE_DONE will now be delivered where previosuly connection would just hang.
Clients that do not examine the argument may for a moment think handshake has succeeded but in fact connection will be closed immediately.
CL: mg: Fix handling of WS handshake error response
PUBLISHED_FROM=645a43d9e5bee216e54411f85827c9b974e9a7d1
cs_log_set_filter() is removed in favor of cs_log_set_file_level() which
allows setting log verbosity of individual files and/or lines.
E.g.: `mg_=1,mjs=1,=4` - level for for everything except mjs and mongoose.
We use the fact that we are usually pretty careful with our file names and use prefixes consistently.
In mos, `debug.file_level` sets the option on boot and `Sys.SetDebug` is updated to parse `file_level` option to change it at runtime.
CL: Log file:line instead of function; add cs_log_set_file_level()
PUBLISHED_FROM=49f18d4d0d3dd224865129a4f8fe6cccd1d9bc12
If user throttles receive by setting recv_mbuf_limit,
after the net interface reports connection as closed we must wait
for data to trickle through before disposing of it.
There can still b data in the buffers (e.g. SSL).
CL: mg: Ensure that user sees all the data before connection is closed
PUBLISHED_FROM=22be0fa368950a9fdb03cfb00febc7c0a1674b01
It can specify how much data was actually processed and the rest will be re-delivered on next poll.
CL: mg: Add ability for multipart data handler to provide pushback
PUBLISHED_FROM=e0168c5064c3a32921c9209bc09f4da2079cd616
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