Now src contains exactly what's embedded in mongoose.c and .h, nothing more.
Added `tools/amalgam.sh` to aamlgamate both files at once.
There are no functional changes to mongoose.c, .h in this PR, only slight filename changes.
* Actually drop the connection when no response to ping arrives within the next interval.
* Avoid sending immediate ping when wall time is adjusted, it's usually spurious.
PUBLISHED_FROM=8049280b58edfb94dd0fcb6a1e89ffefe69bcea1
If file ends with .gz and has known "secondary extnesion", i.e. test.html.gz,
its content type is determined by the secondary extension and content-encoding is set to gzip.
PUBLISHED_FROM=a238763b4424bafabec2e58ccae4522cacdd7c78
Also free up some RAM by not allocating ca_cert when `MBEDTLS_X509_CA_CHAIN_ON_DISK` is enabled.
PUBLISHED_FROM=5e5f4103707de98c929973d2aed0aaedf0bb60da
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
* ARM
* Provide MSP and PSP
* Provide FreeRTOS task info
* Profide target specification XML (extra regs and FPU / no FPU Cortex cores)
* ESP32
* Use uxTaskGetSystemState instead of uxTaskGetTaskHandles
* General cleanup and refactoring
CL: Core dump analysis improvements
PUBLISHED_FROM=3297ffb2e6069a3a6a598367273bc2183063cf1e
All the platforms except esp32 (which uses heavily patched 9.0 from IDF) and esp8266 (doesn't use RTOS at all) are using the same version of FreeRTOS now.
CL: Make FreeRTOS a library, upgrade to 10.2.0
PUBLISHED_FROM=a4f7949a9f1546d23fc183412445859830f02d1a
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
Use old baud rate and autodetected divider to calculate new divider.
This works better with higher baud rates and drifting clocks.
CL: mos: Improve ESP flasher baud rate setting
PUBLISHED_FROM=7761e756c3ae7cc76e3b9a4fe3e40d06a779b2e8
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
Replacement for fw_meta.py commands and also supports unbundling .hex files.
General syntax is:
```
$ mos create-fw-bundle -o fw.zip part1:prop1=val1,prop2=val2,... part2:...
```
Example of building a mos fw bundle for ESP8266:
```
$ mos create-fw-bundle -o fw.zip --platform esp8266 --build-info=build_info.json \
boot:addr=0x0,src=rboot.bin,update=false \
boot_cfg:addr=0x7000,size=0x1000,fill=0xff \
fw:addr=0x100000,src=demo-c.bin \
fs:src=fs.bin,type=fs,addr=0x8000,fs_size=262144,fs_block_size=4096,fs_page_size=256,fs_erase_size=4096
```
Example of converting a HEX file to a bundle:
```
$ mos create-fw-bundle -o fw.zip host:type=host,src=hostfw.hex
```
CL: mos: Add create-fw-bundle command
PUBLISHED_FROM=35f52ea53e4b5900463415257323a4c08cf45deb
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
Go back to Ubuntu 16.04 and older gcc-arm (4.9.3).
Boot loader just won't run when compiled with newer GCC (7.x).
It's likely that it can be fixed with compile switches but I couldn't figure it out quickly, so going to just downgrade for now to get it back to workign state.
CL: CC3200: Fix boot loader regression
PUBLISHED_FROM=b70b03bd17e03c7dae02328b32b855f3ca3ad6a9
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
freshen: implement ota rollback
freshen: api for rpc
freshen: implement rpc api (without transport)
PUBLISHED_FROM=9f935f676161c81464a0dc53d5d8d085b2437ffb
E.g. if `ASSERT_EQ(myfunc(), 123)` fails, `myfunc()` would be invoked again to print the actual value.
This can cause confusion sometimes.
To avoid this, we cast arguments to double, which is wide enough for most cases and we provide a variant for 64 bit value types for when it's not.
We also perform a check and fail if argument to the check results in loss of precision.
CL: none
PUBLISHED_FROM=a14551289d92e8a5dead21d16471ebddebe938a8
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
To properly fail a test in a subroutine, return value needs to be passed up.
This snippet makes it short.
PUBLISHED_FROM=2f6328b5eb2921a4caa53d8887c02f73a5d817ea
In certain files it was necessary to make tests work from public
mongoose repo, so this commit makes things consistent.
PUBLISHED_FROM=694454d0ff007229c65d524a2a2beaf126420f15