Compare commits

...
3988 Commits
Author SHA1 Message Date
Sergio R. Caprile b379816178 Merge pull request #2210 from cesanta/devdash
run pack on Win
2023-05-23 11:06:47 -03:00
Sergio R. Caprile e4353255ca run pack on Win 2023-05-23 11:02:24 -03:00
cpq 923f2c7635 Add DHCP settings 2023-05-23 08:43:57 +01:00
cpq a8309ef705 Remove -DSIGPIPE=0 for Windows 2023-05-23 03:50:53 +01:00
cpq bad05485d0 Define SIGPIPE for Win32, fix sleep() for Win32 2023-05-23 03:49:24 +01:00
cpq 38d7799ffa Rename wifi-router -> wifi-router-dashboard 2023-05-23 02:40:45 +01:00
Sergio R. Caprile 6e6696ccd4 Merge pull request #2207 from cesanta/wifi
Add wifi-router example
2023-05-22 19:59:06 -03:00
cpq feb546920e Add wifi-router example 2023-05-22 19:48:34 -03:00
Sergio R. Caprile 81b05b9de4 Merge pull request #2208 from cesanta/fixwbind
fix bind issue in W
2023-05-22 19:46:42 -03:00
Sergio R. Caprile ab10b042be fix bind issue in W 2023-05-22 19:13:48 -03:00
Sergio R. Caprile 45e4b3c423 bump revno up 2023-05-18 12:26:19 -03:00
Sergio R. Caprile 6a5a139e33 Merge pull request #2201 from cesanta/MG_ESC
Update to use MG_ESC()
2023-05-17 14:38:17 -03:00
Sergio R. Caprile 1908d3200e Update to use MG_ESC() 2023-05-17 14:26:45 -03:00
Sergio R. Caprile f4cf40d38f Merge pull request #2200 from cesanta/esc
Add MG_ESC helper macro
2023-05-17 09:41:39 -03:00
cpq 514de84b97 Add MG_ESC helper macro 2023-05-17 11:58:40 +01:00
Sergio R. Caprile 7e7d0bb354 Merge pull request #2199 from cesanta/docinsource
remove stalled doc in header
2023-05-16 18:40:41 -03:00
Sergio R. Caprile e468b90442 remove stalled doc in header 2023-05-16 18:08:48 -03:00
Sergio R. Caprile 926959ab47 Merge pull request #2197 from cesanta/BUGFIX_handle_http_negative_content_length
Added check for negative value for HTTP Content-Length header
2023-05-16 16:11:14 -03:00
Allan Park 4663090a8f Added check for negative value for HTTP Content-Length header 2023-05-16 18:52:33 +03:00
Sergey Lyubka b0868a4d0b Merge pull request #2194 from cesanta/frp
Fix http-reverse-proxy for keep-alive incoming connections
2023-05-16 09:20:21 +01:00
Sergio R. Caprile 9088b00006 Fix keep-alive 2023-05-15 14:11:12 -03:00
Sergio R. Caprile 9c0fe8999d Merge pull request #2193 from cesanta/tuts
link to tutorial
2023-05-12 17:30:52 -03:00
Sergio R. Caprile 901aa5f7c1 link to tutorial 2023-05-12 17:30:06 -03:00
Sergio R. Caprile 3ee28c035b Merge pull request #2191 from cesanta/tuts
link to tutorial
2023-05-12 10:21:42 -03:00
Sergio R. Caprile 1e31b90905 link to tutorial 2023-05-12 10:20:38 -03:00
cpq 48333041f4 Apply SO_EXCLUSIVEADDRUSE and SO_REUSEADDR on windows 2023-05-12 14:08:49 +01:00
cpq 717c9dbe89 On Windows, prefer EXCLADDRINUSE, then REUSEADDR 2023-05-09 11:25:18 +01:00
Sergio R. Caprile fd86eb7aa7 Merge pull request #2184 from cesanta/tuts
link to tutorial
2023-05-08 18:31:50 -03:00
Sergio R. Caprile 9b4b35eff5 link to tutorial 2023-05-08 18:23:35 -03:00
Sergio R. Caprile ac528caf2b Merge pull request #2182 from cesanta/keil
simplify RTOS-related Keil examples
2023-05-05 18:49:27 -03:00
scaprile fbe626e791 simplify RTOS-related Keil examples 2023-05-05 17:41:47 -03:00
Sergio R. Caprile 9ca37d30d8 Merge pull request #2179 from cesanta/tuts
link to tutorials
2023-05-04 19:17:51 -03:00
Sergio R. Caprile 84986898c8 link to tutorials 2023-05-04 19:16:43 -03:00
Sergey Lyubka 5cebce3f4b Merge pull request #2173 from cesanta/arp
Add multicast and local broadcast MAC resolution
2023-04-29 12:01:01 +01:00
Sergey Lyubka bb344b14a8 Merge pull request #2168 from cesanta/udp-listener
Fix UDP listeners in MIP
2023-04-29 12:00:33 +01:00
Sergey Lyubka 20e613b444 Merge pull request #2169 from cesanta/udp-printf
Fix mg_xprint() for UDP in MIP
2023-04-29 11:59:46 +01:00
Sergey Lyubka a0952e0012 Merge pull request #2171 from cesanta/null_fs
Check for calloc() failure in filesystem code
2023-04-29 11:59:03 +01:00
Sergey Lyubka 49e66f809e Merge pull request #2172 from cesanta/null_mip
Check for calloc() failure in MIP
2023-04-29 11:57:25 +01:00
Sergey Lyubka 5152ed8731 Merge pull request #2174 from cesanta/ti-rndis
Add TI RNDIS example
2023-04-29 11:56:29 +01:00
cpq 33811a826f Include TCP/IP API only if enabled 2023-04-29 11:45:28 +01:00
Sergio R. Caprile d33aebfd31 Add TI RNDIS example 2023-04-28 11:23:40 -03:00
Sergio R. Caprile 7d53c52a6b Check for calloc() failure in MIP 2023-04-27 11:34:23 -03:00
Sergio R. Caprile f015a8686e Check for calloc() failure in filesystem code 2023-04-27 11:19:02 -03:00
Sergio R. Caprile ab791d2a2d Add multicast and local broadcast MAC resolution 2023-04-26 19:56:03 -03:00
Sergio R. Caprile a303858da7 Fix mg_xprint() for UDP in MIP 2023-04-26 18:32:54 -03:00
Sergio R. Caprile 4c58c62cfe Fix UDP listeners 2023-04-26 15:09:27 -03:00
Sergey Lyubka 4593332204 Merge pull request #2166 from cesanta/gzip
Fix #1927: respect Accept-Encoding when serving .gz files
2023-04-26 10:01:24 +01:00
cpq 9f5d8c4280 Fix #1927: respect Accept-Encoding when serving .gz files 2023-04-26 09:07:43 +01:00
Sergey Lyubka b0d44bf0ba Merge pull request #2165 from cesanta/mqtt
mqtt fixes
2023-04-25 08:27:01 +01:00
cpq 59b8434e36 mqtt fixes 2023-04-25 07:48:33 +01:00
Sergey Lyubka e6f27cbaf3 Merge pull request #2160 from robertc2000/master
MQTT: support for user properties feature added
2023-04-23 18:33:56 +01:00
robert 6c13df1aff MQTT: support for properties feature added 2023-04-23 16:35:50 +03:00
Sergey Lyubka 44bf059b2f Merge pull request #2158 from cesanta/ipv6
Fix #2089 - allow to bind v4 and v6 sockets on the same port
2023-04-18 08:26:47 +01:00
cpq 9ade464c2e Fix #2089 - allow to bind v4 and v6 sockets on the same port 2023-04-18 08:26:18 +01:00
Sergio R. Caprile aed5d4e05b Merge pull request #2159 from cesanta/testf7ft
Testf7ft
2023-04-17 17:04:31 -03:00
Sergio R. Caprile b57648df14 Update test.yml 2023-04-17 17:02:52 -03:00
Sergio R. Caprile 7bce887077 Relax test time 2023-04-17 16:59:36 -03:00
Sergio R. Caprile cacd9c7f95 Merge pull request #2156 from cesanta/xprintf
Remove %H %V %Q %q modifiers
2023-04-14 14:24:46 -03:00
Sergio R. Caprile cd64bfe84b Remove %H %V %Q %q modifiers 2023-04-14 10:13:22 -03:00
Sergio R. Caprile 52ed68ed24 Merge pull request #2154 from cesanta/keil
Add Keil examples and preliminary test
2023-04-12 10:16:12 -03:00
Sergey Lyubka 20577021a6 Merge pull request #2151 from cesanta/multi-threaded
Fix for some compilers
2023-04-12 10:02:27 +01:00
scaprile 838a2236a1 Add preliminary test 2023-04-11 17:47:38 -03:00
scaprile d03941b792 Add Keil examples 2023-04-11 17:46:28 -03:00
Sergio R. Caprile 92299c3079 Fix for some compilers 2023-04-11 08:41:14 -03:00
cpq d9f05532cd Address #2125: treat negative poll time as infinite wait 2023-04-10 15:04:37 +01:00
Sergio R. Caprile 2fd2dff126 Merge pull request #2138 from cesanta/printh
Add printf.h
2023-04-07 19:53:07 -03:00
Sergio R. Caprile 8e14ad0536 Add printf.h 2023-04-07 19:28:00 -03:00
Sergio R. Caprile 2b325102f3 Merge pull request #2143 from cesanta/dbl
Fix #2104 - %.*f formatting
2023-04-07 12:27:15 -03:00
Sergio R. Caprile 1f2be606fa Fix wildcard usage 2023-04-07 12:21:14 -03:00
cpq 6b29a2a724 Fix #2104 - %.*f formatting 2023-04-07 08:38:28 +01:00
Sergey Lyubka f79edeb053 Merge pull request #2145 from cesanta/cube
Cube
2023-04-07 08:29:54 +01:00
Sergio R. Caprile 84b92096d4 Add STM32CubeIDE examples and test for build 2023-04-06 17:33:45 -03:00
Sergio R. Caprile 70f4814cb1 Merge pull request #2144 from cesanta/test
Test TLS host verif with no CA
2023-03-31 17:04:39 -03:00
Sergio R. Caprile 49579eb2b4 Test host only TLS mode 2023-03-31 17:00:05 -03:00
Sergey Lyubka cc6caeeca9 Merge pull request #2139 from cesanta/freertos-tcp
FreeRTOS+ TCP support
2023-03-30 10:51:52 +01:00
Sergey Lyubka 90af22eba1 Merge pull request #2141 from cesanta/hc1
fix outdated comment
2023-03-30 10:51:25 +01:00
cpq f4b4b41264 Merge branch 'master' of github.com:cesanta/mongoose 2023-03-30 10:50:27 +01:00
cpq 9918b03c11 Enhance MQTT client 2023-03-30 10:49:16 +01:00
Sergio R. Caprile 95f44246bf fix old comment 2023-03-29 11:46:40 -03:00
Sergio R. Caprile b098723f78 Update test.yml 2023-03-27 18:19:48 -03:00
Sergio R. Caprile a819513a92 Remove old example and its breadcrumbs 2023-03-27 18:14:55 -03:00
Sergio R. Caprile 7531b28b4c Add refactored FreeRTOS-Plus-TCP example 2023-03-25 13:07:31 -03:00
Sergio R. Caprile 2b8586d1b7 Merge pull request #2134 from cesanta/freertos-tcp
Fix FreeRTOS-Plus-TCP
2023-03-24 16:42:59 -03:00
Sergio R. Caprile 8167291ffc Fix FreeRTOS-Plus-TCP 2023-03-24 15:28:32 -03:00
Sergio R. Caprile 0dfcf9607a Merge pull request #2132 from cesanta/freertos-tcp
Let FreeRTOS-Plus-TCP build on Keil
2023-03-23 22:02:44 -03:00
Sergio R. Caprile 4827831107 Let FreeRTOS-Plus-TCP build on Keil 2023-03-23 17:13:02 -03:00
Sergio R. Caprile 0ebb6d5d30 Merge pull request #2131 from cesanta/cmsis-rtos
Add arch for CMSIS-RTOS v1 and v2
2023-03-22 11:18:37 -03:00
Sergio R. Caprile f4ed5062f6 Add arch for CMSIS-RTOS v1 and v2 2023-03-21 19:32:56 -03:00
Sergio R. Caprile 434b129746 Merge pull request #2129 from cesanta/frerrno
Remove no longer necessary includes
2023-03-21 14:13:35 -03:00
Sergio R. Caprile 2f5041ac7d Remove no longer necessary includes 2023-03-21 14:08:35 -03:00
Sergio R. Caprile 24f9766b39 Merge pull request #2128 from cesanta/keil
Let lwIP and FreeRTOS build on Keil
2023-03-21 13:58:09 -03:00
Sergio R. Caprile ba872217d7 Let lwIP and FreeRTOS build on Keil 2023-03-21 12:09:00 -03:00
Sergey Lyubka b2ae517dac Merge pull request #2119 from cesanta/armcc
Add MG_ARCH_ARMCC
2023-03-20 22:01:40 +00:00
Sergio R. Caprile 32b52dc0c8 Merge pull request #2121 from cesanta/nomip-collateral
remove references to MIP in examples (comments)
2023-03-15 10:10:46 -03:00
Sergio R. Caprile 33a3fe9bbd remove references to MIP in examples (comments) 2023-03-15 09:43:22 -03:00
Sergio R. Caprile 245dc76503 Add MG_ARCH_ARMCC 2023-03-15 09:39:36 -03:00
Sergio R. Caprile 21dbfd79d8 Merge pull request #2120 from cesanta/chaudocs
Move docs to website
2023-03-14 09:55:52 -03:00
Sergio R. Caprile b9f2250278 Move docs to website 2023-03-14 09:54:29 -03:00
Sergio R. Caprile a0601f1891 Merge pull request #2118 from cesanta/testTM4c
update Makefile
2023-03-10 10:58:51 -03:00
Sergio R. Caprile 70403ee433 update Makefile 2023-03-10 10:45:30 -03:00
Sergio R. Caprile f3cde58c8f Merge pull request #2117 from cesanta/testTM4C
test only TM4C examples that have changes
2023-03-10 10:20:18 -03:00
Sergio R. Caprile 71c267776a Update test.yml 2023-03-10 10:19:39 -03:00
Sergio R. Caprile 359ff94a8c Merge pull request #2116 from cesanta/testTM4c
Test TM4C
2023-03-10 10:01:48 -03:00
Sergio R. Caprile efe1c1492f Merge pull request #2115 from cesanta/scaprile-patch-1
test TM4C
2023-03-10 10:00:28 -03:00
Sergio R. Caprile 2aaaf7c358 test TM4C 2023-03-10 09:59:56 -03:00
Sergio R. Caprile cefaffa0f0 update Makefile 2023-03-10 09:54:26 -03:00
Sergio R. Caprile a22d56dc41 Merge pull request #2114 from cesanta/standex
update
2023-03-10 09:37:36 -03:00
Sergio R. Caprile 51eca94504 update 2023-03-10 09:35:29 -03:00
Sergio R. Caprile 2b6d24d328 Merge pull request #2112 from cesanta/nomip-collateral
MIP_STATE_* -> MG_TCPIP_STATE_*
2023-03-10 09:27:11 -03:00
Sergio R. Caprile 4932025423 Merge pull request #2113 from cesanta/scaprile-patch-1
Update test.yml
2023-03-09 11:44:11 -03:00
Sergio R. Caprile c466abf4d0 Update test.yml 2023-03-09 11:43:32 -03:00
Sergio R. Caprile 2ece3a8b4c MIP_STATE_* -> MG_TCPIP_STATE_* 2023-03-09 11:25:02 -03:00
Sergio R. Caprile 3f760e1875 Merge pull request #2111 from cesanta/standex
standardize Zephyr examples
2023-03-08 17:35:39 -03:00
Sergio R. Caprile 1da134c38c Merge pull request #2110 from cesanta/pico-w5500
Gen MAC from board ID, standardize
2023-03-08 17:30:54 -03:00
Sergio R. Caprile 0bf96e9864 standardize Zephyr examples 2023-03-08 16:41:21 -03:00
Sergio R. Caprile 1f5c19306e Gen MAC from board ID, standardize 2023-03-08 11:51:55 -03:00
Sergio R. Caprile db10b3821c Merge pull request #2109 from cesanta/standex
Standex
2023-03-08 11:50:30 -03:00
Sergio R. Caprile 4245a6d04d update 2023-03-08 11:44:34 -03:00
Sergio R. Caprile 6920c1159b rework serial config 2023-03-07 16:02:02 -03:00
Sergio R. Caprile 3801e1eade Merge pull request #2107 from cesanta/standex
read MAC from flash
2023-03-07 15:59:14 -03:00
Sergio R. Caprile 3e419303a7 read MAC from flash 2023-03-06 17:33:17 -03:00
Sergio R. Caprile 0de1e6a3af Merge pull request #2106 from cesanta/standex
Standardize TM4C FreeRTOS
2023-03-06 16:01:49 -03:00
Sergio R. Caprile 99c415f898 Standardize TM4C FreeRTOS 2023-03-06 15:57:51 -03:00
Sergio R. Caprile f68d83dbf0 Merge pull request #2103 from cesanta/standex
standardize TM4C baremetal
2023-03-02 20:57:41 -03:00
Sergio R. Caprile 6e97905bce standardize TM4C baremetal 2023-03-02 20:44:35 -03:00
Sergio R. Caprile 572a10d5a0 Merge pull request #2100 from cesanta/standex
Update Makefiles and READMEs
2023-03-01 11:30:08 -03:00
Sergio R. Caprile eaa6199de0 Update Makefiles and READMEs 2023-03-01 11:28:24 -03:00
Sergio R. Caprile 70799101e4 Merge pull request #2099 from cesanta/standex
Update symlinks and Makefiles
2023-02-28 18:25:24 -03:00
Sergio R. Caprile 9cc70d0323 Update symlinks and Makefiles 2023-02-28 18:18:26 -03:00
cpq 20c5da6e55 Fix build - NULL pointer check 2023-02-28 17:55:25 +00:00
cpq 4c356bc368 Merge branch 'master' of github.com:cesanta/mongoose 2023-02-28 17:41:37 +00:00
Sergio R. Caprile aeb04deae4 Merge pull request #2098 from cesanta/tstexmac 2023-02-28 14:22:05 -03:00
Sergio R. Caprile 873e4d6547 Update Makefile 2023-02-28 14:18:39 -03:00
Sergio R. Caprile 9ba20304c2 Update test.yml 2023-02-28 14:14:57 -03:00
Sergio R. Caprile 252619b1a0 Merge pull request #2097 from cesanta/tstexwin
Test some examples on Windows
2023-02-28 14:07:10 -03:00
Sergio R. Caprile 38b129de66 Test some examples on Windows
closes #2047
2023-02-28 14:04:02 -03:00
Sergey Lyubka da028d1af9 Merge pull request #2096 from cesanta/fixrmii
Update RMII example, enhance MIP
2023-02-28 08:34:20 +00:00
Sergio R. Caprile bba361016d Update RMII ex, enhance MIP 2023-02-27 18:30:53 -03:00
Sergio R. Caprile c362af1f81 Merge pull request #2095 from cesanta/fixrndis
Fix RNDIS examples
2023-02-27 11:35:05 -03:00
Sergio R. Caprile 520507afd9 unbreak RNDIS examples 2023-02-27 11:28:42 -03:00
Sergio R. Caprile 4e7584167b force check and failures 2023-02-27 10:54:32 -03:00
Sergio R. Caprile 112bd61a25 Merge pull request #2094 from cesanta/fixwf
Update test.yml
2023-02-27 10:23:52 -03:00
Sergio R. Caprile 1df8bc0dfe Update test.yml
Fix embedded matrix workflow not signalling changes and not running
2023-02-27 10:22:52 -03:00
cpq f2076fe309 Add more tests for mg_strstr() 2023-02-26 01:32:03 +00:00
Sergey Lyubka 67dea15bf2 Merge pull request #2076 from cesanta/q
Use mg_queue in mip
2023-02-24 19:57:20 +00:00
cpq 910f19fe55 Use mg_queue in mip 2023-02-24 19:40:31 +00:00
Sergio R. Caprile 290bf0b6d2 Merge pull request #2093 from cesanta/standex
update Makefiles and symlinks
2023-02-24 15:49:35 -03:00
Sergio R. Caprile 4c87a776e6 updated Makefiles and symlinks 2023-02-24 13:46:31 -03:00
Sergio R. Caprile 4436093816 Merge pull request #2092 from cesanta/standex
standardize examples
2023-02-23 19:07:44 -03:00
Sergio R. Caprile b85aa7b084 Merge pull request #2090 from cesanta/tcp
mark we consumed data
2023-02-23 14:38:14 -03:00
Sergio R. Caprile 99e28b639d mark we consumed data 2023-02-23 14:35:26 -03:00
Sergio R. Caprile 9b94b4da26 fix build for Windows
(read from stdin does not work)
2023-02-23 14:04:10 -03:00
Sergio R. Caprile 5b46986628 update Makefiles and symlinks 2023-02-23 11:32:53 -03:00
Sergio R. Caprile d0e5690bfd Merge pull request #2088 from cesanta/standex
update Makefiles and symlinks
2023-02-22 16:58:49 -03:00
Sergio R. Caprile ddbfa06bcc update Makefiles and symlinks 2023-02-22 16:38:21 -03:00
Sergio R. Caprile 2c6fc99c68 Merge pull request #2084 from cesanta/standex
updated Makefiles and symlinks
2023-02-21 17:31:02 -03:00
Sergio R. Caprile d8ad0ac72c updated Makefiles and symlinks 2023-02-21 16:05:25 -03:00
Sergio R. Caprile 9de50d7981 Merge pull request #2083 from cesanta/standex
#2046 #2047
2023-02-21 14:53:04 -03:00
Jean-François SimonandJean-Francois Simon 2c5c46dc48 Fix headers (drivers) (#2081)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-21 16:39:53 +01:00
Jean-François SimonandJean-Francois Simon 6423b4cbb9 rt1020 driver check frame crc/truncated (#2080)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-21 16:27:04 +01:00
Sergio R. Caprile 2566aa725a http-proxy-client Makefile 2023-02-21 12:16:39 -03:00
Sergio R. Caprile eb463bbb2b READMEs, golden update collaterals, etc 2023-02-21 12:07:48 -03:00
Sergio R. Caprile 1a8a559d84 Merge pull request #2079 from cesanta/time
Fix #2075. Add MG_HTTP_DIRLIST_TIME_FMT, remove MG_HTTP_DIRLIST_TIME and MG_HTTP_DIRLIST_TIME_UTC
2023-02-20 20:13:56 -03:00
cpq 57c1d787e3 Fix #2075. Add MG_HTTP_DIRLIST_TIME_FMT, remove MG_HTTP_DIRLIST_TIME and MG_HTTP_DIRLIST_TIME_UTC 2023-02-20 21:25:55 +00:00
Sergey Lyubka 999a32424f Merge pull request #2078 from cesanta/standex
Golden Makefiles
2023-02-20 19:54:02 +00:00
Sergio R. Caprile c2ed20ba23 Golden Makefiles 2023-02-20 16:20:28 -03:00
Sergio R. Caprile 01cbb37359 Merge pull request #2077 from cesanta/standex
huge response
2023-02-20 16:17:15 -03:00
Sergio R. Caprile 3e205e9536 huge response 2023-02-20 16:15:30 -03:00
Sergio R. Caprile b29d6b4478 _sbrk in TI 2023-02-17 11:11:31 -03:00
Sergey Lyubka b9424e4c21 Merge pull request #2073 from cesanta/sbrk
Fix _sbrk()
2023-02-17 14:00:32 +00:00
Sergio R. Caprile 87fe912d8d Merge pull request #2074 from cesanta/standex
Standardize examples and make them Windows friendly
2023-02-17 10:59:55 -03:00
Sergio R. Caprile 59343c2f82 http-client 2023-02-17 10:57:54 -03:00
Sergio R. Caprile 700fc64383 update devdash README 2023-02-17 10:40:53 -03:00
Sergio R. Caprile ca256b9949 Win friendly #2047 2023-02-17 10:40:53 -03:00
cpq 68750f3455 Expand on integration steps 2023-02-17 10:49:05 +00:00
cpq 906fc417c8 Expand on crossplatform ability 2023-02-17 10:46:45 +00:00
cpq ac203c56df Expand on crossplatform ability 2023-02-17 10:46:16 +00:00
cpq 734ad45f1c Expand on crossplatform ability 2023-02-17 10:44:55 +00:00
cpq 4a1f2e0dd3 Fix mg_fs_posix.st() for Windows symlinks using ftell 2023-02-17 10:36:06 +00:00
cpq 24e3514640 Fix mg_fs_posix.st() for Windows symlinks 2023-02-17 10:20:33 +00:00
Sergio R. Caprile dadb05e022 Add heap limit 2023-02-16 15:17:19 -03:00
cpq ca3dfb3c07 Docs notes 2023-02-16 16:41:26 +00:00
cpq cf452942fa More windows-friendly makefile for rp2040/pico-w5500 2023-02-16 14:23:52 +00:00
Sergey Lyubka 28ee40bebe Merge pull request #2067 from cesanta/pico
Use RNG in examples/pico-w5500
2023-02-16 08:01:11 +00:00
cpq 6267752a2a Use RNG in examples/pico-w5500 2023-02-16 07:53:11 +00:00
Sergey Lyubka 2ece24e077 Merge pull request #2066 from cesanta/queue
Refactor queue
2023-02-15 22:33:07 +00:00
Sergio R. Caprile 59013e62d3 Merge pull request #2072 from cesanta/standex
Standardize examples
2023-02-15 18:07:54 -03:00
Sergio R. Caprile 824763aae9 standardize 2023-02-15 18:04:48 -03:00
Sergey Lyubka a8c5b04feb Merge pull request #2070 from cesanta/fixcl
Fix content-length header in mg_http_reply()
2023-02-15 19:22:03 +00:00
Sergey Lyubka 64f069ec24 Merge pull request #2043 from cesanta/randomize
Seed fallback clib PRNG with some entropy
2023-02-15 19:20:50 +00:00
cpq 515e438d4f Refactor queue 2023-02-15 18:53:44 +00:00
Sergio R. Caprile 9ec064f9d9 symlinks 2023-02-15 15:22:46 -03:00
Sergio R. Caprile 60c6b04a01 Add mg_srand() and seed with some entropy 2023-02-15 14:29:02 -03:00
Sergio R. Caprile 9deaa81a72 Merge pull request #2071 from cesanta/standex
captive-dns
2023-02-15 14:27:15 -03:00
Sergio R. Caprile ae703db6ee captive-dns 2023-02-15 14:22:48 -03:00
Sergio R. Caprile 267f54bc0e Fix content-length header in mg_http_reply() 2023-02-15 11:28:14 -03:00
cpq 8aa26fb2cd Fix fuzzer workflow 2023-02-15 14:25:04 +00:00
cpq e7667f2537 Merge branch 'master' of github.com:cesanta/mongoose 2023-02-14 15:12:59 +00:00
cpq bac15d2ecf Fix #2063 - a typo 2023-02-14 15:12:51 +00:00
Sergio R. Caprile ae27e07903 Merge pull request #2068 from cesanta/stm32-rndis
Standardize STM32 RNDIS examples
2023-02-14 12:10:55 -03:00
Sergio R. Caprile 605dfa7366 Standardize STM32 RNDIS examples 2023-02-13 18:40:09 -03:00
Sergio R. Caprile 85db19e33f Merge pull request #2064 from cesanta/renaming-stm32
simplify names
2023-02-13 17:00:40 -03:00
Sergio R. Caprile 052bc6b356 Merge pull request #2065 from cesanta/scaprile-patch-1
Update test.yml
2023-02-13 16:59:09 -03:00
Sergio R. Caprile 24985e2bca Update test.yml 2023-02-13 16:58:33 -03:00
Sergio R. Caprile 8e3eb8b3d2 simplify names 2023-02-13 16:54:26 -03:00
Sergio R. Caprile 2be44dbd94 Merge pull request #2061 from cesanta/efe4f
Update and standardize F4 FreeRTOS
2023-02-13 11:08:31 -03:00
Sergio R. Caprile 7c6b26faa2 Merge pull request #2062 from cesanta/scaprile-patch-2
Update test.yml
2023-02-13 11:07:41 -03:00
Sergio R. Caprile cfc42512ed Update test.yml 2023-02-13 11:07:16 -03:00
Sergio R. Caprile 50f5834296 Update and standardize F4 FreeRTOS 2023-02-13 10:53:59 -03:00
Jean-François SimonandJean-Francois Simon 07e91bb73a Fix build mip -> mg_tcpip (#2060)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-13 12:02:57 +01:00
Sergey Lyubka 3c547eeed8 Merge pull request #2059 from cesanta/test
Serialize HW tests
2023-02-13 08:16:57 +00:00
cpq 6f011fce3b Serialize HW tests 2023-02-13 03:10:09 +00:00
cpq 5aebed95a4 Fix VC98 build 2023-02-12 10:41:51 +00:00
Sergey Lyubka 8321f9f6e9 Merge pull request #2034 from cesanta/queue
Add struct mg_queue and API, change examples/multi-threaded, add tests
2023-02-12 10:04:13 +00:00
cpq bf9d69ab56 Add struct mg_queue and API, change examples/multi-threaded, add tests 2023-02-11 13:24:26 +00:00
Sergio R. Caprile faaff57d2b update Makefile 2023-02-10 21:24:42 -03:00
Sergio R. Caprile 40667ef1c1 Update Makefile 2023-02-10 20:52:55 -03:00
Sergio R. Caprile 04b4e3298b Merge pull request #2056 from cesanta/f7f
Make example as README says
2023-02-10 20:30:06 -03:00
Sergio R. Caprile 43cbd3a61e Merge pull request #2058 from cesanta/scaprile-patch-1
make F7 FreeRTOS testable
2023-02-10 20:24:04 -03:00
Sergio R. Caprile bfb091f2f4 make F7 FreeRTOS testable 2023-02-10 20:23:39 -03:00
Sergio R. Caprile 4974303e6b Make example as README says 2023-02-10 20:06:25 -03:00
Sergio R. Caprile 664bb0a663 Merge pull request #2055 from cesanta/makefiles
minor updates
2023-02-10 19:45:09 -03:00
Sergio R. Caprile 491596d03d minor updates 2023-02-10 19:41:27 -03:00
Sergio R. Caprile 75538be235 Merge pull request #2054 from cesanta/efe4
Standardize F4 baremetal
2023-02-10 17:28:05 -03:00
Sergio R. Caprile 1cb99ea2fc Standardize F4 baremetal 2023-02-10 15:53:55 -03:00
Sergey Lyubka c0f4bde5fc Merge pull request #2051 from cesanta/fmt
Split mg_*printf* functions into src/printf.c/h
2023-02-10 16:52:34 +00:00
cpq a4430dd49d Split mg_*printf* functions into src/printf.c/h 2023-02-10 15:47:23 +00:00
Jean-François SimonandJean-Francois Simon b513d40bd6 add coverage ws.c (#2050)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-10 15:51:44 +01:00
cpq fbaaf89a21 Update screenshot 2023-02-09 22:47:48 +00:00
cpq 7625a0154e Using webp for screenshots 2023-02-09 22:41:49 +00:00
cpq 396ee803b2 Remove -c core.symlinks arg from the clone command 2023-02-09 20:06:53 +00:00
cpq 5a42319a07 Add readme rule 2023-02-09 20:04:59 +00:00
cpq 61b9820f78 Update READMEs 2023-02-09 20:04:07 +00:00
Sergio R. Caprile a383a45269 Merge pull request #2044 from cesanta/eph1
Fix ifp->eport init
2023-02-09 16:41:25 -03:00
Sergio R. Caprile 7bd4869ae6 Merge pull request #2048 from cesanta/rules
Add a rule on symlink
2023-02-09 16:12:23 -03:00
cpq 49a6559453 Add a rule on symlink 2023-02-09 19:00:10 +00:00
cpq 2e16a10720 Fix ifp->eport init 2023-02-09 18:39:14 +00:00
Sergey Lyubka cd973b50ff Merge pull request #2042 from cesanta/eph
Use linux ephemeral range (start from 32768). More TCP debug
2023-02-09 17:40:49 +00:00
cpq b6fc67fff2 Use linux ephemeral range (start from 32768). More TCP debug 2023-02-09 15:20:08 +00:00
Jean-François Simon 12f00d785d mg_tcpip_imxrt1020 (#2033)
MG_TCPIP driver for NXP i.MX RT1020
2023-02-09 15:31:59 +01:00
Jean-François Simon de1ff6ed49 Add test to mqtt (#2041)
Test coverage mqtt
2023-02-09 15:05:55 +01:00
Sergio R. Caprile d0a6cbe5dd Merge pull request #2038 from cesanta/h7
Use CMSIS for H7
2023-02-09 09:18:09 -03:00
cpq 35924ce550 Use CMSIS for H7 2023-02-09 11:08:22 +00:00
Jean-François Simon ad1d8cbedd Add test to mqtt (#2040)
coverage: mqtt
2023-02-09 11:36:08 +01:00
Sergey Lyubka 6294ce59f7 Merge pull request #2035 from cesanta/rndismass
Add mass-storage disk with an index file
2023-02-08 15:58:18 +00:00
Sergio R. Caprile d445ff40c2 Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
Sergey Lyubka c6010c3ab4 Merge pull request #2031 from cesanta/sym
Note about symlinks
2023-02-08 12:56:16 +00:00
Sergio R. Caprile 9da80d7b7d Merge pull request #2032 from cesanta/move
Move mip/ -> src/tcpip/, rename mip_ -> mg_tcpip_
2023-02-08 09:49:06 -03:00
cpq 2c62e58dbd Move mip/ -> src/tcpip/, rename mip_ -> mg_tcpip_ 2023-02-07 21:35:37 +00:00
Sergio R. Caprile efc54375dd Merge pull request #2028 from cesanta/mip
Kill ARP cache, kill qprofile
2023-02-07 15:42:20 -03:00
cpq 0c3946033b Note about symlinks 2023-02-07 15:42:17 +00:00
cpq 9dc86aa77d Kill ARP cache, kill qprofile 2023-02-07 14:26:03 +00:00
Sergey Lyubka 0cbe320a5f Merge pull request #2029 from cesanta/rules
Add examples/readme with rules
2023-02-07 13:41:37 +00:00
cpq 1c749a5310 Add filter for cifuzz 2023-02-07 12:17:46 +00:00
cpq a647a69791 Add examples/readme with rules 2023-02-07 12:15:50 +00:00
Sergey Lyubka 12db089c73 Merge pull request #2027 from cesanta/mip
Introduce sysinit.c, better debug log, more verbose Makefile
2023-02-06 22:38:33 +00:00
cpq f5ff7cfcf1 Introduce sysinit.c, better debug log, more verbose Makefile 2023-02-06 21:26:14 +00:00
Sergey Lyubka 2ddf71ec46 Merge pull request #2024 from cesanta/cmsis
Use CMSIS headers for f429 and f746 baremetal examples
2023-02-06 19:16:24 +00:00
Sergio R. Caprile 9017374292 Merge pull request #2025 from cesanta/ga
Tune GA checker
2023-02-06 14:28:26 -03:00
cpq 633f50cf5b Tune GA checker 2023-02-06 15:18:40 +00:00
cpq 1993e9c65b Use CMSIS headers for f429 and f746 baremetal examples 2023-02-06 15:00:09 +00:00
Sergio R. Caprile 8edc8610dc Merge pull request #2023 from cesanta/push
Reduce the number of redundant test runs. Disable SNTP test on macos …
2023-02-06 11:25:33 -03:00
Sergey Lyubka 6700b373cd Merge pull request #2022 from cesanta/win
Adopt Makefile for Windows. Update examples readme section
2023-02-06 14:21:56 +00:00
cpq 8d824799a0 Reduce the number of redundant test runs. Disable SNTP test on macos - it is flaky 2023-02-05 01:11:22 +00:00
cpq dc86c62d8b Adopt Makefile for Windows. Update examples readme section 2023-02-04 14:15:53 +00:00
Sergio R. Caprile 4ae4ff72e3 Merge pull request #2020 from cesanta/h743zi
Add STM32H743ZI driver and example
2023-02-03 18:33:46 -03:00
Sergio R. Caprile 958eebb16c Add STM32H743ZI driver and example 2023-02-03 18:04:29 -03:00
Sergio R. Caprile 43e48d2ba6 Merge pull request #2017 from cesanta/mipneat
qprofile related fixes
2023-02-02 17:34:28 -03:00
Sergio R. Caprile b6d8099c74 small tweaks
fix qprofile with latest changes

minor tweaks and qpfrofile related fixes
2023-02-02 17:09:27 -03:00
Sergio R. Caprile 25bac7c5ce Merge pull request #2016 from cesanta/percentia
Docs update, remove %I and %A extensions
2023-02-02 16:33:18 -03:00
Sergio R. Caprile 5d7a080e39 Remove %I and %A 2023-02-02 16:28:24 -03:00
Sergio R. Caprile b2a76dba98 Merge pull request #2014 from cesanta/halfnofast
Add support for 10M and half-duplex in STM32 and TM4C drivers
2023-02-02 13:30:35 -03:00
cpq 15ad69c8cb Add How to build examples section 2023-02-02 15:34:27 +00:00
Sergio R. Caprile e3ca006265 Add support for 10M and half-duplex in STM32 and TM4C drivers 2023-02-02 12:02:44 -03:00
cpq 961cc13948 Nits: fix DNS resolution message. Add Makefile comment for testing targets 2023-02-02 10:33:00 +00:00
Sergio R. Caprile 50da233258 Merge pull request #2011 from cesanta/test-f746
Update test.yml
2023-02-01 20:14:24 -03:00
Sergio R. Caprile 15ad58b5cc Merge pull request #2010 from cesanta/f429-debug-uart
Use UART_DEBUG
2023-02-01 19:53:53 -03:00
Sergio R. Caprile 61a27ff430 Update test.yml
closes #1999
( mods in #2009 )
2023-02-01 19:49:14 -03:00
Sergio R. Caprile befdb0a708 Merge pull request #2009 from cesanta/test-f746
Mods to be testable
2023-02-01 19:39:53 -03:00
Sergio R. Caprile 06b79600ac Use UART_DEBUG 2023-02-01 19:37:35 -03:00
Sergio R. Caprile b9e633ad06 Mods to be testable 2023-02-01 19:26:47 -03:00
Sergio R. Caprile 736a78faed Merge pull request #2007 from cesanta/rl
Better error handling for RL NET
2023-02-01 18:23:13 -03:00
cpq d76e69f9a7 Use UART_DEBUG 2023-02-01 21:08:24 +00:00
cpq 1612e1d142 Better error handling for RL NET 2023-02-01 13:59:47 +00:00
Sergio R. Caprile 56a33fd4c5 Merge pull request #2003 from cesanta/mip-percentia
Do not use %I %A in MIP
2023-02-01 09:15:15 -03:00
Sergio R. Caprile 1ca3244868 Merge pull request #2005 from cesanta/nosymlink
Remove symlinks in pico example
2023-01-31 15:40:37 -03:00
Sergio R. Caprile 8f358f09b8 Remove symlinks in pico example 2023-01-31 15:34:15 -03:00
Sergio R. Caprile d903de6526 Merge pull request #2004 from cesanta/nodupfiles
Remove dups in Zephyr dirs
2023-01-31 15:14:10 -03:00
Sergio R. Caprile c41ade2983 Remove dups in Zephyr dirs 2023-01-31 14:51:48 -03:00
Sergio R. Caprile 99dbbc7f39 Do not use %I %A in MIP 2023-01-31 14:37:00 -03:00
Sergio R. Caprile 4dd51cc889 Merge pull request #2002 from cesanta/print_mac
Add mg_print_mac()
2023-01-31 13:49:42 -03:00
Sergio R. Caprile 54c651f7e2 Add mg_print_mac() 2023-01-31 13:31:46 -03:00
Sergio R. Caprile d1c9d7ffdc Merge pull request #2000 from cesanta/tls
Add TLS to pico-w5500 baremetal example
2023-01-30 18:37:00 -03:00
cpq 052b40680d Add TLS to pico-w5500 baremetal example 2023-01-30 21:30:10 +00:00
Sergio R. Caprile b0d2519192 Merge pull request #2001 from cesanta/examples-percentia
do not use %I in examples
2023-01-30 18:21:18 -03:00
Sergio R. Caprile 997da11cc5 do not use %I 2023-01-30 17:13:38 -03:00
Sergio R. Caprile 476232ea22 Merge pull request #1995 from cesanta/mg_print_ip
Add mg_print_ip, mg_print_ip_port helper functions
2023-01-30 16:57:45 -03:00
Sergey Lyubka 4c83f4e2de Merge pull request #1987 from hakabahitoyo/bugfix-openssl-tls-sni
Bugfix OpenSSL TLS SNI
2023-01-30 11:43:43 +00:00
cpq 4bf39e18d9 Add mg_print_ip, mg_print_ip_port helper functions 2023-01-29 14:30:06 +00:00
cpq edfa533a4d Correct the description 2023-01-27 22:45:35 +00:00
cpq 28262145ab Better upload flow 2023-01-27 22:16:24 +00:00
cpq 51136ce982 Merge branch 'master' of github.com:cesanta/mongoose 2023-01-27 09:36:24 +00:00
cpq 84893ec582 Small usability nits 2023-01-27 09:36:16 +00:00
Sergio R. Caprile 4236405b90 Ready to release 2023-01-24 13:30:45 -03:00
Sergio R. Caprile 292c66e25c Merge pull request #1992 from cesanta/revert-1920-patch-1
Revert "Update comment for the path of rest API"
2023-01-24 11:42:18 -03:00
Sergio R. Caprile 5aa6c15c76 Revert "Update comment for the path of rest API" 2023-01-24 11:41:51 -03:00
Sergio R. Caprile 1f89dc47cb Merge pull request #1991 from cesanta/revert-1797-fix-typo
Revert "Fix typo in documentation"
2023-01-24 11:36:51 -03:00
Sergio R. Caprile 31393128c8 Revert "Fix typo in documentation" 2023-01-24 11:35:26 -03:00
Sergio R. Caprile 232a18425a Merge pull request #1990 from cesanta/revert-1705-master
Revert "fix the doc error: htts to https"
2023-01-24 11:33:02 -03:00
Sergio R. Caprile 88e2eb2a49 Revert "fix the doc error: htts to https" 2023-01-24 11:31:25 -03:00
Sergey Lyubka e635d5f748 Merge pull request #1986 from cesanta/w5
Add examples/rp2040/pico-w5500 to hwtest
2023-01-23 12:32:14 +00:00
Sergey Lyubka 08a23cdb2f Merge pull request #1988 from cesanta/h743
Add nucleo-h743zi-baremetal boilerplate, with HW test
2023-01-23 12:31:55 +00:00
cpq 1ead940623 Add nucleo-h743zi-baremetal boilerplate, with HW test 2023-01-22 11:48:56 +00:00
Hakaba Hitoyo 382362668e bugfix openssl tls sni 2023-01-22 14:27:44 +09:00
cpq 987f8bc949 Prep for msc 2023-01-21 13:42:25 +00:00
cpq 6f096333d3 make clean: invoke docker only when there is something to clean 2023-01-21 07:44:50 +00:00
cpq 5a25111b20 Add examples/rp2040/pico-w5500 to hwtest 2023-01-21 02:21:20 +00:00
Sergio R. Caprile c7cb16cafa Merge pull request #1984 from cesanta/ti-nodocker
Get rid of Docker (TI), part 2: FreeRTOS
2023-01-20 18:47:55 -03:00
Sergio R. Caprile a746a698b6 Merge pull request #1983 from cesanta/stm32-nodocker
Get rid of Docker, part 2: FreeRTOS
2023-01-20 18:47:27 -03:00
Sergio R. Caprile 9a7f7255ff Get rid of Docker, part 2: FreeRTOS 2023-01-20 18:20:19 -03:00
Sergio R. Caprile d3df6b8f4f Get rid of Docker (TI), part 2: FreeRTOS 2023-01-20 18:19:29 -03:00
Sergio R. Caprile fcffd17b11 Merge pull request #1982 from cesanta/freertos
Fix FreeRTOS arch includes on newlib platforms
2023-01-20 18:16:55 -03:00
Sergio R. Caprile 7fc6be9f39 Fix FreeRTOS arch includes on newlib platforms 2023-01-20 18:09:21 -03:00
Sergio R. Caprile 7362744ff8 Merge pull request #1981 from cesanta/stm32uarts
Fix UART1,2 clocking in all other examples
2023-01-20 18:00:46 -03:00
Sergio R. Caprile f4d058155a Fix UART1,2 clocking in all other examples 2023-01-20 17:49:57 -03:00
Sergio R. Caprile b04612e80d Merge pull request #1975 from cesanta/hwtest
Cleanup, adopt for HW test
2023-01-20 16:26:05 -03:00
Sergio R. Caprile 5f00e4d34d Merge pull request #1980 from cesanta/ti-nodocker
Get rid of Docker (TI), part 1
2023-01-20 16:21:45 -03:00
cpq e967feb091 Cleanup, adopt for HW test 2023-01-20 18:46:19 +00:00
Sergio R. Caprile 0445b18bb9 Merge pull request #1977 from cesanta/reallyclean
Apply a deeper cleanser
2023-01-20 15:36:51 -03:00
Sergio R. Caprile 99f1f749cf Apply a deeper cleanser 2023-01-20 15:27:37 -03:00
Sergio R. Caprile f4d16f1c47 Get rid of Docker (TI), part 1 2023-01-20 15:06:03 -03:00
Sergio R. Caprile 68071d6caf Merge pull request #1976 from cesanta/stm32-nodocker
Get rid of Docker, part 1
2023-01-20 14:14:07 -03:00
Sergio R. Caprile 44975da7db Get rid of Docker, part 1 2023-01-20 12:42:38 -03:00
Sergio R. Caprile e4566518b2 Merge pull request #1978 from cesanta/test-nosprintf
Make MacOS happy by getting rid of sprintf()
2023-01-20 12:41:09 -03:00
novlean c038cb5b96 Merge pull request #1979 from cesanta/novlean-patch-1
2023
2023-01-20 15:31:07 +00:00
novlean d7eb3db60b 2023 2023-01-20 15:28:16 +00:00
Sergio R. Caprile 44e781d7da Make MacOS happy be getting rid of sprintf() 2023-01-20 11:54:56 -03:00
Sergio R. Caprile 0951d58c8f Merge pull request #1974 from cesanta/stm32uarts
Fix AF in UART1,2
2023-01-19 16:31:55 -03:00
Sergio R. Caprile 37c0ed0b49 Fix AF in UART1,2 2023-01-19 15:28:51 -03:00
cpq 556bf7b888 Fix uart_init(), use correct AF for UART1/UART2 2023-01-19 10:31:26 +00:00
Sergey Lyubka 280be2eaea Merge pull request #1968 from cesanta/ackstream
Don't retrigger ACK timer
2023-01-18 08:52:12 +00:00
Sergio R. Caprile 13f9357f8e Merge pull request #1970 from cesanta/test-pico-rndis
Update test.yml
2023-01-17 15:19:45 -03:00
Sergio R. Caprile 56e015db0e Enable test for pico-rndis-dashboard 2023-01-17 14:58:05 -03:00
Sergio R. Caprile 1068fbf079 Merge pull request #1969 from cesanta/pico-dash
Simplify build
2023-01-17 13:59:54 -03:00
Sergio R. Caprile 45f7afb3e1 Simplify build 2023-01-17 13:54:22 -03:00
Sergio R. Caprile 0d3fc2b656 Don't retrigger ACK timer 2023-01-16 20:16:59 -03:00
Sergio R. Caprile 2dc66b2e3b Merge pull request #1966 from cesanta/test-pico-rmii
Update test.yml
2023-01-16 16:48:10 -03:00
Sergio R. Caprile 0b9129d8f5 Update test.yml 2023-01-16 15:36:50 -03:00
cpq 82d702fedc mg_url_encode() 0-terminate the destination 2023-01-16 15:05:04 +00:00
Sergey Lyubka 197be75677 Merge pull request #1960 from cesanta/keepalive
TCP keepalives
2023-01-16 10:40:28 +00:00
cpq 3f9aff1b10 Update uart logs with Ethernet status 2023-01-15 12:03:40 +00:00
Sergey Lyubka f5ed50fa88 Merge pull request #1959 from cesanta/handle-rst
Handle TCP RST
2023-01-14 00:16:40 +00:00
Sergio R. Caprile 645b52602f Update main.c 2023-01-13 15:08:00 -03:00
Sergio R. Caprile 27a8e60e9a TCP keepalives 2023-01-12 15:58:25 -03:00
Sergio R. Caprile 201ffa108b Handle TCP RST 2023-01-11 17:33:37 -03:00
Sergey Lyubka 1661bd6691 Merge pull request #1955 from cesanta/picormii
Add RMII example for RP2040
2023-01-11 10:40:10 +00:00
Sergio R. Caprile d431f4bbc5 Merge pull request #1957 from cesanta/pico-w5500
updated to ARCH_RP2040
2023-01-10 11:21:23 -03:00
Sergio R. Caprile 2b8e92a70d updated to ARCH_RP2040 2023-01-10 10:54:27 -03:00
Sergey Lyubka d70ab3cfa8 Merge pull request #1944 from cesanta/devdash
Add reduced functionality version
2023-01-10 12:31:03 +00:00
Sergey Lyubka 9402c6ad28 Merge pull request #1956 from cesanta/lbl
Rename struct mg_connection::label -> data. Make its size configurable
2023-01-10 08:34:22 +00:00
cpq da5e8e9778 Rename struct mg_connection::label -> data. Make its size configurable 2023-01-10 08:19:49 +00:00
Sergio R. Caprile feedfdf810 Update main.c 2023-01-09 14:31:04 -03:00
Sergio R. Caprile 6db0a502bf Add RMII example 2023-01-09 11:16:01 -03:00
Sergey Lyubka f07957d45e Merge pull request #1952 from cesanta/mipqueue
Rename mip_rxcb to mip_qwrite, add mip_qread and enforce rx() for drivers
2023-01-08 06:47:38 +00:00
cpq 3d75d71767 Do not show response handler in the rpc.list result 2023-01-08 06:38:08 +00:00
Sergio R. Caprile b259bdeddd Rename mip_rxcb to mip_qwrite, add mip_qread and enforce rx() for drivers 2023-01-03 19:33:26 -03:00
Sergey Lyubka 042465387f Merge pull request #1950 from cesanta/picodash
Add Pico dashboard
2023-01-02 20:14:34 +00:00
Sergio R. Caprile d09e4d648c Add Pico dashboard 2023-01-02 16:49:15 -03:00
Sergio R. Caprile 754910ad5f Merge pull request #1947 from cesanta/pico
Moved pico-w example
2023-01-02 15:48:24 -03:00
Sergio R. Caprile 977e080215 Update test.yml 2023-01-02 15:29:21 -03:00
Sergio R. Caprile a9ac947c96 Merge pull request #1949 from cesanta/scaprile-patch-1
Update test.yml
2023-01-02 15:23:15 -03:00
Sergio R. Caprile 28e6ef1d63 Update test.yml 2023-01-02 15:22:24 -03:00
Sergio R. Caprile b0f273157d Fix Makefile 2023-01-02 15:16:50 -03:00
Sergio R. Caprile 49add531c4 Moved pico-w example 2023-01-02 15:12:07 -03:00
cpq 8a1d2a5dca Install gcc-arm-none-eabi for examples 2023-01-02 17:53:55 +00:00
Sergey Lyubka 31c5883f5f Merge pull request #1946 from cesanta/rp2040-w5500
Add pico-w5500 example
2023-01-02 16:48:43 +00:00
Sergey Lyubka c625fbb43d Merge branch 'master' into rp2040-w5500 2023-01-02 16:48:34 +00:00
cpq 0f474e8d2a Add pico-w5500 example 2023-01-02 16:36:55 +00:00
Sergey Lyubka 73813a8383 Merge pull request #1943 from cesanta/add-test-for-RNDIS-examples
Update tests
2022-12-28 02:47:56 +00:00
Sergio R. Caprile d8fb110b56 Update test.yml 2022-12-27 20:34:10 -03:00
Sergio R. Caprile 77e62626a9 Add RNDIS examples to tests, remove "stm32/nucleo*" examples from "examples" test group 2022-12-27 20:27:08 -03:00
Sergio R. Caprile 24ee83f13d Update test.yml 2022-12-27 18:31:39 -03:00
Sergio R. Caprile 6791a36d85 Add reduced functionality version 2022-12-27 18:12:55 -03:00
Sergio R. Caprile c6a5a64e64 Update test.yml 2022-12-26 10:51:44 -03:00
Sergey Lyubka 311062dc41 Merge pull request #1938 from cesanta/F746rndis
Add RNDIS example for F7
2022-12-24 15:10:00 +00:00
Sergio R. Caprile 391ce1f009 Merge pull request #1939 from cesanta/tireadme
Added link to tutorial
2022-12-23 19:47:14 -03:00
Sergio R. Caprile 9f6d99352a Added link to tutorial 2022-12-23 19:45:57 -03:00
Sergio R. Caprile 02b1d6260a Add RNDIS example for F7 2022-12-23 19:28:33 -03:00
Sergio R. Caprile e8ade14259 Merge pull request #1937 from cesanta/tm4cdriverdata
Rename driver data structure
2022-12-23 16:27:42 -03:00
Sergio R. Caprile f0804dfed4 Merge pull request #1936 from cesanta/stm32driverdata
Rename driver data structure
2022-12-23 15:57:19 -03:00
Sergio R. Caprile f506344ada Rename driver data structure 2022-12-23 15:56:46 -03:00
Sergio R. Caprile ddca518cca Rename driver data structure 2022-12-23 15:45:30 -03:00
cpq 21d3678fa7 Add more on logging 2022-12-21 11:31:14 +00:00
cpq 3dd8d7d8e5 Add diagrams 2022-12-21 11:18:50 +00:00
Sergio R. Caprile 92aa538a84 Merge pull request #1934 from cesanta/myheart
Unbreak
2022-12-20 19:39:22 -03:00
Sergio R. Caprile 557a5583e8 Unbreak 2022-12-20 19:38:20 -03:00
Sergio R. Caprile b00ddff7dd Merge pull request #1933 from cesanta/fixmqttserver
Fix MQTT server example
2022-12-20 16:08:56 -03:00
Sergio R. Caprile cc3b311ab0 Fix MQTT server example 2022-12-20 16:06:46 -03:00
cpq 6cedca5d76 Remove DS_Store 2022-12-19 14:40:17 +00:00
Sergey Lyubka d82452e00f Merge pull request #1929 from cesanta/usb
Add TinyUSB example
2022-12-19 14:33:11 +00:00
cpq 57a5c0ba38 Add TinyUSB example 2022-12-19 14:31:54 +00:00
Sergio R. Caprile 28c8519e5b Merge pull request #1924 from cesanta/scaprile-patch-1
Update README.md
2022-12-15 10:31:37 -03:00
Sergio R. Caprile cfcb7191ea Update README.md 2022-12-15 09:52:19 -03:00
Sergey Lyubka 6921227ec8 Merge pull request #1915 from jfsimon1981/miptap
Mip tests and tuntap example to compile on OpenBSD natively.
2022-12-13 16:42:09 +00:00
Sergey Lyubka 1c9991ee83 Merge pull request #1916 from cesanta/stm32
Minor tweaks in STM32 examples
2022-12-13 16:40:38 +00:00
Sergey Lyubka fd475fcfff Merge pull request #1917 from cesanta/tm4c
Correct stack initialization
2022-12-13 16:40:10 +00:00
Sergio R. Caprile f47f995e90 Merge pull request #1921 from cesanta/scaprile-patch-1
Update test.yml
2022-12-13 13:02:11 -03:00
Sergio R. Caprile d93e943326 Update test.yml 2022-12-13 12:51:43 -03:00
Sergio R. Caprile 7ca9f2d5cd Merge pull request #1920 from jojo2massol/patch-1
Update comment for the path of rest API
2022-12-13 12:39:28 -03:00
jojo2massol ff1d45a008 Update comment for the path of rest API
rest api is available at `/rest` and not `/api/rest`
2022-12-13 15:33:51 +01:00
Sergio R. Caprile 53f0a72362 Merge pull request #1919 from cesanta/doc1918
Update README.md
2022-12-10 20:14:30 -03:00
Sergio R. Caprile 3a47242219 Update README.md
Closes #1918
2022-12-10 20:12:58 -03:00
Jean-Francois Simon 5556568feb Mip tests and tuntap example to compile on OpenBSD natively.
(updated for c++ build)

Fix typo
2022-12-09 18:48:05 +00:00
Sergio R. Caprile 6011a15cd4 Correct stack initialization 2022-12-09 15:47:23 -03:00
Sergio R. Caprile 2c014778d9 Minor tweaks in STM32 examples
Fix comments in newer mip initialization (main.c)
Correct stack initialization (boot.c)
Remove SCC clock enable when not needed (mcu.h)
2022-12-09 15:20:51 -03:00
Sergey Lyubka 0b2712f52f Merge pull request #1911 from cesanta/gwarp
Ask for gw mac when needed and not known
2022-12-09 11:51:40 +00:00
Sergey Lyubka 69f1acd823 Merge pull request #1912 from cesanta/nodupack
Avoid duplicated ACKs
2022-12-09 11:50:30 +00:00
cpq c0f15d50d6 Squash cppcheck warn 2022-12-09 09:29:34 +00:00
Sergio R. Caprile 1d3fe51e8b Avoid duplicated ACKs 2022-12-08 18:59:18 -03:00
Sergio R. Caprile d364d50c05 Improve MIP resiliency 2022-12-08 17:17:05 -03:00
Sergey Lyubka 615d324b11 Merge pull request #1906 from jfsimon1981/armfix
Fix arm and armhf test builds and unit_test runtime.
2022-12-07 18:31:29 +00:00
Jean-Francois Simon eb36b6755f Fix arm and armhf test builds and unit_test runtime.
Generalized with the correct define (comment from SC).
2022-12-07 17:09:13 +00:00
Sergey Lyubka 40c28d3b21 Merge pull request #1905 from cesanta/percentA
Use %I in mip.c
2022-12-07 07:22:10 +00:00
Sergio R. Caprile e726282023 Merge pull request #1908 from cesanta/tm4creadme
Add README
2022-12-06 17:10:19 -03:00
Sergio R. Caprile 327f734e4f Add README 2022-12-06 17:09:15 -03:00
Sergio R. Caprile b361f64d4f Merge pull request #1907 from cesanta/tests
Update test.yml
2022-12-06 16:25:47 -03:00
Sergio R. Caprile b38d215b3d Update test.yml 2022-12-06 15:53:18 -03:00
Sergio R. Caprile 99aa498bc4 Use %I in mip.c
Add %A to print hw address and use it in mip.c
Fix some debug data
2022-12-06 13:44:31 -03:00
Sergio R. Caprile f14798dec9 Merge pull request #1904 from cesanta/tm4cdriver
Improve TM4C driver
2022-12-06 11:08:44 -03:00
Sergio R. Caprile 65873f3dee Improve TM4C driver
- Fix clock guessing
- Frames are now read in order, and only host owned descriptors are checked
- Read as many frames as possible (but don't loop forever)
- Discard bad frames
- Fixed incorrect handling of RU bit and exit out of suspended condition
- If a frame arrives while processing, it will now generate a new interrupt (formerly it would wait for another frame to arrive as we reset the flag on exit)
2022-12-06 10:45:41 -03:00
Sergio R. Caprile fc98c88358 Merge pull request #1903 from cesanta/freemgstrdupdoc
Update README.md
2022-12-05 16:30:24 -03:00
Sergio R. Caprile 7c0440c148 Update README.md 2022-12-05 16:24:28 -03:00
Sergio R. Caprile ad051269ed Merge pull request #1899 from cesanta/castREADME
Update README.md
2022-12-04 19:17:23 -03:00
Sergio R. Caprile 497d8f25a1 Update README.md 2022-12-04 19:16:34 -03:00
Sergey Lyubka eb142f26f2 Merge pull request #1897 from cesanta/i
Fix #1888: add %I *printf specifier for IP address. Remove mg_ntoa, m…
2022-12-03 14:39:47 +00:00
cpq b01989f041 Fix #1888: add %I *printf specifier for IP address. Remove mg_ntoa, mg_straddr 2022-12-03 14:27:07 +00:00
Sergey Lyubka 84d89e80cd Merge pull request #1896 from cesanta/stm32driver
Improve STM32 driver
2022-12-03 09:40:38 +00:00
Sergio R. Caprile d059d2cda4 Improve STM32 driver 2022-12-02 19:47:29 -03:00
jfsimon1981 751413f050 MIP tuntap with dhcp added, enabled gitactions (#1890)
Enable DHCP with MIP tests.
Separate sources for high and low level stack tests.
Fixed assertion.
Added dhcpd.conf file.
2022-12-02 17:40:46 +01:00
Sergey Lyubka ce5e28554f Merge pull request #1891 from cesanta/baremetalREADMEs
Add links to tool installation in MIP hw examples
2022-12-02 07:12:46 +00:00
Sergio R. Caprile 860be3f96c Add links to tool installation in MIP hw examples 2022-12-01 17:23:16 -03:00
Sergey Lyubka 89fb3a3d6e Merge pull request #1889 from cesanta/mippoll
MG_EV_POLL generation on MIP
2022-12-01 07:25:19 +00:00
Sergio R. Caprile 474a07564c Make test NOT fail 2022-11-30 18:16:13 -03:00
Sergio R. Caprile 59b69a3b3b Add test for MG_EV_POLL generation 2022-11-30 12:13:45 -03:00
Sergey Lyubka 2553392e42 Merge pull request #1885 from cesanta/tm4c-freertos-mip
Add FreeRTOS + MIP example on TM4C
2022-11-29 15:17:48 +00:00
cpq fcd6901558 Fix broken mip_test 2022-11-29 14:55:36 +00:00
Sergio R. Caprile 716ffbb945 Add FreeRTOS + MIP tutorial on TM4C 2022-11-29 11:16:43 -03:00
Sergey Lyubka cd4b9aeafe Merge pull request #1884 from cesanta/macfilter
Fix MAC address filtering on STM32 and TM4C
2022-11-29 14:05:11 +00:00
Sergey Lyubka 5d712b6f54 Merge pull request #1886 from jfsimon1981/master
Release MIP tests using tuntap
2022-11-29 11:24:52 +00:00
Jean-Francois Simon 754c68fccc Release MIP tests using tuntap 2022-11-29 11:20:22 +01:00
Sergio R. Caprile 858f4da0d1 Fix MAC address filtering on STM32 and TM4C 2022-11-28 10:16:10 -03:00
Sergey Lyubka 90910a7a4f Merge pull request #1883 from cesanta/arpbcast
Fix sending ARP request for IP broadcasts
2022-11-26 11:58:16 +00:00
Sergey Lyubka cd218b59f9 Merge pull request #1882 from cesanta/f746zg-frertos-mip
Add FreeRTOS + MIP example on F746
2022-11-26 11:57:43 +00:00
Sergio R. Caprile 9625c49c95 Fix sending ARP request for IP broadcasts 2022-11-25 17:42:35 -03:00
Sergio R. Caprile 2dfed10d2e Add FreeRTOS + MIP example on F746 2022-11-25 16:57:35 -03:00
cpq a74d3737dc Fix mip-pcap 2022-11-25 14:23:59 +00:00
cpq 6c82a34aa0 Remove unused code 2022-11-25 10:00:04 +00:00
cpq 320d5656ac Remove unused code 2022-11-25 10:00:04 +00:00
Sergio R. Caprile a4a5778001 Merge pull request #1879 from cesanta/freestdlib
Add stdlib.h to includes in FreeRTOS arch
2022-11-24 10:34:24 -03:00
Sergio R. Caprile a80a003865 Add stdlib.h to includes in FreeRTOS arch 2022-11-24 10:15:03 -03:00
cpq 4607e46c6f Disable mip_test on macos 2022-11-24 07:21:55 +00:00
cpq 0aa3e2e49c Enable macos test 2022-11-24 07:02:17 +00:00
Sergio R. Caprile 595bb36956 Merge pull request #1878 from cesanta/Makefile
be able to flash target
2022-11-23 17:09:05 -03:00
Sergio R. Caprile afdf7e6df3 actually be able to flash target 2022-11-23 16:13:37 -03:00
Sergey Lyubka 3e1c7d7ef2 Merge pull request #1874 from cesanta/makefix
Fix wildcard in Makefile
2022-11-23 10:16:11 +00:00
cpq 7ce7c3deb7 Fix mingw build 2022-11-22 09:50:35 +00:00
Sergio R. Caprile c9b390ec60 Fix wildcard in Makefile 2022-11-21 16:57:15 -03:00
Sergey Lyubka cc2b826356 Merge pull request #1865 from jfsimon1981/master
Implemented MIP stack http_fetch()
2022-11-21 18:35:14 +00:00
Jean-Francois Simon 0b2c493731 Merge branch 'master' of https://github.com/jfsimon1981/mongoose 2022-11-21 15:33:42 +01:00
Jean-Francois Simon 0d7bbc51e7 Implemented MIP stack http_fetch()
This approach used tuntap driver for Linux/Unices
2022-11-21 15:32:45 +01:00
Sergey Lyubka db81c30d24 Merge pull request #1871 from cesanta/straddr
Fix mg_straddr() stack overwrite
2022-11-21 07:00:23 +00:00
cpq 41ea8de0d6 Mark request close for HTTP redirects 2022-11-20 12:18:15 +00:00
Sergio R. Caprile c4b5b37568 Fix mg_straddr() stack overwrite 2022-11-19 19:44:52 -03:00
Sergio R. Caprile 76e6b23a4f Update README.md 2022-11-18 18:06:48 -03:00
Sergio R. Caprile 283e295a98 Merge pull request #1869 from cesanta/miptap
Add missing include
2022-11-18 12:28:59 -03:00
Sergio R. Caprile 606009afb0 Add missing include
linux/if uses struct sockaddr that is defined in sys/socket.h. This breaks building on some systems. It went unnoticed as it was hidden by mongoose.h being included first
2022-11-18 10:51:58 -03:00
Sergey Lyubka da303b8b4f Merge pull request #1858 from cesanta/LAA
change MIP MAC to LAA
2022-11-18 10:41:12 +00:00
Sergey Lyubka d4048661ae Merge pull request #1857 from cesanta/scaprile-patch-1
Update issue_template.md
2022-11-18 10:39:34 +00:00
Sergey Lyubka 47853547ca Merge pull request #1856 from cesanta/zephyr-tests
Zephyr tests
2022-11-18 10:39:13 +00:00
Jean-Francois Simon 6ae9188af4 Implemented MIP stack http_fetch()
This approach used tuntap driver for Linux/Unices
2022-11-16 18:26:49 +01:00
jfsimon1981 d958ec2ac8 Revert "mip_test.c http fetch (#1851)" (#1864)
This reverts commit 07aac8e6e9.
2022-11-16 18:02:23 +01:00
jfsimon1981andJean-Francois Simon 07aac8e6e9 mip_test.c http fetch (#1851)
* Update mip_test.c

* Adding mip_free() function.

* Adding mip_free() function.

* Added MIP free.

* Fixed C++ builds.

* Proper C/C++ struct initialization.

* Squashed commit of the following:

commit 7ba68dd20d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 16:19:50 2022 +0100

    Proper C/C++ struct initialization.

commit aeab3ef7ac
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 17:09:29 2022 +0100

    Fixed C++ builds.

commit 2afd529107
Merge: 14710b81 f8445a4c
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Tue Nov 15 11:33:56 2022 +0100

    Merge branch 'cesanta:master' into master

commit 14710b81e4
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:07:15 2022 +0100

    Added MIP free.

commit 6393cd149d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:06:44 2022 +0100

    Adding mip_free() function.

commit feee81b733
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:05:55 2022 +0100

    Adding mip_free() function.

commit f8445a4c85
Merge: a39b7ddb 71f5be01
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:42:38 2022 -0300

    Merge pull request #1853 from cesanta/tibaremetaltest

    Update test.yml

commit 71f5be011b
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:15:01 2022 -0300

    Update test.yml

commit b53d3cf032
Merge: 7a71038a a39b7ddb
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Fri Nov 11 16:10:53 2022 +0100

    Merge branch 'cesanta:master' into master

commit 7a71038a27
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Fri Nov 11 16:09:22 2022 +0100

    Update mip_test.c

commit a39b7ddbac
Author: cpq <valenok@gmail.com>
Date:   Fri Nov 11 15:03:48 2022 +0000

    Fix fuzzer use-after-poison READ 1

* Squashed commit of the following:

commit 192ae56ece
Merge: 7b0509c8 7ba68dd2
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 17:44:03 2022 +0100

    Merge branch 'master' of https://github.com/jfsimon1981/mongoose

commit 7b0509c878
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 17:43:33 2022 +0100

    Squashed commit of the following:

    commit 7ba68dd20d
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Wed Nov 16 16:19:50 2022 +0100

        Proper C/C++ struct initialization.

    commit aeab3ef7ac
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 17:09:29 2022 +0100

        Fixed C++ builds.

    commit 2afd529107
    Merge: 14710b81 f8445a4c
    Author: jfsimon1981 <jfsimon1981@gmail.com>
    Date:   Tue Nov 15 11:33:56 2022 +0100

        Merge branch 'cesanta:master' into master

    commit 14710b81e4
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 11:07:15 2022 +0100

        Added MIP free.

    commit 6393cd149d
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 11:06:44 2022 +0100

        Adding mip_free() function.

    commit feee81b733
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 11:05:55 2022 +0100

        Adding mip_free() function.

    commit f8445a4c85
    Merge: a39b7ddb 71f5be01
    Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
    Date:   Fri Nov 11 20:42:38 2022 -0300

        Merge pull request #1853 from cesanta/tibaremetaltest

        Update test.yml

    commit 71f5be011b
    Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
    Date:   Fri Nov 11 20:15:01 2022 -0300

        Update test.yml

    commit b53d3cf032
    Merge: 7a71038a a39b7ddb
    Author: jfsimon1981 <jfsimon1981@gmail.com>
    Date:   Fri Nov 11 16:10:53 2022 +0100

        Merge branch 'cesanta:master' into master

    commit 7a71038a27
    Author: jfsimon1981 <jfsimon1981@gmail.com>
    Date:   Fri Nov 11 16:09:22 2022 +0100

        Update mip_test.c

    commit a39b7ddbac
    Author: cpq <valenok@gmail.com>
    Date:   Fri Nov 11 15:03:48 2022 +0000

        Fix fuzzer use-after-poison READ 1

commit 7ba68dd20d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 16:19:50 2022 +0100

    Proper C/C++ struct initialization.

commit aeab3ef7ac
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 17:09:29 2022 +0100

    Fixed C++ builds.

commit 2afd529107
Merge: 14710b81 f8445a4c
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Tue Nov 15 11:33:56 2022 +0100

    Merge branch 'cesanta:master' into master

commit 14710b81e4
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:07:15 2022 +0100

    Added MIP free.

commit 6393cd149d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:06:44 2022 +0100

    Adding mip_free() function.

commit feee81b733
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:05:55 2022 +0100

    Adding mip_free() function.

commit f8445a4c85
Merge: a39b7ddb 71f5be01
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:42:38 2022 -0300

    Merge pull request #1853 from cesanta/tibaremetaltest

    Update test.yml

commit 71f5be011b
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:15:01 2022 -0300

    Update test.yml

commit b53d3cf032
Merge: 7a71038a a39b7ddb
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Fri Nov 11 16:10:53 2022 +0100

    Merge branch 'cesanta:master' into master

commit a39b7ddbac
Author: cpq <valenok@gmail.com>
Date:   Fri Nov 11 15:03:48 2022 +0000

    Fix fuzzer use-after-poison READ 1

Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2022-11-16 17:55:27 +01:00
Sergio R. Caprile 9a341c9032 change MIP MAC to LAA 2022-11-15 14:56:51 -03:00
Sergio R. Caprile 21e8b08ed9 Reduce Zephyr test time 2022-11-14 18:06:00 -03:00
Sergio R. Caprile c41d477adc Update issue_template.md 2022-11-14 14:58:36 -03:00
Sergio R. Caprile f8445a4c85 Merge pull request #1853 from cesanta/tibaremetaltest
Update test.yml
2022-11-11 20:42:38 -03:00
Sergio R. Caprile 71f5be011b Update test.yml 2022-11-11 20:15:01 -03:00
cpq a39b7ddbac Fix fuzzer use-after-poison READ 1 2022-11-11 15:03:48 +00:00
Sergio R. Caprile cab5c822c5 Merge pull request #1850 from cesanta/miplocal
Fix incorrect local network address detection
2022-11-11 11:58:29 -03:00
Sergey Lyubka 4056bd3c2d Merge pull request #1847 from cesanta/xiao
Fix arduino-xiao build and add GA test
2022-11-11 14:53:40 +00:00
Sergio R. Caprile a985ae9c0a Fix incorrect local network address detection 2022-11-11 11:18:47 -03:00
cpq 804a3bf380 Fix #1801 - report ipv4 accepted address for ipv4 listeners 2022-11-11 14:01:17 +00:00
Sergey Lyubka a8bef96463 Merge pull request #1844 from cesanta/tm4c129x
Add TM4C129x driver
2022-11-11 13:15:35 +00:00
Sergey Lyubka 5e43a3f695 Merge pull request #1846 from cesanta/ektm4c129x
Add EK-TM4C1294XL example
2022-11-11 13:15:20 +00:00
cpq 8e46e05e1b Fix arduino-xiao build and add GA test 2022-11-11 10:04:47 +00:00
Sergio R. Caprile ec0e27dbb4 Add EK-TM4C1294XL example 2022-11-10 21:14:30 -03:00
Sergio R. Caprile 3f55d93b41 Merge pull request #1845 from cesanta/mip-tap
Unbreak
2022-11-10 15:01:10 -03:00
Sergio R. Caprile 5418a8c28a Unbreak
userdata was changed to a pointer to a socket, but tx() was not updated

My Linux system does not like mongoose.h at the end...
2022-11-10 15:00:43 -03:00
Sergio R. Caprile e180192379 Add TM4C129x driver 2022-11-10 14:41:41 -03:00
cpq f498d69b7d Fix examples/stm32/nucleo-f429zi-freertos-mip 2022-11-10 03:01:10 +00:00
Sergio R. Caprile dfae1b3f70 Merge pull request #1843 from cesanta/mip
Expose mip guts
2022-11-09 17:40:46 -03:00
Sergio R. Caprile a9ebb55f95 Merge pull request #1842 from cesanta/ft
Add nucleo-f429zi-freertos-mip example
2022-11-09 16:28:33 -03:00
cpq abfac8aa40 Expose mip guts 2022-11-09 19:25:40 +00:00
cpq 78956ccf83 Add nucleo-f429zi-freertos-mip example 2022-11-09 18:25:11 +00:00
Sergey Lyubka eed25f23f6 Merge pull request #1839 from cesanta/stm32uart
Fix wrong reference to prescaler
2022-11-09 09:24:24 +00:00
Sergey Lyubka 134ce56f80 Merge pull request #1841 from cesanta/small
Endianness test
2022-11-09 09:23:04 +00:00
cpq 28a4778187 Endianness test 2022-11-09 09:20:15 +00:00
Sergio R. Caprile c654c2e5e8 Fix wrong reference to prescaler 2022-11-08 11:23:10 -03:00
Sergey Lyubka e580d4e637 Merge pull request #1837 from cesanta/arch
Create MG_ARCH_FREERTOS, MG_ENABLE_LWIP, MG_ENABLE_FREERTOS_TCP. Remo…
2022-11-08 00:13:28 +00:00
cpq 2192914cbb Create MG_ARCH_FREERTOS, MG_ENABLE_LWIP, MG_ENABLE_FREERTOS_TCP. Remove MG_ARCH_FREERTOS_TCP, MG_ARCH_RTX_LWIP 2022-11-07 23:58:58 +00:00
Sergio R. Caprile ca6dee1777 Merge pull request #1836 from cesanta/dewarning
Remove some warnings
2022-11-07 15:29:33 -03:00
Sergio R. Caprile 6f3bdc5dca Remove some warnings 2022-11-07 15:23:47 -03:00
Sergey Lyubka 095cdcd69e Merge pull request #1834 from cesanta/sock
Generalize socket constants
2022-11-05 13:11:57 +00:00
cpq f022633f29 Generalize socket constants 2022-11-05 12:33:49 +00:00
Sergey Lyubka 1f85fcc9b0 Merge pull request #1831 from cesanta/mqtt
Accept zero-length payload messages
2022-11-03 16:46:56 +00:00
Sergio R. Caprile a3ede75842 Accept zero-length payload messages 2022-11-03 11:26:08 -03:00
cpq 0defce37f0 Pull mongoose_custom.h 2022-11-03 12:59:55 +00:00
Sergey Lyubka 4355b39b1e Merge pull request #1830 from cesanta/mip
ARP lookup hosts in the same net. Use up-to-date code in zephyr dash …
2022-11-03 12:35:17 +00:00
cpq efec738c89 ARP lookup hosts in the same net. Use up-to-date code in zephyr dash example 2022-11-03 08:06:17 +00:00
Sergey Lyubka 10c09a361b Merge pull request #1829 from cesanta/cr
CR incorrectly set in STM32 driver
2022-11-02 23:18:20 +00:00
Sergio R. Caprile e3d1a69223 CR incorrectly set in STM32 driver 2022-11-02 19:25:05 -03:00
Sergey Lyubka 4b82253ae9 Merge pull request #1826 from cesanta/custom
mongoose_custom.h not pulled in when MG_ARCH=MG_ARCH_CUSTOM
2022-11-02 12:05:59 +00:00
Sergio R. Caprile 47a12c30ca mongoose_custom.h not pulled in when MG_ARCH=MG_ARCH_CUSTOM 2022-11-01 21:01:33 -03:00
cpq 613655767b Housekeeping at the end of c->label 2022-11-01 21:01:03 +00:00
Sergey Lyubka 1182027f1c Merge pull request #1823 from cesanta/ti-rtos
Fix TI-RTOS port
2022-10-30 09:41:48 +00:00
Sergio R. Caprile e9421d557a Fix TI-RTOS port
Sockets were not being put in non-blocking mode as the setsockopt() call wasn't using SOL_SOCKET
Do not include errno.h but serrno.h, otherwise error codes are mangled... NDK functions use serrno, errno belongs to the compiler
UDP sockets require binding to receive responses
select() does not return write-ready on connect if the amount of bytes to write is below the "low-water mark". This parameter defaults to 2048, there was some code apparently setting this otherwise, with no success. Reworked the code to set this water mark at half the buffer size by just using plain getsockopt/setsockopt calls.

For the record:
	TI typedef's void * SOCKET for internal use, INVALID_SOCKET is cast to (void *). Their BSD compatible socket interface expects and returns int; while Mongoose uses SOCKET... this generates lots of warnings 169 and 515, disabled in the examples
2022-10-28 18:55:10 -03:00
cpq bbc0c0df94 Unbreak test 2022-10-28 15:35:40 +01:00
Sergio R. Caprile 610e32714c Merge pull request #1822 from cesanta/hello
Add mg_hello()
2022-10-28 09:48:43 -03:00
cpq 7ab81d3805 Add mg_hello() 2022-10-28 10:57:06 +01:00
Sergey Lyubka 9a1e41e1fa Merge pull request #1821 from cesanta/docs
Augment WS documentation
2022-10-27 23:09:47 +01:00
Sergio R. Caprile ae71d12f06 Augment WS documentation 2022-10-27 12:03:16 -03:00
cpq c25234df83 Better MIP description 2022-10-27 08:12:22 +01:00
Sergey Lyubka 03284ba046 Merge pull request #1810 from cesanta/zephyresp
Support Zephyr on ESP32
2022-10-25 17:22:47 +01:00
Sergey Lyubka 5fa433ecca Merge pull request #1814 from cesanta/ti-rtos
Improve TI-RTOS timing support
2022-10-25 17:07:33 +01:00
Sergio R. Caprile ac2a4c700a Merge pull request #1818 from cesanta/ti
Allow flash and cloning without build
2022-10-25 10:55:46 -03:00
Sergio R. Caprile eeb7b00f60 Allow flash and cloning without build 2022-10-25 10:41:53 -03:00
Sergio R. Caprile c8c540b453 Improve TI-RTOS timing support 2022-10-24 11:48:54 -03:00
Sergio R. Caprile a0585f75f7 Support Zephyr on ESP32 2022-10-21 11:44:09 -03:00
Sergey Lyubka 637af1d392 Merge pull request #1809 from cesanta/picow
Make pico-w device-dashboard example fully functional
2022-10-20 18:24:38 +01:00
Sergio R. Caprile fe6c31acc1 Make pico-w device-dashboard example fully functional 2022-10-20 11:57:00 -03:00
Sergio R. Caprile 04cfcf751e Merge pull request #1805 from cesanta/invsock
Fix unintended socket close on systems with valid fd=0 descriptor numbering
2022-10-20 11:04:03 -03:00
Sergio R. Caprile 51c51d49ad Fix unintended socket close on systems with valid fd=0 descriptor numbering 2022-10-20 10:34:26 -03:00
cpq 4271aa5b1f Update matrix example name 2022-10-19 09:24:19 +01:00
cpq 17ada1c894 Fix #1803 - conditional for SSL_set1_host(). In unit test, disable time.windows.com, use google and apple SNTP servers 2022-10-19 09:06:47 +01:00
cpq 2e14d125ba Fuzzer nits 2022-10-18 15:21:59 +01:00
cpq ce8fa4c24b Echo WS CLOSE payload back 2022-10-18 14:31:47 +01:00
Sergey Lyubka cfe2e83e6b Merge pull request #1798 from Yeicor/patch-1
Remove mg_hexdump from deliver_chunked_chunks
2022-10-17 07:14:24 +01:00
Yeicor b17c62618d Remove mg_hexdump from deliver_chunked_chunks 2022-10-16 21:11:00 +02:00
Sergey Lyubka 6b162a1193 Merge pull request #1796 from cesanta/rpicow
Dettach git clone and fix clean
2022-10-16 16:59:19 +01:00
Sergey Lyubka 6653530b63 Merge pull request #1797 from strager/fix-typo
Fix typo in documentation
2022-10-16 16:58:20 +01:00
cpq aacae6444e Fix stack overflow in fuzzer - too big on-stack array 2022-10-15 17:18:31 +01:00
Matthew "strager" Glazar b91fe12258 Fix typo in documentation 2022-10-14 18:27:06 -07:00
Sergio R. Caprile ae7ca00e69 Dettach git clone and fix clean
The user has to clone the repo, then edit the Makefile to change WiFi credentials. Running make build does both and the tests go flawlessly
The user can run make to clone the repo, then change credentials and run make build, it will skip cloning if the repo is already there

In some systems the compiled files are not owned by the user as Docker runs as root, so we first invoke clean in the cloned repo (which erases the compiled files), and then remove the cloned repo that the user owns and can rm.
2022-10-14 12:09:39 -03:00
Sergio R. Caprile 0103f1f080 Merge pull request #1795 from cesanta/z
Use board nucleo_f429zi
2022-10-14 08:54:20 -03:00
cpq e8d29d54d6 Use board nucleo_f429zi 2022-10-14 11:39:00 +01:00
Sergey Lyubka 092f2ce0b3 Merge pull request #1794 from cesanta/addMissingTests
Update test.yml
2022-10-11 07:37:53 +01:00
Sergio R. Caprile d89233276b Update test.yml 2022-10-10 17:16:42 -03:00
Sergio R. Caprile 7d797187e8 Merge pull request #1793 from cesanta/device-dashboard
fix paths in Makefile (like other examples)
2022-10-10 17:01:43 -03:00
Sergio R. Caprile 6edcc72364 fix paths in Makefile 2022-10-10 16:51:07 -03:00
Sergey Lyubka 250dfc1377 Merge pull request #1790 from cesanta/zephyr-device-dashboard
Add device-dashboard example on Zephyr
2022-10-10 15:59:08 +01:00
Sergey Lyubka 45489c1c87 Merge pull request #1789 from zudwalex/picow
Add Pico-W example
2022-10-10 15:58:53 +01:00
Sergey Lyubka 09b250f189 Merge pull request #1787 from cesanta/zephyr
Update Zephyr examples
2022-10-10 15:58:39 +01:00
cpq a84465ddba Use MG_SOCK_LISTEN_BACKLOG_SIZE -> 128 for FreeRTOS-TCP 2022-10-10 13:41:07 +01:00
Sergey Lyubka 3b95671442 Merge pull request #1791 from zahar517/fix-json-rpc-example
Fix json-rpc-over-ws example
2022-10-10 10:35:29 +01:00
zahar517 52e66077a7 Fix json-rpc-over-ws example 2022-10-08 14:39:01 +03:00
Sergio R. Caprile 84bf4d21a3 Add device-dashboard example on Zephyr 2022-10-07 11:52:31 -03:00
Alex Alashkin 04cfc510d0 Add Pico-W example 2022-10-07 09:11:35 +03:00
Sergio R. Caprile d846e67ec1 Update Zephyr examples 2022-10-06 17:30:27 -03:00
Sergio R. Caprile 9c60a1bc10 Merge pull request #1788 from cesanta/mod-tests4zephyr
Update test.yml
2022-10-06 17:11:30 -03:00
Sergio R. Caprile f06ac52a43 Update test.yml 2022-10-06 16:55:13 -03:00
Sergio R. Caprile 9e5fd43a2d Update test.yml 2022-10-06 16:46:26 -03:00
Sergio R. Caprile 8d50e7dc82 Update test.yml 2022-10-06 16:32:33 -03:00
cpq 1e6b7bd2a6 Fix broken link 2022-10-05 11:49:06 +01:00
Sergey Lyubka 8346be7a81 Merge pull request #1783 from cesanta/zephyr
Update to latest Zephyr and their Docker repo
2022-10-05 11:41:55 +01:00
Sergey Lyubka 9dc5683fc2 Merge pull request #1785 from cesanta/device-dashboard
rename time() to ourtime()
2022-10-05 11:40:08 +01:00
Sergio R. Caprile e7cb82175a rename time() to ourtime() 2022-10-04 19:27:38 -03:00
Sergio R. Caprile 1ef0aa14c0 Update to latest Zephyr and their Docker repo 2022-10-04 17:24:13 -03:00
cpq 0b3f6d6aab Use CC for fuzzer, not CXX 2022-09-30 11:44:50 +01:00
Sergey Lyubka 0beef1d770 Merge pull request #1781 from jameshilliard/update-spdx
Update GPL license identifier
2022-09-29 20:29:07 +01:00
James Hilliard b944db30fd Update GPL license identifier
GPL-2.0 was deprecated in favor of GPL-2.0-only.

GPL-2.0+ was deprecated in favor of GPL-2.0-or-later.

See: https://spdx.org/licenses/
2022-09-29 15:18:10 -04:00
cpq 6cf3a3feaf Fix fuzzer 2022-09-29 19:31:52 +01:00
cpq 9680b8ccb3 Fix overflow in rx_icmp 2022-09-29 16:53:11 +01:00
cpq a88a11c243 Fix TX overflow in rx_icmp() 2022-09-29 11:13:40 +01:00
Sergey Lyubka 7ff76f69a1 Merge pull request #1777 from jameshilliard/disable-big-endian
Disable broken 32 bit tests and enable 32 bit little endian tests.
2022-09-29 07:33:15 +01:00
James Hilliard c2e4e6d221 Disable broken 32 bit tests and enable 32 bit little endian tests.
It appears there's a bunch of endian specific failing 32 bit tests.
2022-09-28 22:18:08 -06:00
Sergey Lyubka 60edc456a9 Merge pull request #1774 from cesanta/smtp-client
Fix wrong ca.pem path +
2022-09-28 21:58:20 +01:00
Sergey Lyubka 625f804130 Merge pull request #1776 from jameshilliard/32-bit-bigendian
Also test on 32 bit big endian ppc
2022-09-28 21:56:37 +01:00
Sergey Lyubka 7100aaedec Merge pull request #1775 from cesanta/endian
Fix endianness issues in unit test
2022-09-28 21:55:46 +01:00
James Hilliard c867dbc7b2 Also test on 32 bit big endian ppc 2022-09-28 16:02:32 -04:00
cpq 88097f1829 Fix endianness issues in unit test 2022-09-28 20:22:09 +01:00
Sergio R. Caprile 7cf4834336 Fix wrong ca.pem path
Remove extra EHLO before AUTH (there were two)
2022-09-28 16:05:29 -03:00
Sergey Lyubka b5355307a3 Merge pull request #1767 from jameshilliard/bigendian-tests
Test on big endian CPU architectures
2022-09-28 08:08:38 +01:00
James Hilliard 76f693e5d7 Test on big endian CPU architectures 2022-09-26 05:16:49 -04:00
Sergey Lyubka fb3b0ca6e3 Merge pull request #1765 from jameshilliard/rpc-add-calloc-null
Fix null pointer dereference in mg_rpc_add()
2022-09-25 23:22:57 +01:00
James Hilliard 3c71977e2e Fix null pointer dereference in mg_rpc_add()
Fixes #1736
2022-09-25 14:08:58 -04:00
cpq 5574a2663a Close connection on 3 keep-alive misses 2022-09-25 17:35:14 +01:00
cpq 41960b4212 Optimize fuzzer 2022-09-25 11:58:28 +01:00
Sergey Lyubka 6a500b8d40 Merge pull request #1764 from cesanta/fuzz
Optimize fuzzer
2022-09-25 10:31:21 +01:00
Sergey Lyubka dcede59379 Merge pull request #1743 from cesanta/stm32-nucleo-f746z
Stm32 nucleo f746z
2022-09-25 10:22:52 +01:00
Sergey Lyubka 695153c527 Merge pull request #1762 from gdawg/ssdp-example-fix-dupe-responses
Fix SSDP example for second and subsequent responses
2022-09-25 10:20:55 +01:00
cpq c409cca20e Optimize fuzzer 2022-09-25 10:19:17 +01:00
Sergey Lyubka a5a9204f83 Merge pull request #1754 from cesanta/iobuf_init
issue #1734, avoid passing null ptr to memmove
2022-09-24 07:18:42 +01:00
Andrew Griffiths 25d42ad345 Fix SSDP example for second and subsequent responses 2022-09-24 14:14:26 +10:00
Sergio R. Caprile f70a407611 issue #1734, avoid passing null ptr to memmove 2022-09-23 19:34:36 -03:00
Sergio R. Caprile 89f2e66c80 Merge pull request #1752 from cesanta/asan
Activate asan for mip_test
2022-09-23 09:45:18 -03:00
Sergio R. Caprile 4562be52d4 Merge pull request #1753 from cesanta/mg_vprintf
Get rid of va_copy
2022-09-23 09:30:09 -03:00
cpq ebd931f7af Get rid of va_copy 2022-09-23 08:59:02 +01:00
cpq 6a47ff6422 Activate asan for mip_test 2022-09-23 08:35:59 +01:00
cpq 1237185bb4 MIP: atomic -> volatile. Add lease time 2022-09-22 17:16:52 +01:00
Sergio R. Caprile d7fe819699 Merge pull request #1751 from cesanta/stm32-nucleo-f746zg
Add new example as per the tutorial
2022-09-22 12:00:15 -03:00
Sergio R. Caprile 770ffd1483 Add new example as per the tutorial 2022-09-22 11:32:52 -03:00
Sergio R. Caprile 9373e77636 Update Makefile as per the tutorial, enhance it 2022-09-22 11:01:40 -03:00
cpq cb5034548d Fix oob read in rx_dhcp() 2022-09-22 13:42:17 +01:00
Sergey Lyubka f9ad870ff0 Merge pull request #1750 from cesanta/make
Optimize makefile
2022-09-22 13:26:57 +01:00
cpq b538bc3871 Optimize makefile 2022-09-22 12:55:45 +01:00
Sergey Lyubka e5b0528aca Merge pull request #1742 from cesanta/mip-fuzz
Fuzzing MIP
2022-09-21 21:15:50 +01:00
cpq a12bd2271e Fuzzing MIP 2022-09-21 20:29:49 +01:00
Sergey Lyubka 15c5858732 Merge pull request #1746 from cesanta/dtoa
Fix issue #1733
2022-09-21 17:48:06 +01:00
Sergio R. Caprile dd4227f444 Fix issue #1733 2022-09-21 11:38:39 -03:00
Sergey Lyubka fe8a7d8db9 Merge pull request #1748 from cesanta/va_end
Fix issue #1735
2022-09-21 09:43:47 +01:00
Sergey Lyubka ec79ca71b2 Merge pull request #1747 from cesanta/timer_add
Fix issue #1737
2022-09-21 07:16:27 +01:00
Sergio R. Caprile 7a1544e76a Fix issue #1735 2022-09-20 14:26:06 -03:00
Sergio R. Caprile 27ffc23664 Fix issue #1737 2022-09-20 13:54:17 -03:00
Sergio R. Caprile 8ef8ee91e9 Merge pull request #1745 from cesanta/tls-hs
Update README.md with TLS_HS event
2022-09-20 10:53:27 -03:00
Sergio R. Caprile 571625f0c3 Update README.md 2022-09-20 10:52:45 -03:00
Sergio R. Caprile fc2d6eb6bb Merge pull request #1744 from cesanta/smtp
Add smtp client example
2022-09-20 10:38:16 -03:00
cpq 48800504be Add smtp client example 2022-09-20 11:34:22 +01:00
Sergey Lyubka f94a019733 Merge pull request #1741 from cesanta/tls
Fix mbedtls MG_IO_WAIT case
2022-09-19 14:06:31 +01:00
cpq 535d8b9e02 Fix mbedtls MG_IO_WAIT case 2022-09-19 13:38:59 +01:00
Sergey Lyubka 161d44ee04 Merge pull request #1730 from cesanta/stm32-nucleo-f429z
Update Makefile as per the tutorial
2022-09-13 21:46:41 +01:00
Sergey Lyubka 7ea155b943 Merge pull request #1729 from cesanta/mip-tap
Add example to use TAP interface on Linux
2022-09-13 21:46:06 +01:00
Sergio R. Caprile 30acef2452 Merge pull request #1727 from cesanta/mdc
Pass MDC clock divider explicitly rather than guess
2022-09-12 20:43:00 -03:00
cpq 82b50fd3a5 Pass MDC clock divider explicitly rather than guess 2022-09-12 23:57:04 +01:00
Sergio R. Caprile 9e5503dd04 Update Makefile as per the tutorial 2022-09-12 17:29:47 -03:00
Sergio R. Caprile 2ec2ed62c8 Add example to use TAP interface on Linux 2022-09-12 10:52:23 -03:00
cpq 274c11c3ec Update README 2022-09-11 13:42:59 +01:00
cpq 76c4bb556f Update README 2022-09-11 11:23:58 +01:00
cpq 40f484cc54 Update README 2022-09-11 11:20:53 +01:00
cpq 85b701b8c2 Formatting 2022-09-10 21:49:20 +01:00
Sergey Lyubka 7e875ba89d Merge pull request #1726 from cesanta/qp
Add MAC addr filtering to stm32 driver. Record free space in q profiler
2022-09-10 18:19:36 +01:00
cpq c718d7999f Add MAC addr filtering to stm32 driver. Record free space in q profiler 2022-09-10 16:38:03 +01:00
Sergey Lyubka d1472992da Merge pull request #1725 from cesanta/qprofile
Add irq and drop counters to qprofiler
2022-09-09 20:19:19 +01:00
Sergio R. Caprile 995f90aa49 Add irq and drop counters to qprofiler 2022-09-09 14:47:46 -03:00
Sergio R. Caprile a4c27618b4 Update README.md 2022-09-09 14:10:48 -03:00
Sergio R. Caprile 05019529f1 Merge pull request #1724 from cesanta/mgread
Pass long *bytes_read to MG_EV_READ
2022-09-09 14:09:50 -03:00
Sergio R. Caprile 1b5ab3261c Merge pull request #1722 from cesanta/mip-tls
Add mbedtls support to MIP
2022-09-09 14:09:19 -03:00
Sergey Lyubka 6033555ac0 Merge pull request #1723 from cesanta/pcap
Added Linux howto
2022-09-09 17:43:53 +01:00
cpq fd4e1975a3 Pass long *bytes_read to MG_EV_READ 2022-09-09 17:09:18 +01:00
cpq 124ac12150 Add mbedtls support to MIP 2022-09-09 15:53:42 +01:00
Sergio R. Caprile 8c1ffa3f5d Added Linux howto 2022-09-09 10:42:46 -03:00
cpq f76a7e36e8 Corrected MacOS setup diagram 2022-09-08 12:11:01 +01:00
cpq 6484c4bc8b Updated description 2022-09-08 12:09:30 +01:00
cpq bba2421ba9 Corrected MacOS setup diagram 2022-09-08 11:36:01 +01:00
cpq 3c69c7feaf Add MacOS setup diagram 2022-09-08 11:28:16 +01:00
cpq 45b2ffe1af Use DMG_HTTP_DIRLIST_TIME 2022-09-08 11:02:32 +01:00
cpq a57c0f4700 Fix #1712 - JSON parsing for keys with arrays 2022-09-08 10:59:23 +01:00
Sergey Lyubka c33116166f Merge pull request #1720 from cesanta/qprofile
Add rudimentary queue profiler
2022-09-08 10:37:01 +01:00
Sergey Lyubka 50a2063e45 Merge pull request #1713 from behnejad/master
display file modify date in "%Y/%m/%d %H:%M:%S".
2022-09-08 08:55:22 +01:00
cpq cd30cf2d6c Fix #1710 - free MIP in mg_mgr_free() 2022-09-08 08:53:54 +01:00
cpq 419126652e Merge branch 'master' of github.com:cesanta/mongoose 2022-09-08 08:50:51 +01:00
cpq 06ab83dca6 Implement keep-alive, 45 sec interval. Correct ACK piggyback 2022-09-08 08:50:42 +01:00
Sergio R. Caprile 313fddf722 Add rudimentary queue profiler
ETH IRQ and mip_poll() can both write to the queue, so if a memcpy() is interrupted we might see some weird records.
2022-09-07 17:14:03 -03:00
Sergey Lyubka f4def36ccb Merge pull request #1717 from cesanta/fixmipq
Fix MIP Q
2022-09-07 20:59:12 +01:00
Sergey Lyubka 4be8f2ba93 Merge pull request #1719 from cesanta/testq
Make mip_test fail with current queue algo
2022-09-07 20:58:29 +01:00
cpq 881b282604 Implement ack timer 2022-09-07 20:48:23 +01:00
Sergio R. Caprile 9675bfe07d Fix MIP Q 2022-09-07 14:59:58 -03:00
Sergio R. Caprile 443351e95a Make mip_test fail with current queue algo 2022-09-07 14:46:36 -03:00
Behnejad d4cd1c61ee fixing defines. 2022-09-07 22:08:50 +04:30
cpq 75892cb523 Add %f to src/fmt.c 2022-09-07 15:09:52 +01:00
Sergey Lyubka 63e0041644 Merge pull request #1715 from davidhozic/feature/1714
Bug Fix #1714
2022-09-07 15:03:51 +01:00
Sergey Lyubka 70e2d8dd4e Merge pull request #1716 from cesanta/pcap
Make mip-pcap work on Mac
2022-09-07 13:36:14 +01:00
cpq b2624f6055 Make mip-pcap work on Mac 2022-09-07 13:36:00 +01:00
David Hozic 0bb8144677 Bug Fix #1714 2022-09-07 13:35:32 +02:00
Behnejad ad50447ec6 display file modify date in "%Y/%m/%d %H:%M:%S".
adding compile time option to display file modification date as "%Y/%m/%d %H:%M:%S" in http directory indexing.
2022-09-07 09:04:15 +04:30
Sergey Lyubka 84de7437c6 Merge pull request #1711 from cesanta/ethrxsz
Fix Ethernet buffer size
2022-09-06 22:29:23 +01:00
Sergio R. Caprile 419dd50255 Fix Ethernet buffer size
1500 bytes is payload size, which is OK for tx. On the rx side, a full 802.1Q-tagged frame size is 1522 bytes, without the 4-byte CRC = 1518 bytes (1514 for non-VLAN-tagged frames).
2022-09-06 16:53:26 -03:00
Sergio R. Caprile 9dea02e578 Merge pull request #1708 from cesanta/ack
Add mip test
2022-09-05 12:11:24 -03:00
cpq 1c181e091e Add mip test 2022-09-05 15:56:03 +01:00
Sergio R. Caprile 32782bab0e Merge pull request #1706 from cesanta/mg_timer_expired
Introduce mg_timer_expired(). Adopt DHCP and link status to use it
2022-09-05 11:45:53 -03:00
cpq 330783cb5a Corrected clean and examples targets 2022-09-05 14:14:50 +01:00
Sergio R. Caprile 504b004e01 Merge pull request #1707 from cesanta/comments
Use single-line comments
2022-09-05 09:05:28 -03:00
cpq edb861da70 docs 2022-09-05 12:29:06 +01:00
cpq 64ad15895f Small nit in minimal HTTP server example 2022-09-05 12:26:43 +01:00
cpq 44b4944334 Use single-line comments 2022-09-03 09:49:41 +01:00
cpq f9272d0959 Introduce mg_timer_expired(). Adopt DHCP and link status to use it 2022-09-03 09:45:19 +01:00
Sergey Lyubka a113e344a1 Merge pull request #1704 from cesanta/acknow
Re-enable sending ACKs until proper mechanism is in place
2022-09-03 07:46:43 +01:00
Sergey Lyubka 2d80f03f01 Merge pull request #1705 from lionsoul2014/master
fix the doc error: htts to https
2022-09-03 07:44:01 +01:00
lion 542fe9f029 fix the doc error: htts to https 2022-09-03 10:51:09 +08:00
Sergio R. Caprile a1992f5910 Re-enable sending ACKs until proper mechanism is in place 2022-09-02 20:48:30 -03:00
Sergey Lyubka 45a057b0c6 Merge pull request #1703 from cesanta/stm32driver
Extend explanation for MDC clock
2022-09-02 20:02:05 +01:00
Sergio R. Caprile 4a1a26e8b7 Extend explanation for MDC clock 2022-09-02 15:03:46 -03:00
Sergey Lyubka db35e6a427 Merge pull request #1702 from cesanta/stm32driver
Add CR setup, set MDC based on HCLK
2022-09-02 18:46:31 +01:00
Sergio R. Caprile 7358ed25a5 Add CR setup, set MDC based on HCLK 2022-09-02 14:02:02 -03:00
cpq 0d385c29a3 More JSON tests 2022-09-02 16:23:39 +01:00
Sergey Lyubka 51076e68c8 Merge pull request #1701 from cesanta/enableFPU
Enable FPU
2022-09-02 15:46:00 +01:00
Sergio R. Caprile 3270f1252b Enable FPU 2022-09-02 11:18:11 -03:00
Sergey Lyubka d8ee105e1e Merge pull request #1699 from cesanta/scb
Fix SCB address for scb struct
2022-09-02 14:09:08 +01:00
cpq 567fccd7ee Refactor W5500 driver, add arduino w5500 example 2022-09-02 12:58:54 +01:00
cpq f7f7319698 Refactor W5500 driver, add arduino w5500 example 2022-09-02 12:58:54 +01:00
Sergio R. Caprile 62a6b61fc9 Fix SCB address for scb struct 2022-09-01 17:14:31 -03:00
Sergey Lyubka 1a87d9fa77 Merge pull request #1698 from oakfire/master
Fix mg_json_get for the array element result not as expected.
2022-09-01 09:14:10 +01:00
oakfire 8131e30002 Fix mg_json_get for the array element result not as expected. 2022-09-01 15:02:17 +08:00
cpq 83c76bdafc Make mongoose_custom.h a local include, for Arduino builds 2022-08-31 18:20:34 +01:00
cpq cf1566e116 Add more comments in json code 2022-08-31 17:59:04 +01:00
Sergey Lyubka 5d2c977029 Merge pull request #1697 from oakfire/master
fix: #1696  mg_json_get() bugs.
2022-08-31 17:55:12 +01:00
cpq 823c0ef5fb Add enc28j60 driver skeleton 2022-08-31 08:54:33 +01:00
cpq aefc588e6e Unbreak win98 build 2022-08-31 08:53:22 +01:00
cpq 1949439d69 Adopt mip changes 2022-08-31 08:44:05 +01:00
cpq c131b8daf1 struct mip_ipcfg -> struct mip_cfg 2022-08-31 08:41:16 +01:00
cpq 8a61969c8f Add struct mip_spi for SPI drivers, and skeleton for enc28j60 driver 2022-08-31 08:35:06 +01:00
Sergey Lyubka 3cf85770c7 Merge pull request #1694 from cesanta/nucleo-f746zg-baremetal
Group clock setup dependencies
2022-08-30 12:25:41 +01:00
Sergey Lyubka 310b339f0d Merge pull request #1691 from cesanta/docs
Moved packed filesystem section out of the docs
2022-08-30 12:24:30 +01:00
Sergey Lyubka 229b7810df Merge pull request #1695 from cesanta/nucleo-f429zi-baremetal
Add baremetal example on Nucleo-F429ZI
2022-08-30 12:24:15 +01:00
oakfire a686beb9a7 fix: #1696 mg_json_get() bugs. 2022-08-30 14:22:58 +08:00
Sergio R. Caprile 42c1bee8ea Add baremetal example on Nucleo-F429ZI 2022-08-29 19:20:20 -03:00
Sergio R. Caprile c289556775 Group clock setup dependencies 2022-08-29 14:36:40 -03:00
Sergio R. Caprile 941d2f2a3e Moved packed filesystem section out of the docs (relevant parts into the tutorial) 2022-08-29 10:43:29 -03:00
cpq 0a265e79a6 Remove debug log and add a comment 2022-08-29 13:10:11 +01:00
cpq 7f30c01c58 Correct condition check sequence for the prev fix 2022-08-29 13:01:56 +01:00
cpq 0661f5921a Fix #1690 - mg_json_get for keys with the same prefix 2022-08-29 12:40:50 +01:00
cpq 1c16e95b3a Fix driver link 2022-08-29 08:55:53 +01:00
cpq 44efa45d75 7.8 2022-08-28 14:11:08 +01:00
cpq ef89776517 Add reponse end to the http dir list 2022-08-28 13:58:41 +01:00
cpq 2f3f1357c8 Unbreak after mip init API change 2022-08-27 17:15:11 +01:00
cpq dcdeffff9a MIP refactor: use mg_hton*, move driver_data to ifp, parametrise f746 PLL setup 2022-08-27 16:45:31 +01:00
cpq 229b492ccc Minor refactorings, reduced MG_HTTP_MAX_HEADERS 40 -> 30 to reduce stack usage 2022-08-27 12:31:43 +01:00
cpq 2d45ba1981 Merge branch 'master' of github.com:cesanta/mongoose 2022-08-26 17:41:22 +01:00
cpq b73022096d Let RPC handle responses too 2022-08-26 17:41:13 +01:00
Sergio R. Caprile d1124703b7 Merge pull request #1687 from cesanta/webui-login
Fix SameSite cookie value
2022-08-26 10:24:00 -03:00
Sergio R. Caprile 4a8dd81c93 Fix SameSite cookie value 2022-08-26 10:22:31 -03:00
cpq f474a31484 Rebuild packed_fs.c 2022-08-26 14:21:33 +01:00
cpq e9ec2c5304 Add TLS support to MQTT 2022-08-26 14:20:54 +01:00
cpq c7b9ca68c2 Move mg_mqtt_next-* to the example, and some nits 2022-08-26 14:20:54 +01:00
Sergio R. Caprile ffa033cca9 Merge pull request #1686 from cesanta/device-dashboard
Fix SameSite cookie value
2022-08-26 10:19:08 -03:00
Sergio R. Caprile 3d3f6e09b6 Fix SameSite cookie value 2022-08-26 10:17:49 -03:00
Sergey Lyubka 7252f5385b Merge pull request #1683 from cesanta/multi-threaded
Show how to send data to a worker thread
2022-08-25 23:53:29 +01:00
Sergio R. Caprile ad641880a6 Show how to send data to a worker thread 2022-08-25 17:00:47 -03:00
Sergey Lyubka 1f6d62a635 Merge pull request #1684 from cesanta/nucleo-f746zg-baremetal
Workaround for aliased weak symbol override issue
2022-08-25 05:10:06 +01:00
Sergio R. Caprile 3cd4fd2d61 Workaround for aliased weak symbol override issue
Changed README to use picocom as cu is apparently not able to add carriage return after line feed
2022-08-24 19:02:11 -03:00
cpq d565faa75d Make non-initialised MIP poll work 2022-08-21 23:35:24 +01:00
cpq 786e118f06 Include mongoose_custom.h early to allow overrides 2022-08-20 18:26:29 +01:00
cpq eca612d514 Document all supported MG_ARCH choices 2022-08-20 03:44:29 +01:00
Sergey Lyubka 060f43839d Merge pull request #1680 from cesanta/esp8266
Expanded Makefile
2022-08-20 00:27:09 +01:00
cpq 9c3c4a6f4b MIP client 2022-08-20 00:03:15 +01:00
cpq 101cc1a672 Add define for strdup 2022-08-20 00:02:36 +01:00
Sergio R. Caprile e47f71344d Expanded Makefile 2022-08-19 18:17:52 -03:00
cpq fee6de6a7f Allow NULL head in struct mg_rpc 2022-08-19 15:08:01 +01:00
Sergey Lyubka 2bf25a1406 Merge pull request #1678 from cesanta/esp8266
Improved Makefile to be able to flash
2022-08-18 22:30:20 +01:00
Sergio R. Caprile dd59296be9 Improved Makefile to be able to flash
subtle mod in main.c comment
2022-08-18 17:41:05 -03:00
cpq b382726ed0 Build dashboard by default, fix FPU flag 2022-08-18 21:36:36 +01:00
Sergey Lyubka 01390fe540 Merge pull request #1675 from cesanta/stm32h743
Change README to point to new tutorial location
2022-08-17 08:30:41 +01:00
cpq 8596e1bef7 Enable FPU 2022-08-16 16:45:05 +01:00
Sergey Lyubka 13fffbc5b6 Merge pull request #1674 from cesanta/webui-preact
back to symbolic link
2022-08-16 11:56:08 +01:00
Sergey Lyubka 5f4857ddae Merge pull request #1673 from cesanta/docs
Change argument of %M handler to mg_pfn_t plus some cosmetic changes
2022-08-16 11:55:51 +01:00
Sergey Lyubka 5f36b41785 Merge pull request #1672 from cesanta/webui-push-rest
Change argument of %M handler to mg_pfn_t as in huge_response
2022-08-16 11:55:33 +01:00
Sergio R. Caprile bd8f0c90e1 back to symbolic link 2022-08-15 18:42:20 -03:00
Sergio R. Caprile f49683353d Change argument of %M handler to mg_pfn_t plus some cosmetic changes 2022-08-15 16:07:18 -03:00
Sergio R. Caprile 4f012d6bc6 Change argument of %M handler to mg_pfn_t as in huge_response 2022-08-15 16:04:17 -03:00
cpq e48e353066 Restore mg_file_write() to use tmp file 2022-08-15 16:08:34 +01:00
cpq 6ad7af54dc Fix docs, nits to freertos includes 2022-08-14 23:46:33 +01:00
cpq 6b69bef2ef mg_dtoa, mg_atod, mg_lld made static 2022-08-14 01:25:38 +01:00
cpq d2a27d3d91 mg_*rprintf -> mg_*xprintf 2022-08-13 20:34:20 +01:00
cpq 189aa80743 Update examples to NOT use mg_*mprintf 2022-08-13 20:09:51 +01:00
cpq f122bd5797 Update mg_log_set_fn() 2022-08-13 15:43:27 +01:00
cpq d76f86f7db Get rid of mg_*asprintf 2022-08-13 15:37:55 +01:00
cpq ccf5364187 Squash C++ warn 2022-08-13 14:57:15 +01:00
cpq a3bfe3e61a Use hand-crafted packet for large WS frame test 2022-08-13 14:52:43 +01:00
cpq de10e340b6 Update examples to use mg_http_reply 2022-08-13 14:52:10 +01:00
cpq 40ca26f23b Refactor mg_ws_connect() 2022-08-13 14:44:08 +01:00
cpq da28213613 Squash warning 2022-08-13 11:36:24 +01:00
cpq 6615a821f1 Test WS frames that are larger than 64k 2022-08-13 11:16:13 +01:00
Sergio R. Caprile d627d669bc Change README to point to new tutorial location 2022-08-12 17:08:18 -03:00
cpq ef6fbad0cb Better CFLAGS for SSL when building examples 2022-08-11 12:12:00 +01:00
cpq ef9f7d4c16 Change mg_ws_send: const char * -> const void * 2022-08-11 12:12:00 +01:00
Sergey Lyubka 44a0fa0986 Merge pull request #1670 from cesanta/index.gx-test
Add unit test for gzipped index when / is requested
2022-08-10 23:46:08 +01:00
Sergio R. Caprile 4d9338323a Add unit test for gzipped index when / is requested 2022-08-10 19:06:04 -03:00
Sergey Lyubka 1a6bfb65e6 Merge pull request #1669 from cesanta/embedded-filesystem
Add Embedded Filesystem example
2022-08-10 21:45:23 +01:00
Sergey Lyubka 3b112cc8c8 Merge pull request #1668 from cesanta/index.gz
check for gzipped index file when / is requested
2022-08-10 21:45:09 +01:00
Sergio R. Caprile 014a008c3a Add Embedded Filesystem example 2022-08-10 16:05:34 -03:00
Sergio R. Caprile 374be7b065 check for gzipped index file when / is requested 2022-08-10 15:54:24 -03:00
cpq 2ba3630de9 Remove dangerous mg_pfn_realloc(). Add %q printf specifier 2022-08-10 18:27:58 +01:00
cpq 24cb9467c0 Update docs for mg_rpc_process() 2022-08-10 15:35:07 +01:00
cpq 79c49e64e8 vc2017 -> vc17 2022-08-09 19:22:47 +01:00
cpq c8c0b8fb91 Squash vc98 warn 3 2022-08-09 19:17:40 +01:00
cpq e5585cb0e7 Squash vc98 warn 2 2022-08-09 18:58:58 +01:00
cpq bd32f6e2ef Squash warn on vc98 2022-08-09 15:49:54 +01:00
cpq 08f8ea0cd9 vc2017 -> vc17 2022-08-09 15:38:25 +01:00
cpq 2d48b28b0a Set dockerrun 2022-08-09 13:10:21 +01:00
cpq 9cfaee9b21 Multi-platform docker build 2022-08-09 13:02:50 +01:00
cpq 9393e271de Set dockercmd 2022-08-09 12:47:27 +01:00
cpq 948595fb3b Do not assert on SNTP and local clock diff, since local clock could be off 2022-08-09 12:45:10 +01:00
cpq 6149b619e7 Squash warnings 2022-08-09 12:39:40 +01:00
cpq b7406357c5 Fix #1600 - more precise SNTP time calculation 2022-08-09 12:13:23 +01:00
Sergey Lyubka 2279a51d52 Merge pull request #1666 from cesanta/tcp
Added TLS support
2022-08-08 20:57:11 +01:00
cpq 4d3d0995c9 Use only time.windows.com in SNTP test 2022-08-08 20:56:10 +01:00
Sergio R. Caprile 0ca752662d Added TLS support 2022-08-08 15:42:35 -03:00
cpq 4246f5d206 PATH_MAX -> MG_PATH_MAX 2022-08-06 22:26:07 +01:00
cpq e8289ec17d Fix #1648 - set MG_PATH_MAX to FILENAME_MAX on windows and unix 2022-08-06 22:19:55 +01:00
cpq cde441bca6 Remove tcpdump on port 123 2022-08-06 20:30:12 +01:00
cpq 740b609e1e Fix for deliver_normal_chunks() and a test case 2022-08-06 09:01:34 +01:00
cpq c459c17fab Update docs 2022-08-05 19:55:15 +01:00
cpq 11bbda9bb3 Update images 2022-08-05 19:44:55 +01:00
cpq 6a5c523948 Merge branch 'master' of github.com:cesanta/mongoose 2022-08-05 19:28:04 +01:00
cpq 99c23606c5 Add c->is_resp note 2022-08-05 19:27:56 +01:00
Sergey Lyubka 608b1ee156 Merge pull request #1665 from cesanta/esp32-device-dashboard
Changed README to point to new tutorial location
2022-08-05 19:20:35 +01:00
Sergey Lyubka 12ab5c9964 Merge pull request #1664 from gvanem/patch-1
Fix empty initializer
2022-08-05 19:19:55 +01:00
cpq 779c825e92 Fixes to chunked support when pipelining 2022-08-05 19:18:06 +01:00
Gisle Vanem 96df718304 Fix empty initializer
MSVC does not like such empty initializer:
  xamples/device-dashboard/net.c(116): error C2059: syntax error: '}'
2022-08-05 13:50:55 +02:00
Sergey Lyubka 4bee440a56 Merge pull request #1663 from cesanta/doc-rpc
Add pfn functions and RPC docs
2022-08-04 21:56:24 +01:00
Sergio R. Caprile bb4e4c7cda Add pfn functions docs
Add RPC docs
2022-08-04 17:20:00 -03:00
cpq 582ab220b3 Update mqtt docs 2022-08-04 18:50:20 +01:00
cpq 3e2ad83b2c Fix #1647 - add note in the doc that opts->root_dir is ignored by the mg_http_serve_file() 2022-08-04 17:47:48 +01:00
Sergey Lyubka ae29a1734c Merge pull request #1660 from cesanta/device-dashboard
device-dashboard: default to using packed fs, otherwise hw examples won't work
2022-08-04 17:13:03 +01:00
cpq 457ce5e563 Refactor chunking support. Fix #1656 2022-08-04 17:10:53 +01:00
Sergey Lyubka 154bdb08a9 Merge pull request #1659 from cesanta/scaprile-patch-1
Update README.md
2022-08-04 11:26:33 +01:00
Sergio R. Caprile 22b2dc9ea8 Update README.md 2022-08-03 14:38:12 -03:00
Sergey Lyubka 3ede1a4a5a Merge pull request #1658 from cesanta/ut-pause
Add unit test to check on server pausing between headers and data fir…
2022-08-03 16:20:14 +01:00
Sergio R. Caprile 9e3138b892 Add unit test to check on server pausing between headers and data firing a zero length MG_EV_HTTP_CHUNK 2022-08-03 12:09:24 -03:00
Sergey Lyubka 51cb40acd2 Enable epoll on linux 2022-08-03 15:07:26 +01:00
Sergey Lyubka 4702073458 Merge pull request #1655 from cesanta/esp32-uart-bridge
Fix for new mg_iobuf API
2022-08-03 08:40:04 +01:00
Sergio R. Caprile e01cffff46 Changed README to point to new tutorial location
Expanded Makefile to be able to flash with Docker and esputil
2022-08-02 16:10:34 -03:00
Sergio R. Caprile d88e438679 default to using packed fs, otherwise hw examples won't work 2022-08-02 16:06:19 -03:00
Sergio R. Caprile 70683fc8e7 Fix for new mg_iobuf API 2022-08-02 14:46:27 -03:00
Sergey Lyubka bd7ee0d1e8 Refactor mg_http_reply and mg_http_printf_chunk to use less allocs and mem copies 2022-08-01 21:07:42 +01:00
Sergey Lyubka 17e2fdd4cb Add align to struct mg_iobuf 2022-08-01 12:53:25 +01:00
Sergey Lyubka a468f58128 Use int debug level 2022-08-01 11:19:32 +01:00
Sergey Lyubka 581a0698af Expose rpc guts 2022-07-31 22:51:59 +01:00
Sergey Lyubka f02f88f336 mg_rpc_free -> mg_rpc_del 2022-07-30 21:13:30 +01:00
Sergey Lyubka 43d53b0616 Merge pull request #1650 from cesanta/esp32-uart
Fix Makefile
2022-07-30 07:57:37 +01:00
Sergey Lyubka 54d6bad5e5 Refactor JSON and RPC API 2022-07-30 07:55:26 +01:00
Sergio R. Caprile c37d4f768b Fix Makefile 2022-07-29 18:27:20 -03:00
Sergey Lyubka a4b003b7ac Merge pull request #1644 from cesanta/esp32_uart-bridge
Fix Makefile
2022-07-28 21:04:27 +01:00
Sergey Lyubka 433120ab22 Merge pull request #1637 from cesanta/webui-push-rest
Add data push using REST example
2022-07-28 20:54:20 +01:00
Sergio R. Caprile 109da5f515 Add data push using REST example 2022-07-28 10:20:22 -03:00
Sergey Lyubka 56e6cf406a Fix unamalgamated build 2022-07-28 10:47:12 +01:00
Sergey Lyubka a2289a0625 Fix unamalgamated build 2022-07-28 10:33:44 +01:00
Sergey Lyubka 02943a1082 Merge pull request #1649 from cesanta/tcp
Added plain TCP server and client example
2022-07-28 10:27:10 +01:00
Sergey Lyubka 64a36496e3 Merge pull request #1643 from cesanta/uart-bridge
Fixes to uart-bridge example
2022-07-28 10:26:51 +01:00
Sergey Lyubka f2009ebd62 Move mg_*printf* decls in fmt.h 2022-07-28 10:18:17 +01:00
Sergio R. Caprile 638892ca70 Fix incorrect oninput function call
Check a new config element is present before acting on the previous one

Correctly update config local copy

Fix TCP buffering for ever
2022-07-27 17:19:34 -03:00
Sergio R. Caprile 90fdbd36ec Added plain TCP server and client example 2022-07-27 13:40:02 -03:00
Sergey Lyubka 0dabc45780 Add RPC API 2022-07-27 00:46:05 +01:00
Sergio R. Caprile 0ffec91984 Fix Makefile 2022-07-25 11:27:19 -03:00
Sergey Lyubka 9cacf443e1 Merge pull request #1636 from cesanta/webui-push-ws
Added data push over WS example
2022-07-25 11:03:06 +01:00
Sergey Lyubka 3f21be4fb0 Merge pull request #1639 from cesanta/docs
Add mg_ws_printf()/vprintf() doc
2022-07-25 10:54:06 +01:00
Sergey Lyubka 7587f8212e Merge pull request #1642 from cesanta/fix-json
Fix json's MG_EOO in nested objects
2022-07-25 10:53:30 +01:00
Sergio R. Caprile 1eed80375d Fix MG_EOO 2022-07-22 11:50:23 -03:00
Sergio R. Caprile 806eed6040 Add mg_ws_printf()/vprintf() doc 2022-07-21 11:46:50 -03:00
Sergey Lyubka d1828ecdb4 Merge pull request #1634 from cesanta/webui-plain
Fix former config value not being freed
2022-07-18 21:24:07 +01:00
Sergey Lyubka 5cddb8ecda Merge pull request #1633 from cesanta/webui-login
Added web UI login example
2022-07-18 21:23:41 +01:00
Sergio R. Caprile 1651d9d6d9 Fix former config value not being freed 2022-07-18 16:21:02 -03:00
Sergio R. Caprile 40fc049cdc Added web UI login example 2022-07-18 14:12:42 -03:00
Sergey Lyubka 89afe62121 Merge pull request #1627 from cesanta/webui-rest
added webUI REST basics example
2022-07-17 18:09:02 +01:00
Sergey Lyubka e5b40ee29e Merge pull request #1630 from cesanta/webui-plain
added webUI plain JS example
2022-07-17 18:08:45 +01:00
Sergey Lyubka 4a3d760c06 Add timer ID attribute, for safe cleanup in the scripted environment 2022-07-17 12:52:30 +01:00
Sergio R. Caprile aa326f975d Added data push over WS example 2022-07-15 21:32:41 -03:00
Sergey Lyubka 1fbf534f9a Merge pull request #1631 from cesanta/webui-preact-example
added webUI Preact-based example
2022-07-15 09:15:43 +01:00
Sergey Lyubka 86aa38bfd5 Merge pull request #1629 from jbrzusto/fix-mg_ntp_parse
NTP reponse gives fractional (not micro-) seconds, per RFC5905
2022-07-15 00:43:31 +01:00
Sergio R. Caprile ca929031ee added webUI Preact-based example 2022-07-13 14:41:38 -03:00
Sergio R. Caprile f80477a093 added webUI plain JS example 2022-07-13 11:07:01 -03:00
Sergio R. Caprile abd7698d6d added webUI REST basics example 2022-07-13 10:45:49 -03:00
John Brzustowski d5fe3261f4 NTP reponse gives fractional (not micro-) seconds, per RFC5905 2022-07-13 04:08:54 -03:00
Sergey Lyubka 3f46ae7beb Make generated packed_fs.c independent 2022-07-12 15:09:33 +01:00
Sergey Lyubka 46af09f776 Change ff_open to explicit memcpy() 2022-07-11 18:13:46 +01:00
Sergey Lyubka f40b272eeb Fix #1626 - ignore @ in query string 2022-07-10 15:41:43 +01:00
Sergey Lyubka 9876e3afd7 Merge pull request #1622 from cesanta/percentM
added mg_rprintf(), updated doc to new %M API
2022-07-10 11:15:52 +01:00
Sergio R. Caprile 41df6a6c0b added mg_rprintf(), updated doc to new %M API 2022-07-07 14:15:55 -03:00
Sergey Lyubka dbd25daff8 Merge pull request #1621 from cesanta/percentM
Update (fix) to new %M API
2022-07-07 14:44:54 +01:00
Sergio R. Caprile 71eefb6272 Update to new %M API
Doc still references the old API and mg_rprintf() is not yet documented
2022-07-06 19:01:18 -03:00
Sergey Lyubka a4a340dbd4 Merge branch 'master' of github.com:cesanta/mongoose 2022-07-04 19:18:27 +01:00
Sergey Lyubka 2c01893bb1 Give more time for unit test to detect conn refused on windows 2022-07-04 19:18:20 +01:00
Sergey Lyubka c4e496b001 Merge pull request #1618 from cesanta/mqtt
updated docs and example to recently exported MQTT result codes
2022-07-04 19:07:28 +01:00
Sergio R. Caprile 16e90c3082 updated docs and example to recently exported MQTT result codes 2022-07-04 14:32:12 -03:00
Sergey Lyubka 543b4a132b Fix POLLERR usage 2022-07-04 18:25:13 +01:00
Sergey Lyubka e4a5296fbf Introduce c->is_mqtt5 for keeping mqtt version. Make mqtt over ws work again 2022-07-04 17:47:17 +01:00
Sergey Lyubka 6c796b8552 Fix memset in mg_iotest, add mg_random_str test 2022-07-04 16:13:38 +01:00
Sergey Lyubka e30ad43d36 Merge pull request #1612 from cesanta/mqtt
Exported MQTT result codes
2022-07-04 15:15:19 +01:00
Sergey Lyubka f841b85d7d Merge pull request #1614 from cesanta/udp-ssdp-search
Added parsing of remote responses
2022-07-04 15:14:39 +01:00
Sergey Lyubka 735b7bece6 Squash more warns 2022-07-04 11:43:52 +01:00
Sergey Lyubka 4c9fdaf8b0 Merge pull request #1617 from jameshilliard/osx-clock
util: use correct clock on OSX
2022-07-04 11:12:58 +01:00
Sergey Lyubka 2ccc4acf34 Squash warns for rp2040 builds 2022-07-04 11:10:08 +01:00
James Hilliard c24343f107 util: use correct clock on OSX
CLOCK_MONOTONIC_RAW on OSX is not the same as CLOCK_MONOTONIC_RAW on linux
2022-07-04 04:04:43 -06:00
Sergey Lyubka 81ffcd8ee9 Fix #1616 - randomize mqtt will and client id for parallel test 2022-07-04 11:00:06 +01:00
Sergey Lyubka 432452ea9a Fix #1615 - prefer monotonic clock. Add clock for rp2040 2022-07-04 10:08:21 +01:00
Sergey Lyubka 6c14c7d623 Unbreak mac build 2022-07-04 00:06:01 +01:00
Sergey Lyubka 30126072dc Add MG_ARCH_RP2040 2022-07-03 23:00:15 +01:00
Sergio R. Caprile f7812c9b0a Added parsing of remote responses 2022-07-02 13:16:49 -03:00
Sergey Lyubka dca43f430b Fix poll support for win32 2022-07-02 12:45:44 +01:00
Sergey Lyubka 0947ce9234 Merge branch 'master' of github.com:cesanta/mongoose 2022-07-02 11:57:09 +01:00
Sergey Lyubka 91fa2ad23b Enable poll support on windows 2022-07-02 11:52:16 +01:00
Sergey Lyubka 1b57c56fdc Merge pull request #1613 from cesanta/typo
fix typo
2022-07-02 11:15:43 +01:00
Sergio R. Caprile d13509e302 Update app.js 2022-07-01 15:58:03 -03:00
Sergio R. Caprile 85d300ce71 Exported MQTT result codes 2022-07-01 15:32:24 -03:00
Sergey Lyubka d6e1a3ab4c Unbreak my heart ^W the build 2022-07-01 18:10:40 +01:00
Sergey Lyubka f1da8542ce Nits 2022-07-01 17:28:06 +01:00
Sergey Lyubka a183621268 Fix ff_write() call 2022-07-01 13:22:36 +01:00
Sergey Lyubka 035de980e3 Fix ff_read() call 2022-07-01 13:18:49 +01:00
Sergey Lyubka 99f0688377 Change mg_http_upload API 2022-06-30 21:54:50 +01:00
Sergey Lyubka 56412193e7 Add mg_remove_double_dots(), hide mg_http_upload() 2022-06-30 20:27:43 +01:00
Sergey Lyubka c5751b0bd3 Add mg_json_get_long 2022-06-30 20:03:29 +01:00
Sergey Lyubka 86e57d243d Enhance esp32 makefile 2022-06-30 19:59:23 +01:00
Sergey Lyubka 7fc57a3be7 Merge pull request #1610 from cesanta/http-restful-server
updated SSL build options
2022-06-30 12:27:25 +01:00
Sergio R. Caprile 75069a44c7 updated SSL build options 2022-06-29 17:31:31 -03:00
Sergey Lyubka 2536865c4d Fix freertos-tcp build 2022-06-29 19:39:36 +01:00
Sergey Lyubka d266f822ca Merge branch 'master' of github.com:cesanta/mongoose 2022-06-29 19:19:28 +01:00
Sergey Lyubka 5b8979a0f1 Better connect() result test 2022-06-29 19:19:19 +01:00
Sergey Lyubka 3bc79b9dfd Merge pull request #1609 from cesanta/mqtt-over-ws-client
Added openSSL support
2022-06-29 19:18:25 +01:00
Sergio R. Caprile 0ae75e6db6 Added openSSL support 2022-06-29 14:57:11 -03:00
Sergey Lyubka 89e2a15eb7 Fix build 2022-06-29 18:03:04 +01:00
Sergey Lyubka b1896d9944 Fix typo 2022-06-29 17:57:59 +01:00
Sergey Lyubka d0dedcfd2e Fix build 2022-06-29 17:54:33 +01:00
Sergey Lyubka 73297c8e65 Use mg_putchar_iobuf in mg_vprintf 2022-06-29 17:42:55 +01:00
Sergey Lyubka 017c7290d6 Better error handling - report from iotest 2022-06-29 17:02:37 +01:00
Sergey Lyubka 6a8b5b06d0 Merge pull request #1608 from cesanta/fix_mqtt-over-ws-client
fix incorrect WS packet payload
2022-06-29 14:51:39 +01:00
Sergey Lyubka 93a6bc501e Refactor guess_mime_type() 2022-06-29 10:28:37 +01:00
Sergey Lyubka e8f050c194 Dont use realloc 2022-06-29 00:00:16 +01:00
Sergio R. Caprile 712517b6fa fix incorrect WS packet payload 2022-06-28 16:27:49 -03:00
Sergey Lyubka 434378eda5 Merge pull request #1602 from cesanta/device-dashboard
fixed watch() not being called after login
2022-06-28 20:24:36 +01:00
Sergey Lyubka cf38fdb720 Merge pull request #1606 from cesanta/mqtt-client
fixed TLS build comment
2022-06-28 20:23:45 +01:00
Sergey Lyubka 95d30cf482 Merge pull request #1607 from cesanta/http-client
fixed TLS build comment
2022-06-28 20:20:35 +01:00
Sergio R. Caprile 6542c02b7f fixed TLS build comment 2022-06-28 10:56:56 -03:00
Sergio R. Caprile a13144932a fixed TLS build comment 2022-06-28 10:49:45 -03:00
Sergio R. Caprile 6597830631 fixed watch() not being called after login 2022-06-28 10:26:32 -03:00
Sergey Lyubka ba08140197 Initial mqtt5 support 2022-06-28 11:31:13 +01:00
Sergey Lyubka d65ce3b596 Add mg_rprintf, mg_vrprintf 2022-06-28 00:45:52 +01:00
Sergey Lyubka 4864a6e618 Use SSL_set1_host() 2022-06-28 00:45:47 +01:00
Sergey Lyubka 2bbb2bb1db Merge branch 'master' of github.com:cesanta/mongoose 2022-06-24 14:27:29 +01:00
Sergey Lyubka 47ce004f61 docs nits 2022-06-24 14:24:14 +01:00
Sergey Lyubka 507e392509 Merge pull request #1601 from cesanta/device-dashboard
updated and cleaned up texts
2022-06-24 14:09:36 +01:00
Sergio R. Caprile dcfb014d1f updated and cleaned up texts 2022-06-23 15:33:31 -03:00
Sergey Lyubka 4e880fb6e0 Nit - fix openssl error message 2022-06-23 13:11:04 +01:00
Sergey Lyubka 898e2b1e30 Add mg_json_get_hex(), mg_json_get_b64() 2022-06-22 16:28:22 +01:00
Sergey Lyubka a68f3dc4eb Add %V and %H specifiers for mg_snrpintf() 2022-06-22 13:15:52 +01:00
Sergey Lyubka c446fe0c6d Make stm32 eth declared as volatile 2022-06-21 12:11:59 +01:00
Sergey Lyubka 4246e6c768 Fix #1599 2022-06-21 12:07:00 +01:00
Sergey Lyubka 4f9cfdf65d Merge pull request #1598 from cesanta/http-reverse-proxy
Added openSSL support
2022-06-20 22:00:14 +01:00
Sergey Lyubka b1cd233dda Merge pull request #1597 from cesanta/http-proxy-client
Added openSSL support
2022-06-20 21:59:48 +01:00
Sergey Lyubka 4f63b6093f Merge pull request #1595 from cesanta/http-client
fixed comment, updated TLS section in makefile
2022-06-20 21:59:24 +01:00
Sergio R. Caprile 380a50e39b Added openSSL support
Fixed missing parameter in makefile
Added URI handling
2022-06-20 15:27:46 -03:00
Sergio R. Caprile 3bd3a4ff7b fixed comment, updated TLS section in makefile 2022-06-20 14:50:45 -03:00
Sergey Lyubka 46bf79455c Add examples/esp32/uart-bridge 2022-06-19 18:27:37 +01:00
Sergey Lyubka 2d5c26d44f Rename mg_log_set_fn properly 2022-06-19 09:08:37 +01:00
Sergey Lyubka 9760b7c9d6 Add mg_log_set_fn(), MG_ENABLE_LOG 2022-06-19 09:04:22 +01:00
Sergey Lyubka 0b5a00c99a Change uart_read signature 2022-06-18 20:41:04 +01:00
Sergey Lyubka ba8482c707 Update uart bridge 2022-06-18 11:32:31 +01:00
Sergey Lyubka 1b34360b05 Update uart bridge 2022-06-18 11:30:44 +01:00
Sergey Lyubka c84dab21e4 Refactor UART example 2022-06-18 04:25:11 +01:00
Sergey Lyubka 1640287897 Add mg_http_var 2022-06-18 04:25:11 +01:00
Sergey Lyubka adcf5bab0e Merge pull request #1589 from cesanta/mqtt-client
Add support for openSSL
2022-06-17 22:04:38 +01:00
Sergey Lyubka e024700851 Merge pull request #1593 from cesanta/file-uploads
update file upload example set
2022-06-17 22:03:58 +01:00
Sergio R. Caprile f4fc33d111 brought back 7.5 file-upload as file-upload-multiple-posts; updated to latest API
renamed form-upload to file-upload-html-form
renamed file-upload to file-upload-single-post
2022-06-17 16:35:02 -03:00
Sergio R. Caprile fb446022e2 Added openSSL support
Backend host is https only if TLS is enabled
2022-06-16 11:59:06 -03:00
Sergio R. Caprile e021d7cd9d Add support for openSSL 2022-06-15 10:42:32 -03:00
Sergey Lyubka 3331ed2f49 Merge pull request #1591 from cesanta/jsondoc
fix JSON docs
2022-06-15 06:56:08 +01:00
Sergio R. Caprile 939a8ddc26 fix JSON docs 2022-06-14 14:19:25 -03:00
Sergey Lyubka 3774f676cf Less verbose unit test 2022-06-13 21:12:11 +01:00
Sergey Lyubka 7923509d1e More json docs 2022-06-13 15:04:52 +01:00
Sergey Lyubka 30d6a44b0d Fix mg_http_upload() 2022-06-13 14:48:52 +01:00
Sergey Lyubka 6d46ecaa6c Add mip-pcap example 2022-06-13 02:03:52 +01:00
Sergey Lyubka 5a448ab4f5 Compile driver_stm32.c only for __arm__ 2022-06-13 01:04:09 +01:00
Sergey Lyubka a71262437d Use mip for arm and riscv targets 2022-06-12 12:43:01 +01:00
Sergey Lyubka 52ab963845 Update images 2022-06-11 22:59:20 +01:00
Sergey Lyubka 67280724ba Remove pragma 2022-06-11 19:05:07 +01:00
Sergey Lyubka d8a4b5aa34 Make mip MSVC friendly 2022-06-11 18:54:32 +01:00
Sergey Lyubka fe0b2d0646 Fix typo 2022-06-11 17:40:48 +01:00
Sergey Lyubka d3368e4aad Move mip into mip/ 2022-06-11 17:29:45 +01:00
Sergey Lyubka 903b510411 Merge pull request #1587 from cesanta/timers
fixed poll timeout being larger than timer period
2022-06-10 22:57:44 +01:00
Sergio R. Caprile 0dbc99d9ee fixed poll timeout being larger than timer period 2022-06-10 16:59:14 -03:00
Sergio R. Caprile 505ca96547 fixed typo 2022-06-10 16:25:56 -03:00
Sergey Lyubka 89623d00f9 Update readme 2022-06-10 18:48:32 +01:00
Sergey Lyubka e47bcb3fb6 Merge pull request #1583 from cesanta/multi-threaded
Remove outdated comments
2022-06-10 15:21:32 +01:00
Sergey Lyubka 50d0d68f45 Docs nitpick 2022-06-10 15:00:34 +01:00
Sergio R. Caprile 2f75418c70 Remove outdated comments 2022-06-10 10:37:12 -03:00
Sergey Lyubka 013bc58371 Add json docs 2022-06-10 13:01:52 +01:00
Sergey Lyubka 55948cd431 Allow to set log level 2022-06-10 12:33:30 +01:00
Sergey Lyubka dfca896a64 Update huge response. More tests 2022-06-10 12:14:42 +01:00
Sergey Lyubka 8fc6f3f744 Remove mjson dependency 2022-06-10 09:40:22 +01:00
Sergey Lyubka f65058fa03 Remove mjson dependency
Signed-off-by: Sergey Lyubka <valenok@gmail.com>
2022-06-10 09:39:53 +01:00
Sergey Lyubka 33567bab41 Add %g support to mg_snprintf() 2022-06-10 09:38:36 +01:00
Sergey Lyubka 106662b1d7 Add JSON API 2022-06-09 17:17:33 +01:00
Sergey Lyubka b73115c002 Unbreak build 2022-06-08 22:09:11 +01:00
Sergey Lyubka cff208c5a9 Introduce %Q format specifier, rework device dashboard 2022-06-08 21:44:01 +01:00
Sergey Lyubka a83dd9569d Unbreak esp32 example 2022-06-08 20:04:35 +01:00
Sergey Lyubka 807cd4df9e Make sock.c less verbose 2022-06-08 19:55:24 +01:00
Sergey Lyubka ac3151f871 Make dashboard more robust 2022-06-08 19:53:29 +01:00
Sergey Lyubka d4106b5cbd Send puback for qos > 0 2022-06-08 19:51:03 +01:00
Sergey Lyubka bcb6c2675f Unbreak esp32 device dashboard build 2022-06-08 13:54:20 +01:00
Sergey Lyubka 6b51666248 Move esp32 example 2022-06-08 13:24:41 +01:00
Sergey Lyubka 628a007112 Refresh packed filesystems 2022-06-08 13:22:09 +01:00
Sergey Lyubka ee65342545 docs 2022-06-08 11:30:54 +01:00
Sergey Lyubka 94ea973fb5 Update docs 2022-06-08 11:01:30 +01:00
Sergey Lyubka 9f8424e93f Update readme 2022-06-08 09:06:14 +01:00
Sergey Lyubka 2e750236be Add uart-bridge example 2022-06-08 08:58:32 +01:00
Sergey Lyubka c701315ab5 Merge pull request #1581 from behnejad/patch-1
fixing offset of Content-Length value.
2022-06-07 08:35:24 +01:00
Sergey Lyubka a53dc5c0a0 Fix #1580 - uri_to_path2 for / corner case 2022-06-07 04:33:46 +01:00
Behnejad 895ca80b2b fixing offset of Content-Length value.
in very large HTTP response, this offset might cause a problem with HTTP header format.
2022-06-07 08:00:12 +04:30
Sergey Lyubka 1dcb7dd13d Update mingw target 2022-06-07 00:25:15 +01:00
Sergey Lyubka e75afcba42 Update dash UI 2022-06-05 17:17:19 +01:00
Sergey Lyubka 0f0cf7a5db Integrate #1579 - properly clear c->is_readable and c->is_writable flags in mg_iotest() 2022-06-05 15:27:16 +01:00
Sergey Lyubka 31c7d66245 Rework dashboard 2022-06-05 14:59:59 +01:00
Sergey Lyubka cac7f653c9 Add mg_ws_printf() 2022-06-05 14:59:50 +01:00
Sergey Lyubka 219428c249 Change device dashboard to use MQTT 2022-06-04 22:21:59 +01:00
Sergey Lyubka f4fa1e097d docs 2022-06-04 08:45:34 +01:00
Sergey Lyubka 35b517b434 docs 2022-06-04 08:29:03 +01:00
Sergey Lyubka b3f956ba63 docs 2022-06-04 08:23:25 +01:00
Sergio R. Caprile 3ae8b3f8a7 Merge pull request #1577 from cesanta/sntp
Add sntp-time-sync example
2022-06-03 10:38:25 -03:00
Sergey Lyubka c48349ba56 Add sntp-time-sync example 2022-06-03 13:57:57 +01:00
Sergey Lyubka 0763146254 Fix #1476 - introduce c->is_full to cap the recv buf len for streaming connections 2022-06-03 11:37:35 +01:00
Sergio R. Caprile 7da5d42009 Merge pull request #1573 from cesanta/timers
Minor cosmetic changes
2022-06-02 10:06:41 -03:00
Sergey Lyubka 5ac847076a Change long read_conn -> void read_conn 2022-06-02 14:02:09 +01:00
Sergey Lyubka a88ea776a9 Change MG_MAX_RECV_BUF_SIZE -> MG_MAX_RECV_SIZE 2022-06-02 13:50:44 +01:00
Sergey Lyubka 73a5ff1fb6 Use only TFLAGS, get rid of EXTRA 2022-06-02 12:02:41 +01:00
Sergey Lyubka 7e8901c99f Docs - amend images 2022-06-02 12:02:26 +01:00
Sergey Lyubka 45816ef5db Add missing test file 2022-06-02 06:18:43 +01:00
Sergey Lyubka fe682f8399 Fix #1560 - implement precompressed .gz file serving 2022-06-02 06:13:37 +01:00
Sergey Lyubka 9ffb6fb26a Merge pull request #1570 from behnejad/patch-2
Update README.md
2022-06-01 21:17:52 +01:00
Sergey Lyubka 063244e4ca Minor cosmetic changes 2022-06-01 21:15:31 +01:00
Sergey Lyubka d7b7a0a577 Merge pull request #1572 from cesanta/timers
Modify times example
2022-06-01 17:22:24 +01:00
Sergey Lyubka f735585239 Update timers example 2022-06-01 17:09:15 +01:00
Sergey Lyubka 30349ec217 Update timers example 2022-06-01 17:09:13 +01:00
Sergey Lyubka 55517d48ed Change linux target 2022-06-01 16:25:04 +01:00
Behnejad 0f93ab84e9 Update README.md
after sending buffer to socket, MG_EV_WRITE will generated.
2022-06-01 14:36:17 +04:30
Sergey Lyubka 4dd1891594 Add mg_http_serve_opts.page404 2022-05-31 23:44:03 +01:00
Sergey Lyubka 27e1472d88 Merge pull request #1568 from behnejad/master
adding new api to enable separation of query string with '&'.
2022-05-31 18:25:12 +01:00
Sergey Lyubka a3d63c095a Handle #1562 - add udp/tcp extra param to mg_mkpipe() 2022-05-31 18:23:32 +01:00
Sergey Lyubka dc486a2aa3 Add pics 2022-05-31 12:01:06 +01:00
Sergey Lyubka 9963bdee09 Docs images 2022-05-31 11:38:03 +01:00
Hooman Behnejad 499401d457 adding mg_split function 2022-05-31 14:11:14 +04:30
Sergey Lyubka e2fcf5f92c Fix #1565 - mg_snprintf %.*s with zero len printing 2022-05-30 18:40:44 +01:00
Sergey Lyubka b8bba7513a Fix #1566 - proper error cleanup in mg_listen 2022-05-30 17:56:50 +01:00
Sergey Lyubka 65957527cb Fix #1558 - add opts.extra_headers in 304 responses 2022-05-30 17:44:26 +01:00
Sergey Lyubka e2ce68e3ef Fix build: delete -> del 2022-05-30 16:20:14 +01:00
Sergey Lyubka 44cf02e5ba Fix #1545 - do not send MG_EV_HTTP_MSG if chunks were deleted 2022-05-30 16:02:59 +01:00
Sergey Lyubka a4a70270ee Merge pull request #1564 from behnejad/patch-1
Update README.md
2022-05-30 14:32:17 +01:00
Behnejad 82e1cac1c7 Update README.md
added missing parameter in sample code of `mg_match`.
2022-05-29 18:22:56 +04:30
Sergey Lyubka 21ffe8e3f3 docs 2022-05-29 12:59:33 +01:00
Sergey Lyubka 45f20d5089 Update http_message diagram 2022-05-29 12:03:54 +01:00
Sergey Lyubka cea12a35b7 Merge pull request #1563 from vkoskiv/fix-docs
Small fix to mg_timer_add() documentation
2022-05-28 18:28:27 +01:00
Sergey Lyubka 686320a805 Remove verbose log in mg_iotest() 2022-05-27 23:18:23 +01:00
Sergey Lyubka 14ad51d2d2 More SNtp debug 12 2022-05-27 22:47:12 +01:00
Sergey Lyubka 28c15b3ff4 More SNtp debug 11 2022-05-27 22:36:34 +01:00
Sergey Lyubka f5af28c886 More SNtp debug 10 2022-05-27 22:26:17 +01:00
Sergey Lyubka 6b50039863 More SNtp debug 9 2022-05-27 22:24:45 +01:00
Sergey Lyubka 34c5f63c00 More SNtp debug 8 2022-05-27 22:18:14 +01:00
Sergey Lyubka 53bca4efab More SNtp debug 7 2022-05-27 22:08:05 +01:00
Sergey Lyubka 9029593691 More SNtp debug 6 2022-05-27 21:59:13 +01:00
Sergey Lyubka 4aad859e20 More SNtp debug 5 2022-05-27 21:44:03 +01:00
Sergey Lyubka b9d1d4a94f More SNtp debug 4 2022-05-27 20:48:19 +01:00
Sergey Lyubka be8b01e289 More SNtp debug 4 2022-05-27 20:43:30 +01:00
Sergey Lyubka 360dedd9b2 More SNtp debug 3 2022-05-27 20:39:37 +01:00
Sergey Lyubka e5d3d02307 More SNtp debug 2022-05-27 20:16:08 +01:00
Sergey Lyubka d3e14ca7e5 More SNTP debug 3 2022-05-27 20:05:14 +01:00
Sergey Lyubka 5998208449 More SNTP debug 2022-05-27 19:57:15 +01:00
Sergey Lyubka 4fc84621ae More SNTP debug 2022-05-27 19:55:39 +01:00
Valtteri Koskivuori 8253a84689 Small fix to mg_timer_add() documentation
The return value was not documented.
2022-05-26 23:43:56 +03:00
Sergey Lyubka 6b7f14c69d docs 2022-05-26 20:25:20 +01:00
Sergey Lyubka cfaca604f5 Debug SNTP issue 2 2022-05-26 17:50:56 +01:00
Sergey Lyubka 0226b9db31 Debug SNTP issue 2022-05-26 17:45:52 +01:00
Sergey Lyubka 7f8d12b9f7 Use time.windows.com too 2022-05-26 16:22:44 +01:00
Sergey Lyubka 2ae341cf5e Add nucleo-f746zg-baremetal 2022-05-26 13:53:36 +01:00
Sergey Lyubka 7850b550d8 Unbreak test 2022-05-26 11:18:36 +01:00
Sergey Lyubka 10596a8bdc Proper TLS handling for poll(). Make poll() default on linux 2022-05-26 08:55:28 +01:00
Sergey Lyubka 252e4715d4 Merge pull request #1561 from vkoskiv/add-poll
Add optional poll() implementation under MG_ENABLE_POLL define
2022-05-26 07:53:02 +01:00
Valtteri Koskivuori 420b989adb Add optional poll() implementation under MG_ENABLE_POLL
This adds the ability to substitute select() with poll() on supported
unix environments when MG_ENABLE_POLL is defined. A make flag called
USE_POLL is provided as well.
Using poll() removes the limitation of FD_SETSIZE concurrent sockets,
generally 1024 on Linux environments.
2022-05-26 06:00:27 +03:00
Sergey Lyubka bdb388c79d Fix pedantic warnings 2022-05-26 03:08:08 +01:00
Sergey Lyubka 87148f95f2 Clean up pedantic warnings 2022-05-26 02:50:15 +01:00
Sergey Lyubka fe124354cd Update custom build instructions 2022-05-26 02:10:28 +01:00
Sergey Lyubka 9a28fa71f0 Add -pedantic to gcc/clang CFLAGS 2022-05-26 02:10:07 +01:00
Sergey Lyubka 4139cdaf35 Remove poll() support 2022-05-26 02:07:37 +01:00
Sergey Lyubka ebe04620e1 Better custom build reference 2022-05-25 13:36:39 +01:00
Sergey Lyubka 7e053cd632 Typo fs docs 2022-05-25 13:29:49 +01:00
Sergey Lyubka 1fd65c77fe Enhance fs docs 2022-05-25 13:28:25 +01:00
Sergey Lyubka 2bfc838614 Fix build 2022-05-25 11:18:54 +01:00
Sergey Lyubka 69082db381 Regenerated packed fs 2022-05-25 11:15:00 +01:00
Sergey Lyubka 5ce2130f05 Minor formatting fix 2022-05-25 11:14:42 +01:00
Sergey Lyubka 5b448ec7a6 Integrate #1561 with some minor tweaks - add MG_ENABLE_POLL for poll() support 2022-05-25 11:14:12 +01:00
Sergey Lyubka f72b27d1c1 docs 2022-05-24 20:36:21 +01:00
Sergey Lyubka 9973c5f2b7 docs 2022-05-24 19:20:20 +01:00
Sergey Lyubka 88ee415dd1 docs 2022-05-24 19:19:42 +01:00
Sergey Lyubka 4f168cf346 docs 2022-05-24 19:18:42 +01:00
Sergey Lyubka ad7b5d2cd8 Change packed image 2022-05-24 19:14:20 +01:00
Sergey Lyubka 1e522de4a7 Change mg_iobuf image 2022-05-24 18:57:22 +01:00
Sergey Lyubka c2d2d085cd Add chart example 2022-05-23 15:27:19 +01:00
Sergey Lyubka b3a4c12d67 Handle #1559 - set no flags in send() call 2022-05-22 23:49:38 +01:00
Sergey Lyubka d5993ba27e Fix #1550 - excladdrinuse 2022-05-21 16:18:34 +01:00
Sergey Lyubka ef563603a9 Merge pull request #1557 from cesanta/pc
Remove mg_log_set_callback. Use MG_PUTCHAR macro instead
2022-05-20 10:16:57 +01:00
Sergey Lyubka 7e2ca72310 Remove mg_log_set_callback. Use MG_PUTCHAR macro instead 2022-05-20 09:45:17 +01:00
Sergey Lyubka 7c17c806ad 7.6 -> 7.7 2022-05-19 11:44:32 +01:00
Sergey Lyubka 8e0f529a00 Add MIP - an experimental TCP/IP stack 2022-05-18 21:19:21 +01:00
Sergey Lyubka 47e15a3d47 RTX nits 2022-05-17 19:29:53 +01:00
Sergey Lyubka cac7007069 Merge pull request #1554 from zudwalex/zephyr_ci
Use docker for Zephyr CI
2022-05-16 13:39:25 +01:00
Alex Alashkin ac55c900e7 Use docker for Zephyr CI 2022-05-16 15:30:25 +03:00
Sergey Lyubka 25806e48dc Fix ESP32 build 2022-05-16 11:54:26 +01:00
Sergey Lyubka 3871f4b6ab Fix #1546 - dont send excess for range requests 2022-05-16 11:45:08 +01:00
Sergey Lyubka 27c892806b Fix #1540 - case sensitive match in mg_is_chunked() 2022-05-16 11:19:45 +01:00
Sergey Lyubka 2b9f0480a1 Fix #1549 - fix typo in log format specifier 2022-05-15 21:02:41 +01:00
Sergey Lyubka 72cc433265 Make SNTP test more resilient 2022-05-15 19:41:37 +01:00
Sergey Lyubka 7721b074e6 Log ms in test_sntp() 2022-05-15 19:31:29 +01:00
Sergey Lyubka f5fd176b35 Increate SNTP timeout 3s->5s. Change mg_sntp_send() to mg_sntp_request(), remove one unnecessary parameter 2022-05-15 18:41:01 +01:00
Sergey Lyubka 6db1d7925e Merge pull request #1552 from zudwalex/ti_merged
Add TI support
2022-05-15 17:40:46 +01:00
Alex Alashkin 0ed7545947 Add TI support 2022-05-15 19:25:50 +03:00
Sergey Lyubka 95e22e8d4f Exporting only dashboard func 2022-05-15 14:40:58 +01:00
Sergey Lyubka cf7d1d8041 Address #1551 - better timers handling 2022-05-15 14:29:34 +01:00
Sergey Lyubka 443d0f0c6c Rename complete -> device-dashboard, remove multiple-logins and dashboard 2022-05-14 09:08:23 +01:00
Sergey Lyubka c20e48179f Un-break the test and untie serving code in dash example 2022-05-13 22:15:33 +01:00
Sergey Lyubka 3fbb7de712 Refactor dashboard example 2022-05-13 20:08:08 +01:00
Sergey Lyubka 0294603dfc MG_ARCH_RTX nits 2022-05-12 15:07:02 +01:00
Sergey Lyubka 5458252e4a Add missing src/arch_rtx.h 2022-05-12 08:23:17 +01:00
Sergey Lyubka 31ce219544 Add MG_ARCH_RTX 2022-05-12 08:07:51 +01:00
Sergey Lyubka 86cd567968 Nit - use quotes, not brackets for custom arch 2022-05-11 21:14:44 +01:00
Sergey Lyubka 5c66d32bc0 Refactor mg_open_listener() 2022-05-10 13:43:47 +01:00
Sergey Lyubka 5ac5c93c90 Refactor mg_open_listener() 2022-05-10 13:41:45 +01:00
Sergey Lyubka 84480f4072 Fix #1539 - proper timer cleanup 2022-05-10 07:38:03 +01:00
Sergey Lyubka b82953405d Fix valgrind test 2022-05-09 19:11:27 +01:00
Sergey Lyubka 5271626947 Disable SSI by default 2022-05-08 21:54:15 +01:00
Sergey Lyubka bc16854ccb Get rid of MG_ENABLE_LOG, change mg_hexdump() 2022-05-06 21:09:13 +01:00
Sergey Lyubka 6db0485c7b Set c->loc for accepted and UDP connections 2022-05-06 20:19:40 +01:00
Sergey Lyubka b5fc0d30a8 Add extraconnsize 2022-05-04 17:18:35 +01:00
Sergey Lyubka 38557aac7f Add MG_ARCH_NEWLIB 2022-05-01 13:47:33 +01:00
Sergey Lyubka d621fbfab1 Remove unused macros 2022-05-01 08:18:18 +01:00
Sergey Lyubka f19eec7fae Refactor multithreading API 2022-04-25 14:56:15 +01:00
Sergey Lyubka 8174842b05 docs 2022-04-24 11:39:54 +01:00
Sergey Lyubka ff07d261b2 docs 2022-04-24 11:37:23 +01:00
Sergey Lyubka c55db8a895 docs 2022-04-24 11:33:47 +01:00
Sergey Lyubka 70a9554b72 docs 2022-04-24 11:26:25 +01:00
Sergey Lyubka bdd7d92108 Fix #1533 - fix iotest error on windows 2022-04-22 20:53:54 +01:00
Sergey Lyubka a7cbc19755 Fix #1532 - improve ipv6 DNS lookup 2022-04-22 20:44:53 +01:00
Sergey Lyubka 93ff3e4d1f Add message sequence test 2022-04-21 03:13:31 +01:00
Sergey Lyubka 1dfc748e87 Add message sequence test 2022-04-21 02:50:50 +01:00
Sergey Lyubka e1f17a7ff1 Merge pull request #1531 from zudwalex/fix_tests
Fix zephyr tests
2022-04-20 11:38:00 +01:00
Alex Alashkin 56c40ff0fd Fix zephyr tests 2022-04-20 09:28:36 +03:00
Sergey Lyubka 9dd3b75165 Handle #1529 - do not mark normal conn termination as an error 2022-04-19 20:28:10 +01:00
Sergey Lyubka 20fc8f0279 Handle #1529: add automatic linkage against ws2_32.lib on _WIN32 targets 2022-04-19 18:51:28 +01:00
Sergey Lyubka 944704a12d Fix #1528: pack.c build on Win32 2022-04-19 18:46:29 +01:00
Sergey Lyubka fba9f14b2c Merge pull request #1526 from zudwalex/zephyr3
Add Zephyr build to Github actions
2022-04-19 09:03:30 +01:00
Alex Alaskin a7c24aeeee Add Zephyr build to Github actions 2022-04-13 19:54:08 +03:00
Sergey Lyubka 186eb998ba Adjust to timer API change, add root makefile 2022-04-13 14:03:00 +01:00
Sergey Lyubka d630ba743d Merge pull request #1524 from zudwalex/zephyr2
Add Zephyr examples
2022-04-13 11:17:22 +01:00
Sergey Lyubka e9fabdcc96 Handle #1523 - multiple WS messages 2022-04-13 11:14:57 +01:00
Sergey Lyubka 31698678fb Squash warning 2022-04-13 10:52:06 +01:00
Sergey Lyubka ebd2e89faa Handle #1522 - Fix TLS buffering 2022-04-13 10:48:17 +01:00
Alex Alashkin 17e0fb1c15 Add Zephyr examples 2022-04-13 11:10:22 +03:00
Sergey Lyubka 6e3e77a1a0 Enhance http-streaming-client 2022-04-12 19:06:37 +01:00
Sergey Lyubka ef44f90491 Fix #1520 - move state to struct mg_mgr 2022-04-12 14:14:55 +01:00
Sergey Lyubka 66376885e9 Fix #1521 - add mg_tou64() 2022-04-12 10:20:43 +01:00
Sergey Lyubka db941e2627 Fix #1519 - make opts structs in API calls const 2022-04-12 10:04:55 +01:00
Sergey Lyubka 5f78d34f4d Fix #1513 - fix mg_strdup() documentation 2022-04-12 09:57:25 +01:00
Sergey Lyubka 85281ae128 Fix #1514 - explicitely initialize io in mg_iobuf_init() 2022-04-12 09:54:05 +01:00
Sergey Lyubka e5d1b213c9 Merge pull request #1518 from jameshilliard/mqtt-suback
Ensure MQTT_CMD_SUBACK is received before calling mg_mqtt_pub in tests
2022-04-11 10:45:07 +01:00
James Hilliard e4ab9a4130 Ensure MQTT_CMD_SUBACK is received before calling mg_mqtt_pub in tests 2022-04-07 19:11:51 -06:00
Sergey Lyubka a1ec179229 Use uint64_t for uptime in millis, not int64_t 2022-04-07 13:50:25 +01:00
Sergey Lyubka 2f77855ec1 Handle #1502 - send CLOSE when CLOSE is received 2022-04-05 14:45:39 +01:00
Sergey Lyubka d11173fe90 Fix #1510 - wrap X509_VERIFY_PARAM_set1_host() usage inside a conditional 2022-04-05 13:09:17 +01:00
Sergey Lyubka fde8b82b78 Merge pull request #1507 from jameshilliard/mbedtls-reset
Handle MBEDTLS_ERR_NET_CONN_RESET errors
2022-04-05 13:06:06 +01:00
Sergey Lyubka b20eded30e Fix ESP32 example 2022-04-05 12:54:20 +01:00
James Hilliard 3ec17c41be Handle MBEDTLS_ERR_NET_CONN_RESET errors 2022-04-04 17:17:17 -06:00
Sergey Lyubka 0ed64707f3 Introduce MG_ENABLE_CUSTOM_MILLIS 2022-04-04 18:14:59 +01:00
Sergey Lyubka 417533e90c Merge pull request #1509 from jameshilliard/wakeup-conflict
Fix mg_mgr_wakeup conflicting types error
2022-04-04 09:16:34 +01:00
James Hilliard e268affb5a Fix mg_mgr_wakeup conflicting types error 2022-04-02 22:10:17 -06:00
Sergey Lyubka 4474ada291 Fix #1505: let mg_wakeup() return status 2022-04-03 00:17:31 +01:00
Sergey Lyubka a65c3288d8 Merge pull request #1508 from jameshilliard/mqtt-debug
Print mqtt buffer on error in tests
2022-04-03 00:11:25 +01:00
Sergey Lyubka affcef7e37 Fix clean targets 2022-04-03 00:04:58 +01:00
James Hilliard 173c2ba338 Print mqtt buffer on error in tests
This test seems to fail randomly a lot, print the buffer on error to
make it easier to isolate issues.
2022-04-02 15:26:15 -06:00
Sergey Lyubka b5fcf95b88 Enable mbedTLS 2022-04-01 21:33:09 +01:00
Sergey Lyubka d954851d43 Drop CRL from mbedTLS integration - let customer do a custom init if required 2022-04-01 16:42:41 +01:00
Sergey Lyubka df602c27d5 Disable SSI on Zephyr by default 2022-04-01 16:38:37 +01:00
Sergey Lyubka 3d9fa10485 Increase sock limit, fix multiple connections issue 2022-04-01 15:42:15 +01:00
Sergey Lyubka 6990040626 Set DNS error on UDP send error 2022-04-01 15:41:23 +01:00
Sergey Lyubka b42ea6cd3c Better logging 2022-04-01 15:41:03 +01:00
Sergey Lyubka 8c7fd8b330 Set default socket in mg_connect() to -1 2022-04-01 15:40:53 +01:00
Sergey Lyubka 4e0039625e Remove cruft 2022-03-31 18:07:15 +01:00
Sergey Lyubka 6c909f8935 Disable SNTP 2022-03-31 18:02:29 +01:00
Sergey Lyubka 4f5d385e52 Enable SNTP in zephyr example 2022-03-31 17:42:09 +01:00
Sergey Lyubka 84fe1d87b3 Enable DHCP 2022-03-31 17:26:58 +01:00
Sergey Lyubka bb0bc41f99 Add zephyr example skeleton 2022-03-31 16:58:27 +01:00
Sergey Lyubka 1c2d67ded7 Add missing arch_zephyr.h, add musl target 2022-03-30 09:06:00 +01:00
Sergey Lyubka 7372a05ce5 Add initial Zephyr support 2022-03-30 07:56:44 +01:00
Sergey Lyubka 642befa8d5 Remove unused mg_hmac_sha1() 2022-03-22 13:30:25 +00:00
Sergey Lyubka 3b5a9e2d4b Add tests for mg_ws_wrap() and messages > 128 bytes 2022-03-22 12:46:55 +00:00
Sergey Lyubka 6b3d9d9baf Add failed TLS host validation 2022-03-22 10:51:37 +00:00
Sergey Lyubka 436852d077 Enable TLS host validation in test_http_client() 2022-03-22 10:48:50 +00:00
Sergey Lyubka b78ced4fa9 Honor hostname validation for openssl 2022-03-22 08:50:37 +00:00
Sergey Lyubka 1bc81df00e Fix mg_dns_parse_name_depth() 2022-03-21 16:29:27 +00:00
Sergey Lyubka bf025537b6 Merge pull request #1495 from jameshilliard/optimize-valgrind
Run valgrind tests with appropriate compiler optimizations.
2022-03-21 15:18:58 +00:00
Sergey Lyubka ad4812218d Handle #1497 - handshake format 2022-03-21 15:17:09 +00:00
Sergey Lyubka 0fbc4b8ff4 Reuse sock.c logic in mbedtls integration 2022-03-21 14:39:27 +00:00
Sergey Lyubka 7ef82f5caf Add vc2017 target 2022-03-21 14:38:42 +00:00
Sergey Lyubka 1141ea7933 Add connection timeout 2022-03-20 18:50:01 +00:00
James Hilliard 1e9344161b Run valgrind tests with appropriate compiler optimizations. 2022-03-18 13:51:05 -06:00
Sergey Lyubka 6c021765bb Merge pull request #1479 from zudwalex/infineon_rtx_support
Add RTX-RTOS support
2022-03-18 09:18:49 +00:00
Sergey Lyubka bc151af51d Set IPv6=0 for valgrind test 2022-03-18 09:10:24 +00:00
Sergey Lyubka 8bd09e0e80 Add valgrind test 2022-03-18 09:03:18 +00:00
Sergey Lyubka 5978cb9703 Add valgrind test 2022-03-18 08:56:12 +00:00
Sergey Lyubka 8c447a95dd Fix #1483 - add valgrind target, do not use stdlib strcasecmp() 2022-03-18 08:52:54 +00:00
Sergey Lyubka 870431dc1a Enhance HTTP client example 2022-03-15 14:14:36 +00:00
Sergey Lyubka 1125b1f545 Fix #1490 - add winerror.h to fix old mingw build 2022-03-15 10:10:08 +00:00
Sergey Lyubka d255fc737a Fix mongoose.exe target 2022-03-15 10:03:00 +00:00
Sergey Lyubka 37cb51ee94 Fix #1488 - properly set non-blocking flags on accepted connections 2022-03-14 13:26:00 +00:00
Sergey Lyubka 02cabcc0ec Fix busy loop in TLS case 2022-03-14 11:16:41 +00:00
Sergey Lyubka 3ffb6c046e Merge branch 'master' of github.com:cesanta/mongoose 2022-03-11 15:40:22 +00:00
Sergey Lyubka 7bf8b81995 Fix mg_http_delete_chunk() 2022-03-11 15:38:59 +00:00
Sergey Lyubka 0ddda4a267 Merge pull request #1487 from jameshilliard/update-actions
Update actions/checkout@v2 to actions/checkout@v3
2022-03-08 12:06:08 +00:00
James Hilliard c46ad970cb Update actions/checkout@v2 to actions/checkout@v3 2022-03-06 21:59:25 -07:00
Sergey Lyubka 733abcffbc Merge pull request #1485 from jameshilliard/fix-pack-rebuild
Regenerate pack file when dependencies are changed.
2022-03-06 16:50:03 +00:00
Sergey Lyubka 139f928731 Fix #1481 - use stricter compilation flags 2022-03-06 14:31:42 +00:00
James Hilliard 3da9986232 Regenerate pack file when dependencies are changed.
Should help prevent some spurious test failures due to stale
test/packed_fs.c file.
2022-03-02 10:12:48 -07:00
Sergey Lyubka a284df01d1 Fix #1480 - use memmove instead of memcpy in mg_iobuf_resize() 2022-02-28 16:51:46 +00:00
Alex Alashkin 412f5cf3e0 Add RTX-RTOS support 2022-02-23 19:56:37 +02:00
Sergey Lyubka 42ba1e4aed Fix #1473 - calm static analyzer 2022-02-23 13:34:20 +00:00
Sergey Lyubka 1893b06c13 Fix #1472 - calm static analyzer 2022-02-23 13:31:00 +00:00
Sergey Lyubka b0cbb70e53 Fix #1471 - calm static analyzer 2022-02-23 13:30:14 +00:00
Sergey Lyubka 78e81fef27 Fix #1471 - calm static analyzer 2022-02-23 13:28:56 +00:00
Sergey Lyubka dd08231a34 Fix #1470 - calm static analyzer 2022-02-23 13:25:25 +00:00
Sergey Lyubka 8c78b7ef53 Refactor mg_alloc_conn() 2022-02-23 10:51:01 +00:00
Sergey Lyubka c650fdcdfc Move mg_listen() to net.c 2022-02-23 03:06:02 +00:00
Sergey Lyubka e99973d4b7 Introduce local address 2022-02-22 22:00:55 +00:00
Sergey Lyubka 4012a86bd8 Remove gitter chat link 2022-02-22 21:46:07 +00:00
Sergey Lyubka 048fee5c88 Fix build after mg_connect() move 2022-02-22 21:35:03 +00:00
Sergey Lyubka a287fd97e4 Factor mg_connect() to net.c 2022-02-22 21:27:08 +00:00
Sergey Lyubka 3a249183f8 Factor out mg_alloc_conn() 2022-02-22 21:14:29 +00:00
Sergey Lyubka 393dad97e0 Get rid of ctype dependencies 2022-02-22 20:20:56 +00:00
Sergey Lyubka 113abc71d4 Add SPDX identifier. Fix #1387 2022-02-22 18:13:06 +00:00
Sergey Lyubka 63261ec0d5 Use mg_http_status() 2022-02-19 16:19:51 +00:00
Sergey Lyubka 507935d067 Tiny refactoring - move clearance of the c->is_resolving flag to the mg_connect_resolved() 2022-02-19 16:17:03 +00:00
Sergey Lyubka c579b73f75 Update docs 2022-02-19 15:31:22 +00:00
Sergey Lyubka e69ec148cc Better mbedtls debug 2022-02-19 13:46:07 +00:00
Sergey Lyubka a76ade9bb2 Update packed fs 2022-02-14 17:44:43 +00:00
Sergey Lyubka 4fec149345 Disable dirlist by default 2022-02-14 11:32:01 +00:00
Sergey Lyubka 5bc164de76 Remove MG_ENABLE_DIRLIST 2022-02-14 11:19:24 +00:00
Sergey Lyubka 969b84043c Fix #1465 - rename LL_* constants, introduce MG_* log macros 2022-02-12 18:17:25 +00:00
Sergey Lyubka da72dafbfb Fix #1462 - add helper function for getting HTTP response status code. 2022-02-12 16:51:37 +00:00
Sergey Lyubka 1adf7f6b2b Handle #1463 - add missing includes for windows 2022-02-12 16:43:08 +00:00
Sergey Lyubka 3e085ccbaa Eliminate explicit _WIN32 checks 2022-02-12 14:33:43 +00:00
Sergey Lyubka 3e8e2ab513 Add optional zip cmd to pack.c 2022-02-12 14:28:02 +00:00
Sergey Lyubka 4f802ece52 Enhance mg_snrpintf tests 2022-02-11 18:15:34 +00:00
Sergey Lyubka 313ac34e59 Handle minus in the fmt spec 2022-02-11 11:02:06 +00:00
Sergey Lyubka 54f75889fa Using mg_snprintf() everywhere 2022-02-10 17:11:03 +00:00
Sergey Lyubka f64c86d23f Use mg_snprintf() 2022-02-10 11:56:55 +00:00
Sergey Lyubka 9e634310b4 Use MG_EV_HTTP_CHUNK for streaming upload 2022-02-09 12:24:06 +00:00
Sergey Lyubka 33666e7d6b Fix ESP32 example 2022-02-08 14:13:47 +00:00
Sergey Lyubka 40d4c7e410 Fix ESP32 example 2022-02-08 13:43:34 +00:00
Sergey Lyubka 8cd4699dbc Rename FS API functions to avoid conflicts 2022-02-08 13:36:04 +00:00
Sergey Lyubka 49d5aff8f9 Call realpath() against root_dir only when there are no overrides 2022-02-01 11:10:01 +00:00
Sergey Lyubka b2ee9cb363 Update docs 2022-01-29 11:12:31 +00:00
Sergey Lyubka e9c20ad992 Update docs 2022-01-29 11:11:22 +00:00
Sergey Lyubka 63b880e624 Handle #1459 - deprecate mg_globmatch, introduce mg_match() 2022-01-29 11:03:54 +00:00
Sergey Lyubka 768f67ae0a Fix #1458 - fail on example build error, and fix examples/mqtt-server 2022-01-27 12:10:03 +00:00
Sergey Lyubka fbf5fa53c6 Refactor ff_open() 2022-01-25 10:50:08 +00:00
Sergey Lyubka 4a5824e7a7 Silence error in clean target 2022-01-24 13:07:56 +00:00
Sergey Lyubka 32f3c48b65 Fix FreeBSD build 2022-01-24 02:20:45 +00:00
Sergey Lyubka f7fbcd2451 Disable leaks detection on macos 2022-01-23 06:58:06 +00:00
Sergey Lyubka c6253854ba Disable leaks detection on macos 2022-01-23 06:12:36 +00:00
Sergey Lyubka 544644e94b Refactor - always enable LOG macro. Enhance iolog 2022-01-23 06:10:14 +00:00
Sergey Lyubka f6cebf6956 Listen on INADDR_ANY by default 2022-01-22 17:03:27 +00:00
Sergey Lyubka 1b82aa02aa 7.5 -> 7.6 2022-01-21 12:41:52 +00:00
Sergey Lyubka e565a7e73d Fix #1453 - do not allow empty wakeup buffer 2022-01-21 12:35:28 +00:00
Sergey Lyubka 59c4dfa33b Fix 1452 - byte order issue in mg_check_ip_acl 2022-01-21 12:24:58 +00:00
Sergey Lyubka 1a8e3c2e31 Decrese debug verbosity 2022-01-19 18:15:47 +00:00
Sergey Lyubka 226917e1cd Use mg_str, not pointers, in mg_mqtt_{sub,pub} 2022-01-19 09:57:27 +00:00
Sergey Lyubka fe813ee247 Add buf,len params to mg_mgr_wakeup() 2022-01-19 09:25:01 +00:00
Sergey Lyubka 4cd830a0bf Improve ff_write - save large blocks in chunks 2022-01-19 08:43:34 +00:00
Sergey Lyubka 1259ca9ac9 Add missing mkdir() on ARM targets 2022-01-18 19:31:10 +00:00
Sergey Lyubka d0857fe36c Add mkdir to the FS API 2022-01-18 19:19:34 +00:00
Sergey Lyubka 56a7438114 Add fs arg to mg_file* and mg_http_upload API 2022-01-18 17:11:02 +00:00
Sergey Lyubka 09df542db8 Fix unamalgamated build 2022-01-18 08:02:41 +00:00
Sergey Lyubka 1df102ab93 Add Fat FS support 2022-01-18 07:44:30 +00:00
Sergey Lyubka 02b3b780bb Add missing fs.c 2022-01-17 14:44:59 +00:00
Sergey Lyubka f84f3da012 Change in FS API for fs->open() and fs->close() 2022-01-17 14:42:41 +00:00
Sergey Lyubka c65c8fdaaa Protect against the directory traversal in mg_upload() 2022-01-17 12:08:23 +00:00
Sergey Lyubka b484123f1b gcc and clang 2022-01-15 01:45:31 +00:00
Sergey Lyubka b60119790e Fix wrong memcmp usage in mg_url_port() 2022-01-14 12:45:55 +00:00
Sergey Lyubka 216427cea0 Cleanup suseconds_t usage 2022-01-14 12:33:06 +00:00
Sergey Lyubka c53e2fcc14 Fix #1444 - clang warns on undefined behavior with null pointers 2022-01-14 09:55:15 +00:00
Sergey Lyubka 9fd80fd136 Fix #1445 - send error to a resolving connection when DNS error happens 2022-01-14 08:50:01 +00:00
Sergey Lyubka 5fc284722f Fix #1448 - fix MG_ENABLE_FILE build 2022-01-14 08:21:12 +00:00
Sergey Lyubka ad6e395da0 Fix #1447 - typo in mg_random() 2022-01-14 08:18:28 +00:00
Sergey Lyubka 6c79a406cd Fix localtime_r and gmtmime_r signatures 2022-01-11 19:15:38 +00:00
Sergey Lyubka 456e8bd249 Use 3 params for fcntl() 2022-01-10 18:21:13 +00:00
Sergey Lyubka de95f28598 Make stat and struct stat changeable 2022-01-10 18:07:45 +00:00
Sergey Lyubka 43405afdb2 Dont use ctype.h from str.h 2022-01-10 17:30:51 +00:00
Sergey Lyubka 97f95e17db Better strategy for restoring multicast address 2022-01-07 18:40:48 +00:00
Sergey Lyubka 6725d61b3f Re-init SSDP peer address before every search 2022-01-07 18:28:51 +00:00
Sergey Lyubka ebda2cb100 Use sendto on Mac too 2022-01-07 16:31:29 +00:00
Sergey Lyubka bb72b2494d Fix unamalgamated target 2022-01-07 15:48:09 +00:00
Sergey Lyubka 3b0a509cae Change mg_resolve() 2022-01-07 15:00:10 +00:00
Sergey Lyubka 2f981f9383 Skip connect() on UDP connection 2022-01-06 15:42:55 +00:00
Sergey Lyubka fc3c08e411 Change mg_straddr() API 2022-01-05 19:09:11 +00:00
Sergey Lyubka ff811f287a Squash warnings 2022-01-05 13:57:30 +00:00
Sergey Lyubka 8ebb3bc37b More detailed debug log - show ip/port for sender and receiver 2022-01-05 13:47:11 +00:00
Sergey Lyubka f7ff571c5f Added SSDP search example 2022-01-05 13:22:00 +00:00
Sergey Lyubka 6a82cbee71 Send MG_EV_WRITE for UDP messages 2022-01-05 13:03:56 +00:00
Sergey Lyubka b0585bd0a9 Do not set c->label for DNS connections - let labels be user-only-settable 2022-01-05 11:46:26 +00:00
Sergey Lyubka 6ad4d242c2 Better cleanup 2022-01-05 11:45:22 +00:00
Sergey Lyubka 030b1d9826 Remove wrong comment 2021-12-27 03:31:33 +00:00
Sergey Lyubka f6ffa7b3b9 Add huge-response example 2021-12-27 03:25:28 +00:00
Sergey Lyubka 137efe2233 Show requests in flight 2021-12-24 20:46:31 +00:00
Sergey Lyubka 62411d039e Increase mqtt timeouts 2021-12-24 12:14:06 +00:00
novlean 54b1716e77 Merge pull request #1436 from cesanta/novlean-patch-1
Update README.md
2021-12-23 17:18:55 +00:00
novlean 9f7aba8039 Update README.md 2021-12-23 17:18:45 +00:00
Sergey Lyubka a176b8d566 Upate docs w.r.t. mg_mqtt_opts 2021-12-23 11:12:10 +00:00
Sergey Lyubka 26a97ec36c Fix #1434 - set will QoS in CONNECT message correctly, and rename qos -> will_qos in struct mg_mqtt_opts 2021-12-23 11:00:18 +00:00
Sergey Lyubka f29807aad8 Resolve root path before serving to avoid double dots 2021-12-22 18:05:03 +00:00
Sergey Lyubka 92d3c7a4cd Add realpath() for Win32 2021-12-22 18:04:36 +00:00
Sergey Lyubka af3a0f6af0 Add realpath() for Win32 2021-12-22 18:04:27 +00:00
Sergey Lyubka ce6164ca20 Fail stat() if S_ISDIR is not defined 2021-12-22 18:04:16 +00:00
Sergey Lyubka e9fc3fcecf Update event enum 2021-12-21 22:20:42 +00:00
Sergey Lyubka 25a1a24890 Fallback to time(0) in mg_millis() 2021-12-21 22:04:03 +00:00
Sergey Lyubka bf7fc1d5a9 Amalgamate 2021-12-21 21:58:03 +00:00
Sergey Lyubka 2126b49ab3 Merge pull request #1433 from ryuukk/patch-2
Remove debugging left over
2021-12-21 21:56:41 +00:00
Sergey Lyubka ae6767b1d2 Use int64_t for timers and mg_millis() 2021-12-21 21:50:18 +00:00
ryuukk 133629dbee Remove debugging left over 2021-12-21 21:28:22 +01:00
Sergey Lyubka fb0a9bc7e3 Fix build 2021-12-21 18:16:12 +00:00
Sergey Lyubka 2a3492766f Remove mg_time() and mg_usleep() 2021-12-21 17:44:34 +00:00
Sergey Lyubka 2ec7e5653e Merge branch 'master' of github.com:cesanta/mongoose 2021-12-21 17:40:04 +00:00
Sergey Lyubka 30bfb245f5 Make mongoose more bare-metal Keil friendly. Declare settings after arch. Introduce MG_ENABLE_FILE 2021-12-21 17:39:55 +00:00
Sergey Lyubka 84d89bc4f5 Merge pull request #1431 from ryuukk/patch-1
Closed WS connection is not an error for the logger
2021-12-21 08:47:21 +00:00
ryuukk 7f55fabfec Closed WS connection is not an error for the logger 2021-12-21 01:34:48 +01:00
Sergey Lyubka 9e0f04dc8b Add -S option 2021-12-20 16:35:16 +00:00
Sergey Lyubka 574c2954b3 Docs nitpick 2021-12-19 10:53:17 +00:00
Sergey Lyubka 9d38e26b81 Add MG_HTTP_INDEX build var 2021-12-17 13:54:01 +00:00
Sergey Lyubka 4e75a0c81e 7.4 -> 7.5 2021-12-17 13:34:32 +00:00
Sergey Lyubka d311e967fa Add mingw target 2021-12-16 09:22:28 +00:00
Sergey Lyubka d0a6c111cb Call MG_EV_ERROR with c->is_closing set 2021-12-15 11:31:42 +00:00
Sergey Lyubka aa6d8b4662 Remove TLS custom_init() API 2021-12-15 11:04:43 +00:00
Sergey Lyubka 3f5fd89fd7 Pass more args to custom TLS init 2021-12-14 13:21:59 +00:00
Sergey Lyubka f43a5a005c Introduce custom TLS init function 2021-12-14 13:04:11 +00:00
Sergey Lyubka 755bf3c412 Split TLS files and introduce MG_ENABLE_CUSTOM_TLS 2021-12-14 12:42:41 +00:00
Sergey Lyubka 84f3fb0ba5 Move EXTERN_C to util.h 2021-12-14 12:11:05 +00:00
Sergey Lyubka f2df6c114d Example for mg_http_bauth 2021-12-13 15:14:29 +00:00
Sergey Lyubka f93659e303 Merge branch 'master' of github.com:cesanta/mongoose 2021-12-13 15:08:14 +00:00
Sergey Lyubka 226404d39c Example for mg_http_bauth 2021-12-13 15:08:05 +00:00
Sergey Lyubka c1bcc143b9 Merge pull request #1417 from DavidKorczynski/cifuzz-integration
Add CIFuzz integration
2021-12-13 11:35:31 +00:00
Sergey Lyubka 5ca9062d45 Less verbose serve_dir 2021-12-07 15:23:02 +00:00
Sergey Lyubka 0b209eaabb Add mg_http_get_header_var() 2021-12-03 09:54:03 +00:00
David Korczynski 47ef191ea2 Add CIFuzz integration 2021-11-30 22:48:20 +00:00
Sergey Lyubka 25e76d761e Fix usage message 2021-11-29 14:00:03 +00:00
Sergey Lyubka 9731a51dae Recognise :PORT as a valid URL 2021-11-29 13:57:33 +00:00
Sergey Lyubka 81220fa590 Remove noisy debug 2021-11-26 16:23:06 +00:00
Sergey Lyubka 24e8c4d81a Increase SNMP test timeout 2021-11-25 17:31:41 +00:00
Sergey Lyubka 013520b0c0 Add note for mg_http_serve_dir() 2021-11-25 12:29:45 +00:00
Sergey Lyubka f012bcb027 Update issue template 2021-11-25 11:47:26 +00:00
Sergey Lyubka 922e1ce529 Make captive portal work on Linux 2021-11-23 17:52:54 +00:00
Sergey Lyubka 7a707cc64b Add README 2021-11-23 15:08:34 +00:00
Sergey Lyubka 1967acfef2 Make it build on vc98 2021-11-23 13:24:21 +00:00
Sergey Lyubka e24cb04003 Update URL 2021-11-23 09:37:03 +00:00
Sergey Lyubka 67974746ff Add json-rpc-over-ws example 2021-11-22 16:45:14 +00:00
Sergey Lyubka 8d916d41d7 Fix #1409 - remove VLA which confuses MSVC 2021-11-22 12:24:58 +00:00
Sergey Lyubka 08444e3942 Fix links and typos 2021-11-16 12:30:40 +00:00
Sergey Lyubka 9c41a0cd26 Fix links 2021-11-16 09:54:36 +00:00
Sergey Lyubka 2c50069d98 Do not clean the recv buffer 2021-11-14 16:47:40 +00:00
Sergey Lyubka 31059f6728 Add test.html 2021-11-14 14:31:51 +00:00
Sergey Lyubka 2000752b2c Remove dead code 2021-11-11 15:15:47 +00:00
Sergey Lyubka dd34830443 Update README 2021-11-11 15:11:57 +00:00
Sergey Lyubka c58f4ee51b Add symlinks 2021-11-11 14:21:52 +00:00
Sergey Lyubka 00f7e8cb2a Support wildcards 2021-11-11 12:08:17 +00:00
Sergey Lyubka 439904e27f Add signal handler 2021-11-11 10:35:41 +00:00
Sergey Lyubka 4d6590ece2 Add readme 2021-11-11 10:29:16 +00:00
Sergey Lyubka 9b0c4b970d Add README.md 2021-11-11 08:26:31 +00:00
Sergey Lyubka a80ce1b12a Add signal handler 2021-11-11 07:36:25 +00:00
Sergey Lyubka 57dd74c180 Add reconnection logic 2021-11-10 12:57:02 +00:00
Sergey Lyubka 90c67e4226 Reformatting for better readability 2021-11-06 11:29:56 +00:00
Sergey Lyubka 093cd6a6a3 Fix FD_CLOEXEC setting 2021-11-05 13:30:12 +00:00
Sergey Lyubka 975db86306 Add READMEs 2021-11-05 13:02:36 +00:00
Sergey Lyubka eba688e11b Update docs 2021-11-04 23:07:47 +00:00
Sergey Lyubka 05b44204d5 Set FD_CLOEXEC properly 2021-11-04 18:28:32 +00:00
Sergey Lyubka 0bb017c1d5 Add examples/mqtt-client-aws-iot 2021-11-03 20:58:57 +00:00
Sergey Lyubka a6efd0b335 Merge branch 'master' into dec 2021-11-02 22:43:59 +00:00
Sergey Lyubka c3d237e9c6 More verbose log 2021-11-02 22:43:23 +00:00
Sergey Lyubka 09d28f5570 Print a clarifying message at start 2021-11-02 16:53:57 +00:00
Sergey Lyubka ba02937ec6 Squash warnings 2021-11-02 16:40:25 +00:00
Sergey Lyubka 3d78b14deb Fix #1396 - JS sorting code for dir listing 2021-11-02 16:01:06 +00:00
Sergey Lyubka f558551d1d Fix #1395 - show decoded URI in dir listing 2021-11-02 15:11:56 +00:00
Sergey Lyubka 12fe66370f Fix #1393 - cleanup mime types 2021-11-01 20:31:45 +00:00
Sergey Lyubka 423aaa492c Fix #1394 - mg_mqtt_sub(). Add MG_EV_OPEN, too. 2021-11-01 16:20:00 +00:00
Sergey Lyubka 2016586475 Clearer client init 2021-11-01 13:29:44 +00:00
Sergey Lyubka bf88167152 Add missing test files 2021-10-31 12:50:06 +00:00
Sergey Lyubka 52be84f04e Add user and pass to struct mg_mqtt_opts 2021-10-31 12:48:32 +00:00
Sergey Lyubka 03d187b147 Fix #1375 - change event processing order 2021-10-31 12:40:56 +00:00
Sergey Lyubka 3329047579 More explicit check on hm->uri.len 2021-10-31 12:37:40 +00:00
Sergey Lyubka 86c70e5abb Fix #1391 - make remove_double_dots less aggressive 2021-10-31 12:36:34 +00:00
Sergey Lyubka b17f4108ea Change MG_PATH_MAX for ESP8266 2021-10-30 19:34:53 +01:00
Sergey Lyubka 4e523cc455 Remove binary section 2021-10-27 20:13:05 +01:00
Sergey Lyubka 49c9be9159 Set MG_IO_SIZE -> 128 2021-10-27 19:20:52 +01:00
Sergey Lyubka f1bfe0760f Optimise TLS read 2021-10-27 19:18:44 +01:00
Sergey Lyubka 35f02fdaad Use small IO buffer 2021-10-27 19:18:19 +01:00
Sergey Lyubka 6ac09966ba Fix #1374 - fix ESP32 build 2021-10-22 22:06:10 +01:00
Sergey Lyubka af9a7617f5 Merge pull request #1381 from ptsolakos/master
Certificate revocation checking when using mbedtls
2021-10-22 20:30:47 +01:00
Sergey Lyubka 42c89732c8 Remove private.h 2021-10-22 19:41:26 +01:00
Sergey Lyubka 054475ddbf Fix #1376 - handle comma for unquoted header vars 2021-10-22 14:33:51 +01:00
Sergey Lyubka 126d556d6a Merge pull request #1380 from jameshilliard/fix-time
util: Actually return uptime on OSX/Linux for mg_millis
2021-10-22 14:06:44 +01:00
Sergey Lyubka 529a302e77 Merge pull request #1379 from jameshilliard/fix-sntp
sntp: Don't set Leap Indicator in client messages.
2021-10-22 14:04:54 +01:00
Sergey Lyubka acbf978452 Merge pull request #1378 from jameshilliard/undef
Fix some undefined macro warnings.
2021-10-22 14:03:42 +01:00
Sergey Lyubka 90b22716ea Merge branch 'master' into undef 2021-10-22 14:03:25 +01:00
Sergey Lyubka fb90c504a6 Remove private.h 2021-10-22 14:00:31 +01:00
Sergey Lyubka 65fd834654 Increate mqtt test timeout 2021-10-22 13:58:51 +01:00
Sergey Lyubka a84acf5b8b Merge pull request #1385 from zudwalex/move_stm32_examples
Move STM32 examples to stm32 folder
2021-10-22 13:39:13 +01:00
Sergey Lyubka e9505db146 Merge pull request #1384 from zudwalex/master
Add more NXP examples and move them to nxp folder
2021-10-22 13:39:02 +01:00
Sergey Lyubka 4fb49b011e Merge pull request #1377 from jameshilliard/missing-prototypes
Make private functions static and add missing prototypes.
2021-10-22 13:16:06 +01:00
Alex Alashkin 6742991469 Move STM32 examples to stm32 folder 2021-10-22 14:19:50 +03:00
Alex Alashkin 2430cc5aac Add more NXP examples and move them to nxp folder 2021-10-22 14:04:15 +03:00
Sergey Lyubka 54590aaf26 Use UDP sendto() on win32 only 2021-10-22 09:14:18 +01:00
Sergey Lyubka 7c5e67b272 Fix #1382 - use sendto for UDP send 2021-10-22 08:56:45 +01:00
Sergey Lyubka c62c8ea4dd Correct licensing URL 2021-10-20 10:04:49 +01:00
Panagiotis Tsolakos 383653d608 mbedtls CRL support
Certificate revocation checking when using mbedtls
2021-10-14 17:56:31 +02:00
James Hilliard 001dc3f33d util: Actually return uptime on OSX/Linux for mg_millis
The documentation for mg_millis indicates it will:
Return current uptime in milliseconds.

So we should use API's that actually return uptime.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2021-10-13 17:06:18 -06:00
James Hilliard 37d45b3fbb sntp: Don't set Leap Indicator in client messages.
Per RFC4330:
This field is significant only in server messages

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2021-10-13 16:48:33 -06:00
James Hilliard f72b8c6034 Fix some undefined macro warnings.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2021-10-13 13:06:00 -06:00
James Hilliard c11e5a9383 Make private functions static and add missing prototypes.
Fixes:
mongoose/mongoose.c:180:8: warning: no previous prototype for ‘mg_dns_parse_name’ [-Wmissing-prototypes]
  180 | size_t mg_dns_parse_name(const uint8_t *s, size_t n, size_t ofs, char *dst,
      |        ^~~~~~~~~~~~~~~~~
mongoose/mongoose.c:306:6: warning: no previous prototype for ‘mg_dns_send’ [-Wmissing-prototypes]
  306 | void mg_dns_send(struct mg_connection *c, const struct mg_str *name,
      |      ^~~~~~~~~~~
mongoose/mongoose.c:925:6: warning: no previous prototype for ‘mg_http_parse_headers’ [-Wmissing-prototypes]
  925 | void mg_http_parse_headers(const char *s, const char *end,
      |      ^~~~~~~~~~~~~~~~~~~~~
mongoose/mongoose.c:1125:7: warning: no previous prototype for ‘mg_http_etag’ [-Wmissing-prototypes]
 1125 | char *mg_http_etag(char *buf, size_t len, size_t size, time_t mtime) {
      |       ^~~~~~~~~~~~
mongoose/mongoose.c:2578:6: warning: no previous prototype for ‘mg_sha1_transform’ [-Wmissing-prototypes]
 2578 | void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) {
      |      ^~~~~~~~~~~~~~~~~
mongoose/mongoose.c:2976:8: warning: no previous prototype for ‘mg_open_listener’ [-Wmissing-prototypes]
 2976 | SOCKET mg_open_listener(const char *url, struct mg_addr *addr) {
      |        ^~~~~~~~~~~~~~~~

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2021-10-12 20:18:11 -06:00
Sergey Lyubka b5147a149e Merge pull request #1373 from zudwalex/fix_board_ci
Use mongoose.[ch] from main repo
2021-10-06 12:31:27 +01:00
Alex Alashkin 655529f30b Use mongoose.[ch] from parent repo 2021-10-06 13:15:12 +03:00
novlean fd5319e0ce Merge pull request #1372 from cesanta/novlean-patch-1
license
2021-10-05 17:09:43 +01:00
novlean f8c84ca672 license 2021-10-05 17:09:35 +01:00
novlean 1b81ac8916 Merge pull request #1371 from cesanta/novlean-patch-1
mongoose.ws
2021-10-05 16:54:43 +01:00
novlean c64e2ebb16 mongoose.ws 2021-10-05 16:54:34 +01:00
Sergey Lyubka 3771f2c088 Merge branch 'master' of github.com:cesanta/mongoose 2021-10-04 19:47:34 +01:00
Sergey Lyubka 6d398bd5c7 Fix mg_random() for ESP32 2021-10-04 19:47:24 +01:00
Sergey Lyubka 5c355a5ff3 Merge pull request #1368 from zudwalex/nxp_examples
Add NXP examples
2021-10-04 12:04:00 +01:00
Alex Alashkin d2f8b346e6 Add nxp to actions 2021-10-04 13:15:32 +03:00
Alex Alashkin 5cdaa931f9 Add NXP examples 2021-10-04 12:54:15 +03:00
Sergey Lyubka 693863a51e Merge pull request #1366 from zudwalex/fix_rtos_lwip
Add missed include for FreeRTOS/LwIP arch
2021-10-02 22:45:08 +01:00
Sergey Lyubka a204c80308 Update ca.pem links 2021-10-01 09:25:34 +01:00
Sergey Lyubka 7d620965e2 Update ca.pem: DST root CA has expired 2021-10-01 09:22:49 +01:00
Sergey Lyubka 0149654791 Update README 2021-10-01 08:26:34 +01:00
Sergey Lyubka f08d280429 Version 7.4 2021-09-30 13:35:44 +01:00
Sergey Lyubka 6fbb749431 7.4 -> 7.5 2021-09-30 13:34:55 +01:00
Alex Alashkin bc7178e5f7 Add missed include 2021-09-29 12:25:25 +03:00
Sergey Lyubka 61070d136d Add nxp-mimxrt1020-azurertos to Actions 2021-09-27 13:55:19 +01:00
Sergey Lyubka ea85f93e37 Merge branch 'master' of github.com:cesanta/mongoose 2021-09-27 13:52:59 +01:00
Sergey Lyubka 46029c501a Fix #1359 - add conditional for MSVC, _DEBUG and strdup 2021-09-27 13:52:39 +01:00
Sergey Lyubka 78e1fdd1c9 Merge pull request #1365 from zudwalex/mimxrt1020_example
Add NXP MIMXRT1020 AzureRTOS example
2021-09-27 11:50:48 +01:00
Alex Alashkin 9ef5c7c667 Add NXP MIMXRT1020 AzureRTOS example 2021-09-27 11:12:15 +03:00
Sergey Lyubka cdf279e438 Merge pull request #1358 from yermin/master
makes it more readable
2021-09-27 09:00:11 +01:00
Sergey Lyubka cdd192abe4 Merge pull request #1363 from tophatgeeks/patch-1
Update README - Jordan Ramsey Edits.md
2021-09-27 08:44:42 +01:00
Sergey Lyubka 9af6f4b02e Merge pull request #1360 from zudwalex/azure_basics
Add AzureRTOS basic support
2021-09-27 08:39:15 +01:00
Alex Alashkin d86ceecd8c Add AzureRTOS basic support 2021-09-26 10:25:44 +03:00
yermin 8f693b92a7 makes it more readable
Signed-off-by: yermin <yermin@buaa.edu.cn>
2021-09-24 11:30:21 +08:00
tophatgeeks 6b1ff37cf3 Update README.md
I have gone through and edited for consistency, punctuation, wording, and grammar. If you have questions feel free to reach out.  I fixed some spelling errors "if" instead of "is" "update" instead of "updatw", etc. 

-Jordan Ramsey
2021-09-23 12:07:00 -04:00
Sergey Lyubka c490ff8ae7 Fix typo 2021-09-22 20:38:28 +01:00
Sergey Lyubka f73ebbf689 Fix #1354 - report correct errno in mg_open_listener() 2021-09-22 18:52:42 +01:00
Sergey Lyubka 1928ba9c1f Merge branch 'master' of github.com:cesanta/mongoose 2021-09-22 11:51:26 +01:00
Sergey Lyubka ad3655fb92 Docs spelling 2021-09-22 11:51:16 +01:00
novlean 29e0158689 Merge pull request #1355 from cesanta/novlean-patch-1
2021
2021-09-21 18:07:33 +01:00
novlean aaf55b6da0 2021 2021-09-21 18:02:11 +01:00
Sergey Lyubka 90a131bd29 Include ipv6 wrapping brackets [] in the result of mg_url_host() 2021-09-21 08:10:27 +01:00
Sergey Lyubka 8652006aea Remove dead code 2021-09-20 12:26:09 +01:00
Sergey Lyubka 2139fbc4b7 Support multiple web roots 2021-09-20 12:24:44 +01:00
Sergey Lyubka 2b48e8b03a Send suback 2021-09-18 20:56:56 +01:00
Sergey Lyubka a7afea0963 Handle ipv4-mapped addresses 2021-09-18 19:38:59 +01:00
Sergey Lyubka 9d1e61de93 Update docs 2021-09-17 15:59:15 +01:00
Sergey Lyubka 9b6b1a68f4 Add MQTT version check 2021-09-17 14:02:29 +01:00
Sergey Lyubka c7bd63ef53 Fix #1351 - squash warning 2021-09-17 11:07:20 +01:00
Sergey Lyubka 40b3382023 Enable WS data size check 2021-09-17 10:56:58 +01:00
Sergey Lyubka a70c5e726d Merge branch 'master' of github.com:cesanta/mongoose 2021-09-16 11:17:02 +01:00
Sergey Lyubka 409fdaec59 Rename posix_* -> p_* to avoid build conflict on linux 2021-09-16 11:16:10 +01:00
Sergey Lyubka 372aa369c4 Merge pull request #1350 from zudwalex/mg_parameters_retval
Add parameters descriptions to documentation
2021-09-15 20:51:18 +01:00
Alex Alashkin eb94704d8d Add params and retvals 2021-09-15 22:18:44 +03:00
Sergey Lyubka 894a168833 Get rid of fs->realpath 2021-09-15 07:43:48 +01:00
Sergey Lyubka f3eb466af3 Update docs 2021-09-15 07:43:24 +01:00
Sergey Lyubka df848973dc Fix unamalgamated target 2021-09-14 12:27:02 +01:00
Sergey Lyubka f37e5ecc38 WS frame len sanity check 2021-09-14 10:26:03 +01:00
Sergey Lyubka 6316609a5f Show log level 2021-09-13 13:48:02 +01:00
Sergey Lyubka dca08d32bd Fix URL 2021-09-13 13:47:49 +01:00
Sergey Lyubka 2b287f50f1 Add gitter badge 2021-09-02 10:28:16 +01:00
Sergey Lyubka acf58972f7 Fix posix_open() 2021-09-02 10:20:55 +01:00
Sergey Lyubka 5bf5516b29 struct iobuf doc 2021-08-30 13:06:45 +01:00
Sergey Lyubka 40b99e3751 Print openssl error on TLS error 2021-08-30 11:45:30 +01:00
Sergey Lyubka 28a56370d4 Fix zeromem() call in mg_iobuf_del() 2021-08-30 11:39:19 +01:00
Sergey Lyubka e3589577ed Update OpenSSL handshake error codepath 2021-08-29 16:54:24 +01:00
Sergey Lyubka 38beb4cbc0 Update readme 2021-08-28 22:00:46 +01:00
Sergey Lyubka 167af7f160 docs update 2021-08-28 20:27:55 +01:00
Sergey Lyubka 7d91885413 Update docs 2021-08-28 11:16:45 +01:00
Sergey Lyubka 0de83157dc Update docs 2021-08-28 08:52:41 +01:00
Sergey Lyubka cc9639b3cb Update docs 2021-08-28 08:48:47 +01:00
Sergey Lyubka cb0ac1868f Update docs 2021-08-28 08:46:01 +01:00
Sergey Lyubka e653147119 Merge pull request #1344 from timgates42/bugfix_typo_priority
docs: fix simple typo, priorty -> priority
2021-08-28 08:37:26 +01:00
Sergey Lyubka f3d15a0440 Update docs 2021-08-28 08:25:31 +01:00
Sergey Lyubka 0bc736d384 Update docs 2021-08-28 08:23:33 +01:00
Sergey Lyubka 3bf7b817f6 Update docs 2021-08-28 08:21:29 +01:00
Sergey Lyubka 477e48bf54 mg_iobuf_append -> mg_iobuf_add 2021-08-28 08:08:54 +01:00
Sergey Lyubka 913e730ec2 mg_iobuf_delete -> mg_iobuf_del 2021-08-28 07:16:38 +01:00
Sergey Lyubka bd64043377 mg_comma -> mg_commalist 2021-08-28 06:54:56 +01:00
Tim Gates 9f827feeaa docs: fix simple typo, priorty -> priority
There is a small typo in examples/stm32-freertos-tcp/stm32f7/core_cm7.h.

Should read `priority` rather than `priorty`.
2021-08-28 07:46:08 +10:00
Sergey Lyubka 714b7a8145 Handle WS fragmentation 2021-08-27 10:25:24 +01:00
Sergey Lyubka 7ba6fda236 Add stm32-nucleo-h743z and stm32-nucleo-f429z 2021-08-26 11:40:47 +01:00
Sergey Lyubka fc9c454518 Add mg_check_ip_acl() 2021-08-25 07:59:31 +01:00
Sergey Lyubka 1c456fc2df mg_next_comma_entry -> mg_comma 2021-08-23 16:54:58 +01:00
Sergey Lyubka 9b37ac384f Merge pull request #1341 from lnksz/bugfix-1340-http_chunked
Fix #1340: Long HTTP Chunks
2021-08-23 14:50:39 +01:00
Sergey Lyubka 99b279d5e5 Add examples/stm32-nucleo-f746z 2021-08-23 10:38:11 +01:00
Kristof Havasi 4d07a99ee2 Fix bug in long HTTP chunk handling
Due to a copy/paste error, the start of the payload in the latest parsed
chunk was compared to chunk-length of the terminating chunk (5 chars).
So only chunks were parsed as expected, which also had a single hex
digit length.
2021-08-23 08:50:58 +02:00
Kristof Havasi f6f0e49de4 Add failing test for HTTP chunk
This test would have caught #1340: handling chunks longer than 15 chars
2021-08-23 08:19:46 +02:00
Sergey Lyubka 07568a8f06 Docs nits 2021-08-22 10:51:40 +01:00
Sergey Lyubka 71e9019211 Docs nitpicks 2021-08-20 20:31:32 +01:00
Sergey Lyubka 0937213f4b Merge pull request #1336 from zudwalex/freertos_lwip_support
Update FREERTOS + LWIP support
2021-08-12 12:57:06 +01:00
Sergey Lyubka 6c42350fcf docs 2021-08-12 12:24:28 +01:00
Alex Alashkin 453d4be4d0 Update FREERTOS + LWIP support 2021-08-12 13:54:43 +03:00
Sergey Lyubka 104c4fab19 More docs 2021-08-11 19:24:33 +01:00
Sergey Lyubka fd5eb2d3f9 Refactor mg_mkpipe() 2021-08-11 19:17:04 +01:00
Sergey Lyubka 8b770d2a0d Fix #1334 - typo in mg_call(..MG_EV_WS_OPEN) call 2021-08-11 04:52:39 +01:00
Sergey Lyubka b739aa89f1 Update readme 2021-08-09 09:43:21 +01:00
Sergey Lyubka 11c07470bb Refactor UDP handling 2021-08-07 22:55:13 +01:00
Sergey Lyubka 76865cbe14 Fix STM32 build 2021-08-07 17:52:51 +01:00
Sergey Lyubka b7ce8213d7 Better multithreading support: remove mg_socketpair, add mg_mkpipe() and mg_rmpipe() 2021-08-07 17:22:47 +01:00
Sergey Lyubka 86f43cd8d6 Refactor mg_socketpair and document MG_ENABLE_NATIVE_SOCKETPAIR 2021-08-06 10:23:08 +01:00
Sergey Lyubka 2407509ce0 More detailed environment questions 2021-08-05 10:49:24 +01:00
Sergey Lyubka 47ce072af7 Fix #1331 - add comment about order of operations in conn_close() 2021-08-05 10:39:24 +01:00
Sergey Lyubka c2c6ff11ed Fix #1329 - send MG_EV_WS_OPEN for server connections 2021-08-04 11:38:32 +01:00
Sergey Lyubka 9b18a6350a Make ws_upgrade() respond with error if request is not and upgrade 2021-08-03 23:37:50 +01:00
Sergey Lyubka a36050ab4b Fix #1326 - spelling errors 2021-08-02 00:23:01 +01:00
Sergey Lyubka 568484f079 Fix #920 - add MQTT over Websocket client example 2021-08-01 14:10:21 +01:00
Sergey Lyubka 3ea4f1fda8 Merge pull request #1324 from ignacionr/fix/issue-1323
allow for in-url colon, when port is not specified
2021-07-31 22:30:04 +01:00
Sergey Lyubka 5366844581 Fix #1325 - squash gcc 10 warning, and optimise casts 2021-07-31 22:26:43 +01:00
Ignacio Rodriguez e52a6184c4 test and fix 2021-07-30 12:34:55 -05:00
Sergey Lyubka b40b1232cc Enhance packed fs serving 2021-07-30 17:41:23 +01:00
Sergey Lyubka 3a46055e52 Better packed test 2021-07-30 13:19:20 +01:00
Sergey Lyubka 2af5d07467 Fix stm32 GA 2021-07-29 14:28:20 +01:00
Sergey Lyubka c2176f969b Implement FS virtualization 2021-07-29 14:21:20 +01:00
Sergey Lyubka 9346122c29 Add FS API layer 2021-07-28 21:11:07 +01:00
Sergey Lyubka b98556a4dc Enable mg_fopen_packed on ARM 2021-07-27 09:54:45 +01:00
Sergey Lyubka 55d102e450 Enable mg_fopen_packed in newlib 2021-07-27 09:50:11 +01:00
Sergey Lyubka dfc22af10f Run docker non-interactive 2021-07-26 18:18:29 +01:00
Sergey Lyubka 2d585474c1 Add riscv target, enhance arm target 2021-07-26 11:00:37 +01:00
Sergey Lyubka 53ee984eb7 Fix mg_prefix test 2021-07-26 09:26:52 +01:00
Sergey Lyubka bdb747f9de Fix mg_prefix test 2021-07-26 09:15:17 +01:00
Sergey Lyubka 299075c930 Add test for fopen_packed() 2021-07-26 09:05:34 +01:00
Sergey Lyubka b0e0247b21 Add ascii to the packed data 2021-07-25 21:08:02 +01:00
Sergey Lyubka 35abd695cd Add packed FS 2021-07-25 10:22:56 +01:00
Sergey Lyubka df2ffd1187 Refactor serve dir even more 2021-07-24 22:00:37 +01:00
Sergey Lyubka b378082ec4 Refactor mg_http_serve_dir() 2021-07-24 21:48:19 +01:00
Sergey Lyubka fb4fae9174 Optimise file serving path 2021-07-24 21:23:52 +01:00
Sergey Lyubka cddff2b1b8 Cleanup on riscv baremetal build 2021-07-24 11:40:52 +01:00
Sergey Lyubka d6dbf831f7 Remove mg_stat 2021-07-24 10:35:48 +01:00
Sergey Lyubka 7e1d4325ec Fail examples target if any example fails 2021-07-24 08:45:51 +01:00
Sergey Lyubka 2a2c17a232 Remove MG_ENABLE_STDIO and cleanup 2021-07-24 03:44:00 +01:00
Sergey Lyubka d130c6f42d Remove leftovers 2021-07-24 02:44:25 +01:00
Sergey Lyubka a09238debd Place config.h before arch*.h 2021-07-23 20:48:48 +01:00
Sergey Lyubka 328a87b02a Remove mg_file_size() 2021-07-23 20:18:34 +01:00
Sergey Lyubka 529faa1172 MG_ENABLE_FS -> MG_ENABLE_STDIO 2021-07-23 19:47:26 +01:00
Sergey Lyubka 8e5efd4804 7.3 -> 7.4 2021-07-23 12:17:05 +01:00
Sergey Lyubka 32406b678b Increase sntp test timeout 2021-07-22 23:03:20 +01:00
Sergey Lyubka 55e2077a46 Use mg_fopen only on win32 2021-07-22 22:46:33 +01:00
Sergey Lyubka a771d6a19d Add unicode filename 2021-07-22 20:16:50 +01:00
Sergey Lyubka 0d5d7bb26f Keep directory listing compile-time option 2021-07-21 11:05:27 +01:00
Sergey Lyubka 3808dd3222 Update issue template 2021-07-21 10:31:48 +01:00
Sergey Lyubka 8fc94e12af Add enable_dirlist to mg_http_serve_opts 2021-07-20 17:22:41 +01:00
Sergey Lyubka 824e33ef8a Merge pull request #1319 from ignacionr/patch-1
The sanitiser pointed out this problem
2021-07-20 16:46:30 +01:00
Sergey Lyubka 655f9a9f79 Add Content-Type header to the SSI files 2021-07-20 11:33:38 +01:00
Ignacio Rodríguez 6ac6aa521c The sanitiser pointed out this problem
And I believe it's right. Other-side-close should be done only for the 'A' (proxy-client-side) connection.
2021-07-20 00:04:05 -05:00
Sergey Lyubka 3982e065c8 Fix #1315, fix #1317 - use #ifndef instead of #pragma once for compilers that do not support #pragma once 2021-07-19 09:04:18 +01:00
Sergey Lyubka 497b8027f5 Fix #1314 - expose local port for listeners 2021-07-19 08:47:38 +01:00
Sergey Lyubka 89757388c7 Disable SSL v1.1 2021-07-16 12:10:48 +01:00
Sergey Lyubka 77fae5c562 Fix #1298 - shadowing struct mg_str constructor 2021-07-15 02:18:32 +01:00
Sergey Lyubka 80fcba91c8 Fix #1297 - %p warning 2021-07-14 04:00:27 +01:00
Sergey Lyubka 39d64be581 Fix FD_CLOEXEC setting 2021-07-13 22:49:36 +01:00
Sergey Lyubka 2bfd30ab4b Fix mac test 2021-07-13 20:49:19 +01:00
Sergey Lyubka 60004eb209 Fix mac test 2021-07-13 20:01:46 +01:00
Sergey Lyubka db11897d71 Fix #1302 - set FD_CLOEXEC on sockets 2021-07-13 19:32:31 +01:00
Sergey Lyubka 5e466f9037 Fix #1294 - add more common mime types 2021-07-13 19:24:46 +01:00
Sergey Lyubka 6b2698a503 Squash warning in mg_random() 2021-07-13 18:07:38 +01:00
Sergey Lyubka 4788db7e00 Fix #1301 - use correct openssl version conditional for SSL_use_certificate_chain_file() 2021-07-13 18:05:57 +01:00
Sergey Lyubka d9680df510 Support mbedtls 3.x.x 2021-07-13 17:28:07 +01:00
Sergey Lyubka f20ee1f305 Open HTTP and HTTPS ports 2021-07-13 14:40:52 +01:00
cpq 302bf865f9 Fix #1310 - wrap _CRT_SECURE_NO_WARNINGS into #ifndef 2021-07-13 07:13:06 +01:00
Sergey Lyubka 03929dcdaa Merge pull request #1306 from SimonNitzsche/patch-1
Fixed typo on README
2021-07-13 07:06:30 +01:00
cpq 89af2e9638 Merge branch 'master' of github.com:cesanta/mongoose 2021-07-13 06:58:52 +01:00
cpq 015586950f Fix #1305 - add #ifdef __cplusplus for C++ linkage 2021-07-13 06:58:34 +01:00
Simon Nitzsche 9df261a0eb Fixed typo on README
Added a dot to "etc" on the README
2021-07-04 17:40:18 +02:00
Sergey Lyubka a2a3c84450 Merge pull request #1303 from Jasper-Ben/master
Makefile: change curly brackets to round brackets
2021-07-02 18:28:53 +01:00
novlean 6611348ebf added customers references 2021-07-01 15:02:51 +01:00
Jasper Orschulko e69ee90acf Makefile: change curly brackets to round brackets
Esthetic change which replaces the curly brackets introduced by me in
commit b6ee9e637b with round brackets.
2021-06-30 21:46:58 +02:00
Sergey Lyubka 8f3554d08a Merge pull request #1295 from Jasper-Ben/add_linux_lib_targets
Add static and dynamic lib targets to Makefile
2021-06-21 11:35:43 +01:00
Jasper Orschulko b6ee9e637b Makefile: add static and dynamic lib targets 2021-06-21 11:51:42 +02:00
cpq f46453f80f Squash warnings 2021-06-10 19:37:03 +01:00
cpq 3deafaea7f Extend mg_mqtt_{pub,sub} by adding qos and retain 2021-06-10 19:27:19 +01:00
cpq a15d518571 Add mg_mqtt_pubex 2021-06-10 19:15:50 +01:00
cpq 886a29d659 Fix #1292 - allow requests with missing protocol version, responses with no reason fields 2021-05-29 10:07:05 +01:00
cpq e69de57def Optimise mg_iobuf_append() 2021-05-29 09:46:50 +01:00
cpq 9d68e20dcc Fix #1288 - better mg_iobuf_append allocation strategy 2021-05-29 09:44:07 +01:00
cpq c0a8546330 Add MG_ARCH_FREERTOS_LWIP 2021-05-28 23:49:26 +01:00
cpq 4c0002e28a Separate examples job 2021-05-28 19:05:10 +01:00
cpq 7c37d75bf4 Squash even more warnings 2021-05-28 18:57:47 +01:00
cpq 879261981f Squash more warnings 2021-05-28 18:54:39 +01:00
cpq 838b0bcd27 Squash more warnings 2021-05-28 18:45:35 +01:00
cpq 736b8ad7b7 Fix #1285 - __builtin___snprintf_chk warning. Tighten test flags and refactor the code to squash all warnings 2021-05-28 18:30:42 +01:00
cpq db27fae40e Update issue template 2021-05-24 10:18:44 +01:00
cpq 594111a255 Update issue template 2021-05-24 10:16:33 +01:00
cpq 53a46a2739 Change issue template 2021-05-24 09:53:39 +01:00
Sergey Lyubka eef7a55904 Merge pull request #1290 from lnksz/patch-1
Propose an issue template
2021-05-24 09:49:35 +01:00
Kristóf Havasi a68fa5e6e0 Propose an issue template
As it is in the discussion of raised issues to have some extra iteration because of architecture, library version, and other meta information, an issue template could save these extra rounds and possibly reduce the number of duplicates by highlighting where one can check for answers.

This is just a sketch based on what notifications I got from mongoose in the past months. Feel free to change it.
2021-05-23 22:44:16 +02:00
cpq 7c0d126edc Build with -DMG_ENABLE_FS=1 2021-05-19 08:10:38 +01:00
cpq 1a5e3d3151 Fix #1286 2021-05-19 00:19:21 +01:00
cpq 95ff6c56af Update readme 2021-05-19 00:15:45 +01:00
cpq e2ef392633 Update readme 2021-05-19 00:14:27 +01:00
cpq dbc2356768 FreeRTOS-Plus-TCP fixes 2021-05-19 00:00:32 +01:00
cpq 47e5e984df stm32f7 example starts on real h/w, with plus-TCP driver 2021-05-17 17:36:57 +01:00
cpq 0f32f50c50 Add missing files 2021-05-13 22:05:00 +01:00
cpq 606cc1f538 Build w/semihosting support 2021-05-13 22:04:29 +01:00
cpq 2bb11888d5 Build w/semihosting support 2021-05-13 22:03:46 +01:00
cpq 09b1d6aa72 Running two blinkers 2021-05-13 15:05:09 +01:00
cpq 72f0489ec2 Using nucleo-f746zg. Moved 3party libs to test/. Using headers from ST 2021-05-13 14:56:14 +01:00
cpq 7b39973065 docs 2021-05-12 11:44:15 +01:00
cpq 30b64483fd docs 2021-05-12 11:39:46 +01:00
cpq 5369fb0376 Remove low-level lwip stubs 2021-05-12 11:06:19 +01:00
cpq 5fe34fd6c3 Remove MG_ENABLE_MGOS 2021-05-12 11:05:05 +01:00
Sergey Lyubka 0fbdda4d2e Merge pull request #1284 from cesanta/stm32
Stm32
2021-05-12 10:28:43 +01:00
cpq a98e980c8f Nits to have tests pass 2021-05-12 09:25:21 +01:00
cpq 2b836504ab rename 2021-05-12 08:44:16 +01:00
cpq 0de3f0d985 f1 build works 2021-05-12 08:43:34 +01:00
cpq 151e375091 FreeRTOS w/blink works 2021-05-11 20:44:14 +01:00
cpq c44549bfa5 Blinky works 2021-05-11 18:05:03 +01:00
cpq d6852f5e74 First stab 2021-05-11 09:12:06 +01:00
novlean 9173034b96 Update README.md 2021-05-04 17:03:53 +01:00
novlean 2888ab1f52 Merge pull request #1277 from cesanta/novlean-patch-1
more typos + some fixes
2021-05-04 17:02:55 +01:00
novlean 26b5416641 more typos + some fixes 2021-05-04 17:02:46 +01:00
novlean 8bcac7e955 Merge pull request #1276 from cesanta/novlean-patch-1
fixed typo + added few things
2021-05-04 16:54:28 +01:00
novlean ea25e8129c fixed typo + added few things 2021-05-04 16:54:16 +01:00
cpq 26cb44f9d9 Typo in readme 2021-05-04 13:55:45 +01:00
cpq 7a37a44433 Update README 2021-05-04 13:53:17 +01:00
cpq a752f3f8c7 Update README 2021-05-04 13:46:44 +01:00
Sergey Lyubka 946e07644c Merge pull request #1275 from panosto/master
Corrected small typo in docs
2021-04-29 19:26:46 +01:00
Panagiotis 497b26a249 Corrected small typo in docs 2021-04-29 18:16:33 +02:00
cpq 79aad7fabf Put Range support back 2021-04-29 11:00:57 +01:00
cpq 7851930ac3 Fix #1256 2021-04-29 09:50:33 +01:00
cpq 758572872d Fix #1255 2021-04-29 09:26:37 +01:00
cpq 111551477a Integrate #1266 2021-04-29 09:17:24 +01:00
cpq 31c9e3fb7e Make mg_random() weak, see #1269 2021-04-29 09:09:21 +01:00
cpq 7061b7202f Integrate 1265 2021-04-29 08:49:23 +01:00
novlean d88b6a3c95 Update README.md 2021-04-28 17:07:39 +01:00
novlean cea2a62ee0 Added Schneider Electric case study & testimonial 2021-04-28 17:06:27 +01:00
cpq 35a8b8e8e8 TLS nits, more DNS logging 2021-04-22 15:21:16 +01:00
cpq 1b8624f135 Better log trace 2021-04-13 21:02:05 +01:00
cpq e217066bf6 Squash warning 2021-04-13 19:42:47 +01:00
cpq 5430408218 Merge branch 'master' of github.com:cesanta/mongoose 2021-04-09 16:55:16 +01:00
cpq d2744063a0 Remove unused MG_SWAPxx macros 2021-04-09 16:55:12 +01:00
Sergey Lyubka 03356616ef Merge pull request #1259 from mcottrell1/fix-msvc-compile-errors
fixed msvc errors around VLAs when using TLS
2021-04-09 16:54:23 +01:00
Mark Cottrell 6ce2e48dd3 fixed msvc errors around VLAs 2021-04-09 08:11:16 -07:00
novlean 16a7ba6bf0 Added 4 new sections
Why Mongoose
Used to implement
Case Studies
Testimonials
2021-03-25 17:50:56 +00:00
cpq e9d122f231 Stricter checks for mg_url_*() 2021-03-24 15:49:35 +00:00
cpq 0ae5c61759 More comments 2021-03-23 14:02:24 +00:00
cpq 691460c5fc Add linux target to http-server example 2021-03-22 11:30:48 +00:00
cpq ab1c924388 Better check in mg_iobuf_resize() 2021-03-22 11:30:29 +00:00
cpq 05050eba38 Squash warning in mg_random 2021-03-22 11:29:59 +00:00
cpq 912dd518bf Tests for mg_to64() 2021-03-21 16:18:44 +00:00
cpq e0395a9907 Merge branch 'master' of github.com:cesanta/mongoose 2021-03-21 16:14:56 +00:00
cpq 0051f23e12 Even stricted check in mg_to64() 2021-03-21 16:14:44 +00:00
novlean a9bb8fa9fc Update README.md 2021-03-19 14:02:23 +00:00
novlean 09f5d2fdae Merge pull request #1247 from cesanta/novlean-patch-1
added video call offer
2021-03-19 14:01:45 +00:00
novlean 006a9d914c added video call offer 2021-03-19 14:01:30 +00:00
cpq 9009cbc528 Adjust recv.len after stripping chunked body 2021-03-19 13:13:24 +00:00
cpq a1862986b8 Better docstring for file upload example 2021-03-18 12:23:03 +00:00
cpq cc2989a848 Merge branch 'master' of github.com:cesanta/mongoose 2021-03-18 12:01:32 +00:00
cpq 4deb95776f Remove multipart example code 2021-03-18 11:59:23 +00:00
Sergey Lyubka f195b27884 Merge pull request #1245 from panosto/mbedtls_parse_crt_and_key_from_buffer
mbedtls parse cert and key from buffer
2021-03-18 08:51:04 +00:00
panosto 5036a71334 mbedtls parse cert and key from buffer 2021-03-17 15:23:45 +01:00
cpq 531c47b47c mg_to64 overflow protection 2021-03-17 13:46:50 +00:00
cpq 4dbb2da78f Add form-upload example 2021-03-17 13:28:36 +00:00
cpq 41c1e0f08d Squash truncation warning 2021-03-17 12:22:19 +00:00
cpq e7b1905e49 Add -Wno-error=format-truncation for test++ build 2021-03-17 12:15:46 +00:00
cpq e00265f855 Add -Wno-error=format-truncation for linux++ build 2021-03-17 12:11:05 +00:00
cpq cd36708b6d Fix tests 2021-03-17 07:46:39 +00:00
cpq 5bd22cb5e4 Add mg_http_next_multipart() 2021-03-17 07:43:29 +00:00
cpq bc00d5159a Add mg_http_next_part 2021-03-15 13:20:53 +00:00
cpq bcb0874477 Add file upload code example 2021-03-15 09:36:27 +00:00
cpq 5326e8d212 Update docs 2021-03-15 09:18:02 +00:00
cpq 4528cc28ef Add sizep param to mg_file_read() 2021-03-15 09:16:34 +00:00
cpq 381d7cce54 Do not call setsockopts() on a listening connection 2021-03-13 12:36:00 +00:00
cpq 2594e7b37a Stricter MG_ARCH_CUSTOM and type conversions in sock.c 2021-03-13 12:34:26 +00:00
Sergey Lyubka 4356b953ca Merge pull request #1238 from cesanta/novlean-patch-1
Fixed typos
2021-03-11 13:16:06 +00:00
cpq e788853156 Fix typos 2021-03-11 13:15:53 +00:00
novlean 91ed6de166 Fixed typos 2021-03-11 13:01:45 +00:00
novlean cf3aafc32e added . 2021-03-11 10:16:17 +00:00
cpq c2d7ff8179 Update readme 2021-03-10 13:44:32 +00:00
cpq e5eaa1c633 Update readme 2021-03-10 13:42:46 +00:00
cpq 6366c832b0 Add struct mg_http_serve_opts::extra_headers 2021-03-10 07:56:14 +00:00
cpq f326cbedbe Fix doc example 2021-03-09 17:44:15 +00:00
cpq 5b272c2b5c Bump HEAD to 7.3 2021-03-09 11:38:37 +00:00
cpq 452bcc68a4 Add mg_mqtt_next_unsub() signature 2021-03-09 11:29:53 +00:00
cpq 829827d46f Add mg_mqtt_next_unsub 2021-03-09 09:54:02 +00:00
cpq ff9d0e462e Tiny refactor in walkchunks() 2021-03-09 08:22:52 +00:00
cpq e84ea91a4a Process chunked body before sending MG_EV_HTTP_MSG 2021-03-09 08:21:29 +00:00
cpq 2dcb10ef36 Less verbose test 2021-03-08 15:45:09 +00:00
cpq 99fa7f0851 2020 -> 2021 2021-03-08 15:44:57 +00:00
cpq 1b5cc341a5 Add streaming client support, MG_EV_HTTP_CHUNK 2021-03-08 15:41:16 +00:00
cpq d50dc288cd Add mg_crc32 2021-03-08 15:40:39 +00:00
cpq 060bb29cdc Restore mg_mqtt_{ping,pong,disconnect} 2021-03-07 12:21:59 +00:00
cpq 366426e8bb Avoid extra allocation for static HTTP handling 2021-03-07 11:56:20 +00:00
cpq e710df4c80 Define WEAK to nothing on Cygwin 2021-03-04 14:25:50 +00:00
cpq 79e5841483 Fix QNX build 2021-03-04 11:09:57 +00:00
cpq 374ab4ecf0 Add struct mg_mgr::userdata 2021-02-28 16:40:27 +00:00
cpq 56980be48c Do not reveal full root dir path 2021-02-17 16:07:18 +00:00
cpq 602c5c0866 Refactor mg_url_encode 2021-02-15 14:42:55 +00:00
cpq 7ce5009de1 Remove reduntant code 2021-02-15 14:42:22 +00:00
cpq 51e3a1304b Fix TLS build 2021-02-13 10:45:27 +00:00
cpq d5a1d5a5e8 Stricter realpath checks 2021-02-11 15:03:22 +00:00
cpq ae5f6c0920 Increase conn label size 32 -> 50 2021-02-10 11:09:13 +00:00
cpq 0a9303bb07 Stricter mg_http_parse() 2021-02-09 21:16:33 +00:00
cpq 42bc7b1f47 Add "struct mg_http_message::head" attr 2021-02-09 13:27:17 +00:00
cpq 4844ed60bd Remove fflush in logging 2021-02-09 00:16:13 +00:00
cpq 41f5daeb47 Fix mg_random 2021-02-08 19:43:01 +00:00
cpq a3f8f33d50 Allow mbedtls CA being inline PEM 2021-02-08 17:50:00 +00:00
cpq fd8db5c53a Better unicode handling on win32 2021-02-07 22:43:49 +00:00
cpq a2f027e798 Change mws binary link 2021-02-07 14:51:37 +00:00
novlean dad5c8fe87 Update README.md 2021-02-05 16:56:06 +00:00
novlean 98783a41ba Update README.md 2021-02-05 16:55:26 +00:00
cpq 1517d2985a Update README 2021-02-04 10:40:33 +00:00
Sergey Lyubka acc0564957 Merge pull request #1213 from csimons/drainig
README.md: fix typo: is_drainig -> is_draining
2021-02-03 08:30:55 +00:00
Christopher Simons 421bc126b5 README.md: fix typo: is_drainig -> is_draining 2021-02-02 22:17:15 -05:00
cpq ed1a98c381 Remove debug logs 2021-02-03 02:19:17 +00:00
cpq 457d76b049 Fix #1211 - adjust ESP32 example to serve FS 2021-02-03 02:13:05 +00:00
cpq 6827972f71 Fix #1210 - on win32, open upload file in binary mode 2021-02-02 08:43:56 +00:00
cpq 7eb998891e Show served dir in the start message 2021-02-01 00:02:33 +00:00
cpq 582fde5c6e Fix #1209 2021-01-31 19:54:42 +00:00
cpq d327ee9834 Improve SNI 2021-01-30 13:03:11 +00:00
cpq 31cf6f8969 https://localhost -> http://0.0.0.0 2021-01-29 13:18:34 +00:00
cpq 86b1053678 Add error check for iobuf allocation 2021-01-29 12:32:34 +00:00
cpq 6678e36278 Use openssl/ssl.h 2021-01-28 08:45:24 +00:00
cpq 5118355732 Use 64bit file ops even on 32bit systems 2021-01-26 17:43:31 +00:00
cpq 5b4b7f7dc5 Fix test 2021-01-26 17:01:43 +00:00
cpq 7614a8101f Wrap util funcs that use FILE into MG_ENABLE_FS 2021-01-26 16:34:42 +00:00
cpq 3c851bcfc3 mg_file_write -> mg_file_printf 2021-01-26 16:30:44 +00:00
cpq 01691dafa0 Released 7.1, move HEAD to 7.2 2021-01-26 13:07:42 +00:00
cpq 8e52075636 Handle calloc failures 2021-01-26 12:16:58 +00:00
cpq 7200f079bf Remove dead code 2021-01-25 14:43:56 +00:00
cpq d155db81de Add socks5 server example 2021-01-25 14:43:08 +00:00
Sergey Lyubka 25e3bbf039 Merge pull request #1200 from Davonter/master
Fix README.md mg_mgr_free
2021-01-25 10:37:35 +00:00
cpq eecf3d854b Show accepted IPv6 peer corrently 2021-01-25 10:35:45 +00:00
cpq 7c2499fc06 -D -> -v 2021-01-25 10:35:14 +00:00
cpq 1aa605c620 desktop-server -> http-server 2021-01-25 10:09:48 +00:00
cpq 66287ad6c1 TLS nits 2 2021-01-25 10:08:15 +00:00
cpq 9a19485454 TLS nits 2021-01-24 13:57:40 +00:00
cpq 7d67d578fd TLS krypton compat 2021-01-23 17:47:51 +00:00
wangtun 960d3c7880 Fix README.md mg_mgr_free 2021-01-23 15:49:55 +08:00
cpq 9eabf3fa81 URL decoding URI 2021-01-21 17:14:08 +00:00
cpq 89beadd2ce Squash warning in unit test 2021-01-21 10:24:49 +00:00
cpq 6ecb6c1500 Fix DNS timeout, add unit test 2021-01-21 10:00:18 +00:00
cpq 51bc5f70c5 Disable native socketpair by default, fix multithreaded win32 example 2021-01-21 09:12:49 +00:00
cpq be62ac9c14 Add more docs 2021-01-20 11:28:47 +00:00
cpq 161c34384d Enable SO_EXCLUSIVEADDRUSE on Win32. Better listdir response. 2021-01-20 11:10:02 +00:00
cpq 89784ab90a Restore to a simple version 2021-01-19 14:21:50 +00:00
cpq d83e547fa9 Make mg_url_port() return 80 for ws:// 2021-01-18 18:39:22 +00:00
Sergey Lyubka 30d86928d5 Merge pull request #1191 from RiccardoDalFiume/master
FIX README mg_http_serve*
2021-01-17 11:18:32 +00:00
cpq 12c32d09fb Pass mg_http_message to MG_EV_WS_OPEN 2021-01-17 11:16:19 +00:00
cpq ae6fd6aa35 Add extra headers param to mg_ws_upgrade() 2021-01-16 22:48:43 +00:00
cpq 72d3a49352 Restore SO_EXCLUSIVEADDRUSE 2021-01-13 03:47:11 +00:00
cpq 87b62390b7 No static for linux 2021-01-13 03:10:42 +00:00
cpq 6c93446a1f Better reuseaddr handling on Win32 2021-01-13 03:08:11 +00:00
cpq 83c106a857 UI for Win32 2021-01-13 03:07:51 +00:00
cpq facb2846fd Bump version 2021-01-13 03:07:38 +00:00
cpq 596c70d3dc Add config file processing 2021-01-12 15:18:19 +00:00
Riccardo Dal Fiume 7beff0201d FIX README mg_http_serve* 2021-01-12 11:28:41 +01:00
cpq a4c9d1ecb7 Update mg_http_serve_file() doc 2021-01-07 16:21:01 +00:00
cpq b7a79a556a Add extra headers param to mg_http_serve_file 2021-01-07 12:48:20 +00:00
cpq 03ab9e4e0d Update axios 2021-01-06 17:11:53 +00:00
cpq 7e855f5c8f Add oss-fuzz badge 2021-01-05 18:10:01 +00:00
Sergey Lyubka 9e510d5831 Merge pull request #1185 from hakabahitoyo/master
Suppress error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive] in MG_ENABLE_OPENSSL build.
2021-01-05 11:46:49 +00:00
Hakaba Hitoyo 1689a0d56b Update mongoose.c. 2021-01-05 12:35:28 +09:00
cpq 9ff774e7df Trigger test on pull requests 2021-01-04 12:02:55 +00:00
Hakaba Hitoyo c78ad0b574 Supress error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive] 2021-01-04 16:25:06 +09:00
cpq 117aeaa15d Fix fd leak for cached static files 2021-01-03 09:39:46 +00:00
cpq e135743efa Fix example build 2021-01-03 08:55:00 +00:00
cpq 2c1324dc0a Remove -r option 2021-01-03 08:43:56 +00:00
cpq c7e09bd7b4 Add SSI include file=, include virtual= 2021-01-02 17:57:51 +00:00
cpq 86824795a0 Pass opts structure to mg_http_serve_dir() 2021-01-02 12:30:09 +00:00
cpq 1b0636c2d2 More checks in mg_ws_send 2021-01-02 12:20:08 +00:00
cpq 2f9d2bbdf6 Update readme 2020-12-29 18:15:06 +00:00
cpq 21a1b2c15c Update readme 2020-12-29 17:59:05 +00:00
cpq bdef3d6afd Fix win98 test 2020-12-28 06:32:55 +00:00
cpq a882aab30e Add captive dns server example 2020-12-28 05:25:29 +00:00
cpq 788b577d65 Add README 2020-12-27 01:32:58 +00:00
cpq 71a22adc06 Add ESP8266 example 2020-12-27 01:29:42 +00:00
cpq 7d1ef2ffe8 Add mingw tests to actions 2020-12-25 19:28:05 +00:00
cpq 55f5f74658 Add mingw gcc and g++ tests 2020-12-25 19:24:51 +00:00
cpq e1fd82bc46 Remove unused code 2020-12-25 15:04:43 +00:00
cpq 49b8480bfb Add http-reverse-proxy example 2020-12-25 04:32:56 +00:00
cpq b2ab484883 Fix #954 2020-12-24 19:10:54 +00:00
cpq 4c3b97be7d Squash -DMG_ENABLE_FS=0 build warning 2020-12-24 18:48:28 +00:00
cpq 60e1b64455 Fix https://github.com/cesanta/mongoose/issues/1030 2020-12-24 17:01:49 +00:00
cpq 6bcd02bb1c Enhance HTTP client example 2020-12-24 16:52:58 +00:00
cpq 66f302a613 Make DNS debug log less verbose 2020-12-24 16:52:33 +00:00
cpq 1716af6c72 Add HTTP client code 2020-12-24 16:52:12 +00:00
cpq 749326c83a Add more mg_http_parse unit tests 2020-12-24 14:33:23 +00:00
cpq 9657577c00 Fix typo in fuzz test 2020-12-24 09:09:25 +00:00
cpq 9f5216d259 Add more fuzz tests 2020-12-24 09:07:55 +00:00
cpq c8826e8f9c Refactor mg_ntoa and mg_straddr 2020-12-24 08:05:54 +00:00
cpq 25bc13ef1e Squash some warnings under mingw crosscompiler 2020-12-24 07:26:50 +00:00
cpq 4d123a15f9 Drop deprecated register keyword 2020-12-23 21:20:48 +00:00
cpq 2cf1b09767 Workaround for WIN32 C++ snprintf/vsnprintf/strdup calls 2020-12-23 21:05:46 +00:00
cpq abfd81cb9d Fix WS frame length encoding for len 0xffff 2020-12-23 16:18:49 +00:00
cpq 3895678bee Use MG_EV_WS_CTL for WS control messages 2020-12-23 11:58:08 +00:00
cpq e0a1feafe0 Fix localhost resolution 2020-12-23 10:15:09 +00:00
cpq c75eb24eb8 Add proxy client example 2020-12-22 21:01:14 +00:00
cpq c3aae185df Add ipv6 server test 2020-12-22 10:16:31 +00:00
cpq 2e87783246 Add IPv6 client test 2020-12-22 09:44:59 +00:00
cpq fbab767b9f Fix mg_prefix job 2020-12-21 12:39:03 +00:00
cpq 7bc38b5eaa Add examples build, fix prefix build 2020-12-21 12:33:27 +00:00
cpq b93456f512 Do not create socket until resolved 2020-12-21 12:26:44 +00:00
cpq ddb700eee5 Fix openssl build 2020-12-20 21:50:46 +00:00
cpq 1052ee0766 Fix openssl build, and add openssl test 2020-12-20 21:45:58 +00:00
cpq 29534218d7 IPv6 related refactoring 2020-12-20 16:55:33 +00:00
cpq d7abd53062 Always send MG_EV_CONNECT on TCP connect 2020-12-18 15:13:19 +00:00
cpq aede72fa37 Refactor HTTP client 2020-12-18 14:29:30 +00:00
cpq b0a5165b44 Uload coverage 2020-12-18 11:47:56 +00:00
cpq 4919f792f2 Make build badge a link 2020-12-18 11:32:59 +00:00
cpq d5927f5d50 Remove travis - migrated to Github Actions 2020-12-18 11:31:31 +00:00
cpq e68330e045 Rename workflow 2020-12-18 11:26:17 +00:00
cpq b5d5b3763f Add workflow badge 2020-12-18 11:24:36 +00:00
cpq b6a6687c1e Rename workflow 2020-12-18 11:24:06 +00:00
cpq 3843b670a5 Fix typo 2020-12-18 11:14:21 +00:00
cpq 249efdd378 Add windows test 2020-12-18 11:12:08 +00:00
cpq 18ce1669fc Add mac test 2020-12-18 11:09:03 +00:00
cpq e8d3b8030e Install mbedtls 2020-12-18 10:56:35 +00:00
Sergey Lyubka a752abf318 Create test.yml 2020-12-18 10:41:27 +00:00
cpq d3ebcaf5d2 Remove unneeded defines that break vc2015 build 2020-12-18 09:48:28 +00:00
cpq 0abb8322d9 Disable noisy debug 2020-12-18 09:48:05 +00:00
cpq 99ed58ec4d Better docstrings 2020-12-18 09:08:28 +00:00
cpq 04450ec659 Update http server example to showcase SSL 2020-12-18 09:01:14 +00:00
cpq 82a378e519 Add extra param to http_reply() 2020-12-17 22:47:55 +00:00
cpq 29d31ba919 More boundary checks for mg_dns_parse() 2020-12-17 19:14:17 +00:00
cpq 4519ea568d Add conditional for SSL_use_certificate_chain_file() 2020-12-17 12:12:46 +00:00
cpq 9f88f31f01 Add timer example 2020-12-17 11:44:30 +00:00
cpq 4bdea2b467 Add README to the esp32 example 2020-12-17 11:24:28 +00:00
cpq 2252a74cd7 Note on UDP 2020-12-17 11:19:13 +00:00
cpq d1fa7b88e0 Disable brew update 2020-12-16 14:05:36 +00:00
cpq 9ecf42578c Fix screenshot link 2020-12-16 10:54:47 +00:00
cpq 754fc25924 Add description & screenshots 2020-12-16 10:54:09 +00:00
cpq d9551c75b1 Refactor MQTT parsing 2020-12-16 10:14:00 +00:00
cpq 8d45cf6972 Add mqtt-server example 2020-12-15 20:29:47 +00:00
cpq f176e1ae59 Handle more mime types 2020-12-15 11:58:30 +00:00
cpq fa8f62fb5d Squash warnings under linux 2020-12-14 14:05:01 +00:00
cpq 0c142f20d7 Using linux for docker tests 2020-12-14 13:09:56 +00:00
cpq b641fc6b79 Add esp32 example 2020-12-14 12:58:27 +00:00
cpq 1252a61479 More docs 2020-12-14 09:36:46 +00:00
cpq 5f631c0b96 More docs 2020-12-14 09:35:03 +00:00
cpq 348c579521 Add dns test case 2020-12-14 09:31:23 +00:00
cpq 7ce9cdf0b9 More docs 2020-12-14 09:31:03 +00:00
cpq 09beadb98a Fix c++ fuzzer build 2020-12-13 16:56:30 +00:00
cpq 5b265a76bd Add minor case to fuzzer 2020-12-13 16:33:46 +00:00
cpq c5a4a1c6f2 Remove debug leftover 2020-12-13 00:37:04 +00:00
cpq 88ada54045 More tests 2020-12-12 20:38:09 +00:00
cpq c5b1c08d05 Use MSG_NONBLOCKING for recv/send 2020-12-12 16:48:47 +00:00
cpq a0765ade6b Use -DMG_ENABLE_LINES for fuzzer build 2020-12-12 14:23:28 +00:00
cpq 54250f5fbf Rename, use hyphen 2020-12-12 10:22:45 +00:00
cpq f3f397f31e Add MQTT client example 2020-12-12 10:03:19 +00:00
cpq d806ed5d5f Better coverage 2020-12-11 22:58:50 +00:00
cpq 37e9a2ee95 Fix C++ build error 2020-12-11 18:26:54 +00:00
cpq 7ad6a08002 Fix C++ build error 2020-12-11 18:21:29 +00:00
cpq 90686ee5c9 Add ws examples 2020-12-11 17:35:58 +00:00
cpq 85c5577955 mg_dns_parse_name() recursion protection 2020-12-11 14:02:52 +00:00
cpq 30d4a1ad0f Fix mg_sntp_parse() 2020-12-11 13:16:51 +00:00
cpq 1b551741b8 Fix mg_url_decode fuzz 2020-12-11 09:35:50 +00:00
cpq 369f44adfa Add version.h 2020-12-10 17:46:26 +00:00
cpq 763f4551d5 More log messages 2020-12-10 17:42:59 +00:00
cpq 42d7865e14 Pre-built desktop server 2020-12-10 17:39:40 +00:00
cpq cf62702f08 Switch to hivemq 2020-12-10 16:36:24 +00:00
cpq 14ccd78782 Update README 2020-12-10 14:21:38 +00:00
cpq 6c4b5efd98 Add restful and client example 2020-12-10 13:26:05 +00:00
cpq 05a43c563c Update READMEs 2020-12-08 16:53:35 +00:00
cpq 94d2e86b60 More docs 2020-12-08 16:26:17 +00:00
cpq d1b8f9e01f Fuzz-test mg_http_var and base64 2020-12-07 18:52:40 +00:00
cpq 228acefa36 Fix native socketpair call 2020-12-07 10:55:50 +00:00
cpq d1d8a77bf6 Use socketpair syscall when available 2020-12-07 10:25:28 +00:00
cpq 7ea3293aba More tests 2020-12-07 08:54:58 +00:00
cpq 082a498afd Fix badges 2020-12-07 08:08:21 +00:00
cpq 866c987409 Tuning test 2020-12-07 05:46:47 +00:00
cpq 1d0e65d17a Tuning test 2020-12-07 05:39:07 +00:00
cpq 136a37ef73 Tuning test 2020-12-07 05:18:07 +00:00
cpq 0ce49b5c71 Tuning test 2020-12-07 05:08:21 +00:00
cpq 490ad3834b Tuning test 2020-12-07 05:00:27 +00:00
cpq bcc62c96c8 Tuning test 2020-12-07 04:56:50 +00:00
cpq 15d6cb3065 Tuning test 2020-12-07 04:44:23 +00:00
cpq a490660b38 Tuning test 2020-12-07 04:19:26 +00:00
cpq 72019b7427 Tuning test 2020-12-07 04:18:29 +00:00
cpq 21c0024a2f Tuning test 2020-12-07 03:59:42 +00:00
cpq d7a02d13e4 Add test++ linx++ 2020-12-07 03:47:37 +00:00
cpq cb220837b9 Tuning test 2020-12-07 01:27:44 +00:00
cpq ddaae51d42 Tuning test 2020-12-07 01:12:21 +00:00
cpq 629e55f97d Tuning test 2020-12-07 01:00:35 +00:00
cpq 909ebad276 Install deps 2020-12-06 23:32:15 +00:00
cpq cb7743fa39 Move tests -> test 2020-12-06 23:19:56 +00:00
cpq 6197842bca Merge branch '7.0' 2020-12-06 22:52:11 +00:00
cpq 77d461dcbf Remove travis build 2020-12-06 22:51:32 +00:00
cpq 47b6060910 Add docs 2020-12-06 21:12:05 +00:00
cpq 47d3fe5af6 Add travis build 2020-12-05 11:58:32 +00:00
cpq 6691a2fdad Add badges 2020-12-05 11:46:12 +00:00
cpq 746f56f42a README update 2020-12-05 11:41:23 +00:00
cpq 87de05881c Add travis build 2020-12-05 11:34:58 +00:00
cpq f2fba1d200 7.0 refactor 2020-12-05 11:26:32 +00:00
Sergey Lyubka 34d4fb8cf0 Merge pull request #1157 from rojer/qq
Add mg_next_query_string_entry_n() and mg_url_decode_n()
2020-10-26 13:25:31 +00:00
Deomid Ryabkov be64f81eee Add mg_next_query_string_entry_n() and mg_url_decode_n()
Move to mg_util.h so encode and decode are next ot each other.

Pull out mg_next_list_entry_n() for advanced use cases.

Add unit tests.
2020-10-24 22:53:50 +01:00
Sergey Lyubka 9fe1c93c9b Merge pull request #1143 from rojer/cs_log_lock
Add cs_log_{lock,unlock}
2020-08-28 20:46:37 +01:00
Deomid Ryabkov a4b6d58b24 Add cs_log_{lock,unlock}
In implementatiosn that have preemptive scheduelrs these can be implemented
to ensure logging from different threads is properly serialized.
2020-08-28 20:29:13 +01:00
Sergey Lyubka 86f391c701 Merge pull request #1139 from rojer/warns
Fix warnings and sync line numbers of unamalgamated sources
2020-08-20 00:45:02 +01:00
Sergey Lyubka 36de38bd11 Merge pull request #1138 from rojer/1135
Add missing range check in mg_get_http_header()
2020-08-20 00:44:36 +01:00
Deomid Ryabkov a308872c88 Fix warnings and sync line numbers of unamalgamated sources 2020-08-19 22:02:50 +01:00
Deomid Ryabkov a369160296 Add missing range check in mg_get_http_header()
h/t BushraAloraini

Fixes https://github.com/cesanta/mongoose/issues/1135
2020-08-19 21:48:45 +01:00
Sergey Lyubka 0a09b46c94 Merge pull request #1128 from rojer/amalgam
Sync src with amalgamated versions
2020-07-12 15:32:42 +01:00
Deomid Ryabkov b0a1cd7b0d Sync src with amalgamated versions
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.
2020-07-08 02:08:49 +01:00
novlean 73a2b92278 Merge pull request #1124 from cesanta/novlean-patch-1
added MWS white paper
2020-06-24 17:08:49 +01:00
novlean c3bb5bd89e added MWS white paper
Download “9 Things NOT to do when embedding a web server” white paper.
2020-06-24 17:08:35 +01:00
Sergey Lyubka d22ff2fce7 Really revert 4880069 2020-06-11 19:08:55 +01:00
Sergey Lyubka fee2980d95 Merge branch 'master' of github.com:cesanta/mongoose 2020-06-11 19:04:45 +01:00
Sergey Lyubka d6693ed360 Revert 4880069 2020-06-11 19:04:24 +01:00
Sergey Lyubka 4880069775 Fix #1112 2020-06-11 18:38:42 +01:00
Sergey Lyubka 5d217a1262 Merge branch 'dev' of github.com:cesanta/mongoose into dev 2020-06-11 18:29:58 +01:00
Sergey Lyubka f778d22eac Make it possible to override default FS update algorithm
PUBLISHED_FROM=774a111548da97bd9d195e177b5fb66b0fd66135
2020-06-11 18:27:48 +01:00
Sergey Lyubka 3aa76dcaec Subst CREDPARAMS
PUBLISHED_FROM=545e8dff4ea0bef061c893252c613e3429f56184
2020-06-11 18:27:46 +01:00
Deomid "rojer" Ryabkov 4680573a6b Fixes for -pedantic build mode
PUBLISHED_FROM=d0a15356cf047e579c74869ce3e8fe813752e8c7
2020-05-23 15:55:27 +00:00
Deomid "rojer" Ryabkov 95fcb261eb Fix processing of keep-alive requests when chunks are consumed
PUBLISHED_FROM=136ce2ed4f143d7ee246e5fd1078c431e205bb3a
2020-05-22 23:07:38 +00:00
Sergey Lyubka 5867c67da2 Allow OpenSSL session reuse on 2-way SSL, integrate https://github.com/cesanta/mongoose/pull/877
PUBLISHED_FROM=6e2568b963869d062dd51b590f8e536d043c4ca2
2020-05-22 18:56:31 +00:00
Sergey Lyubka 80d74e9e34 Merge branch 'dev' 2020-05-21 16:45:34 +01:00
Sergey Lyubka 43a0b500f5 6.17 -> 6.18
PUBLISHED_FROM=7893a216b1f7e86e845122eb425e4fed271244b4
2020-05-21 16:42:09 +01:00
Sergey Lyubka 3d53ed17fb Allow OpenSSL session reuse on 2-way SSL, integrate https://github.com/cesanta/mongoose/pull/877
PUBLISHED_FROM=6e2568b963869d062dd51b590f8e536d043c4ca2
2020-05-21 16:17:14 +01:00
Sergey Lyubka 4ea452307e Update certs used for SSL test
PUBLISHED_FROM=2236ecf7fe06bdaf9a89e697b83ff69e1f8c805c
2020-05-21 16:17:12 +01:00
Deomid "rojer" Ryabkov e61f20f1ed Convert amalgam.py to Python 3
No mongoose.{c,h} diffs

PUBLISHED_FROM=a995a6d6548a914087969e28908f4e8c9ef1d379
2020-05-09 10:48:41 +00:00
Sergey Lyubka ca11f5ab49 Fix OpenSSL error issue
PUBLISHED_FROM=a3bcdb68f48a4de4a4f55b4399792fdd5211c88d
2020-05-02 11:19:29 +00:00
Sergey Lyubka 000d24d31a Add http proxy client example
PUBLISHED_FROM=443a0d3db63df1b78555a9fa4eff808bef3a9a01
2020-03-25 16:32:49 +00:00
Sergey Lyubka ef92f2e9c5 Integrate cesanta/dev#1062 - Fix dereferencing in mg_http_free_proto_data_endpoints
PUBLISHED_FROM=47fd1a4de07d2c53c994d29c88ac1d3a7f61c1a0
2020-02-21 14:30:21 +00:00
Sergey Lyubka 4e89eac8dd Integrate cesanta/dev#1074 - Fix typedef bool for MSC
PUBLISHED_FROM=f52fe15edd617d9f1ba2aa4051c116e79671554d
2020-02-21 14:24:50 +00:00
Sergey Lyubka b015e33ea5 Integrate https://github.com/cesanta/mongoose/pull/1096 - dir listing nits
PUBLISHED_FROM=a343bd61f98cbcc0f8cab02a62b912e494c27601
2020-02-14 08:30:56 +00:00
Sergey Lyubka 96e762d4a1 Change contributions section
PUBLISHED_FROM=676548efdb09989c300693a81dd592fe1cd987b0
2020-02-14 08:30:54 +00:00
Sergey Lyubka 359060a151 mongoose.h 6.17 2020-02-11 12:11:10 +00:00
Sergey Lyubka af1aff7fbb mongoose.h 6.17 2020-02-11 12:10:13 +00:00
Sergey Lyubka 517ef216c1 6.16 -> 6.17
PUBLISHED_FROM=c0cbd13faf84fdac1f4566be02b596a232b68713
2020-02-11 11:54:54 +00:00
Sergey Lyubka 734c13cdf5 Squash win32 warnings
PUBLISHED_FROM=3819e74efb9ac8ff84a68105107afcacaeeab92a
2020-02-11 11:52:07 +00:00
Deomid "rojer" Ryabkov 1bf3ad2426 MQTT ping fixes
* 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
2020-02-11 08:04:02 +00:00
Deomid "rojer" Ryabkov 884b9a4813 Add Content-Encoding: gzip when serving .gz files
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
2020-02-01 08:33:49 +00:00
Deomid "rojer" Ryabkov 7153690016 Keep the size of the structure the same in non-SSL build
PUBLISHED_FROM=8f93bee72bc18efff64354203ee6268f4f8e8768
2020-01-31 11:01:35 +00:00
Deomid "rojer" Ryabkov f00b3a2b3a Move ssl_if_data to the end of mg_connection
PUBLISHED_FROM=4fb65477b03bedc3206ac286e8236f0f9536f20e
2020-01-31 09:48:30 +00:00
Deomid "rojer" Ryabkov c2b5e4f3b8 Fix a leak when CA certificate file is invalid
Also free up some RAM by not allocating ca_cert when `MBEDTLS_X509_CA_CHAIN_ON_DISK` is enabled.

PUBLISHED_FROM=5e5f4103707de98c929973d2aed0aaedf0bb60da
2020-01-22 10:03:30 +00:00
Deomid "rojer" Ryabkov bc15e9ce9a Fix value of MG_MQTT_DUP
PUBLISHED_FROM=de1772bd6ea01f3dc467ceebb3b2af5cbe8eb240
2020-01-20 09:33:25 +00:00
Deomid Ryabkov 70dc6d8dc9 Add mg_strcasecmp()
CL: Add mg_strcasecmp()

PUBLISHED_FROM=cd2a26fa12473bfa0f5e7a0a1d34fb86562ee082
2019-12-29 19:39:45 +00:00
Deomid Ryabkov 10b11b03a8 Add mg_dns_encode_name_s for non-NUL terminated strings
PUBLISHED_FROM=012e2939021d1b275a39632fd2982891d2c98c4e
2019-12-29 19:33:41 +00:00
Sergey Lyubka cb602f178c Fix int overflow in parse_mqtt()
PUBLISHED_FROM=f9106d2f746c67ae004aeab12685eaf9cd558cd8
2019-12-23 11:13:41 +00:00
Sergey Lyubka 464113c5ae Sync mongoose changes
PUBLISHED_FROM=8b6ebf46728aca40f916dde88e372b4540ed6ea4
2019-12-19 11:12:57 +00:00
Deomid Ryabkov c34f6c54e7 Fix ota-shadow logic
PUBLISHED_FROM=68a57c967f8864946244893c71a397ab4e27d75d
2019-12-07 09:03:26 +00:00
Sergey Lyubka 8fb58ebbca Lsm
PUBLISHED_FROM=5f465d245bb9ada5202cdd23ddc5b9856df26951
2019-11-04 13:48:28 +00:00
Sergey Lyubka dce60c6dbb Merge pull request #1054 from M4GNV5/master
fix typo in tools/README.md
2019-10-07 09:08:58 +01:00
Jakob Löw f668d08804 fix typo in tools/README.md 2019-10-01 00:14:11 +02:00
Sergey Lyubka c41a22195c Merge pull request #1020 from nliviu/patch-2
Fix ASAN build for examples/cookie_auth
2019-09-30 07:46:39 +01:00
Sergey Lyubka 900c05213b 6.15 -> 6.16 2019-09-30 07:44:10 +01:00
Sergey c5850e4b05 Merge branch 'dev' 2019-09-30 07:41:04 +01:00
Sergey Lyubka ff4649fe42 Better UI
PUBLISHED_FROM=50f0cafa84cd06428f0da376d85766dcf62af9da
2019-07-12 12:33:28 +00:00
Sergey Lyubka 1a38e91042 Next
PUBLISHED_FROM=6fa0be81ce429b8db9e3ed572cb4a876b6fb2693
2019-07-12 09:33:26 +00:00
Sergey Lyubka b6196371bb Lsm
PUBLISHED_FROM=18d9d1e6411db84788c527d1c34ad2adc846df00
2019-06-26 10:33:24 +00:00
Sergey Lyubka d5beb7ba3f Merge branch 'dev' 2019-06-13 09:50:09 +01:00
Sergey Lyubka 19acf23c49 6.14 -> 6.15
PUBLISHED_FROM=69f3a5f14d4ebce0fb89728fc345f90f1e7b1700
2019-06-13 08:49:37 +00:00
Sergey Lyubka 5cd3291fec Merge branch 'dev' 2019-06-13 09:45:43 +01:00
Sergey Lyubka b3e0f780c3 Fix heap-based overflow in parse_mqtt
PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b
2019-06-13 08:18:14 +00:00
Sergey Lyubka 2bdbfc27f6 Integrate https://github.com/cesanta/mongoose/issues/1008
PUBLISHED_FROM=1b7bf2d7318568851e6c8f07451cd3982d9498b6
2019-06-13 07:48:28 +00:00
Sergey Lyubka 3fc61a3edc Fix mg_resolve2()
PUBLISHED_FROM=b0df728a75073c6ea9fc1984bb6a6b463f539347
2019-05-24 12:33:25 +00:00
Liviu 12339bbf4c Fix ASAN build
The ASAN build fails with
```
cookie_auth.c:62:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
  if (cookie_header == NULL) goto clean;
      ^~~~~~~~~~~~~~~~~~~~~
cookie_auth.c:84:10: note: uninitialized use occurs here
  return ret;
         ^~~
cookie_auth.c:62:3: note: remove the 'if' if its condition is always false
  if (cookie_header == NULL) goto clean;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cookie_auth.c:65:3: note: variable 'ret' is declared here
  struct session *ret = NULL;
  ^
cookie_auth.c:62:7: error: variable 'ssid' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
  if (cookie_header == NULL) goto clean;
      ^~~~~~~~~~~~~~~~~~~~~
cookie_auth.c:81:7: note: uninitialized use occurs here
  if (ssid != ssid_buf) {
      ^~~~
cookie_auth.c:62:3: note: remove the 'if' if its condition is always false
  if (cookie_header == NULL) goto clean;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cookie_auth.c:64:3: note: variable 'ssid' is declared here
  char *ssid = ssid_buf;
  ^
2 errors generated.
```
2019-05-08 14:54:31 +03:00
Deomid Ryabkov 1fb9f922b0 Fix mgos compile check
CL: none

PUBLISHED_FROM=a1320658181aa19cd1a269d7ae62e11b3439ef84
2019-05-03 16:36:08 +00:00
Deomid Ryabkov b93bc02ab0 Delete mos tool and related libraries from dev
Moved to https://github.com/mongoose-os/mos

PUBLISHED_FROM=8a0475678dba38fd6e057b8a530e9d08054ff74f
2019-05-02 12:03:33 +00:00
novlean 747e393a54 updated link to forum
PUBLISHED_FROM=784159d816e78f18fbfa6826f18bdea7d88dccbb
2019-04-29 12:40:14 +00:00
Deomid Ryabkov 4e8660a21f RS14100 fixes
CL: none

PUBLISHED_FROM=4d5d68f92d6c082b5b0c25ed8935fc097939001f
2019-04-24 19:16:41 +00:00
Deomid Ryabkov 3fe77fa9a6 RS14100: Optimize flash reads
CL: none

PUBLISHED_FROM=49d4f4a3c83520fd6ec9714b74333f75f3a2aa1c
2019-04-24 16:18:28 +00:00
Deomid Ryabkov b4fbaf7c13 Fix locking in lwip net_if
Was not being enabled when it should have been.

CL: Fix locking in lwip net_if

PUBLISHED_FROM=4810e73417c7599f0ea08a09812ed320d02f7cae
2019-04-23 20:03:44 +00:00
Deomid Ryabkov 9884241df8 mg_net_if_lwip: Fix invoking callbacks on tcpip thread
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
2019-04-15 16:33:40 +00:00
Deomid Ryabkov 63d7a4fa45 Core dump analysis improvements
* 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
2019-04-10 19:18:33 +00:00
Deomid Ryabkov 8f4b6c41a2 Make FreeRTOS a library, upgrade to 10.2.0
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
2019-04-01 19:02:26 +00:00
Deomid Ryabkov 4493d65ec9 RS14100: Flash and FS support, increase CPU and flash clock
Run CPU at 180 MHz, flash at up to 100.

CL: RS14100: FS support, increase CPU and flash clock

PUBLISHED_FROM=e9f995bf03e4e36dc66e19a2a2d60ae1675ecaae
2019-03-28 23:18:36 +00:00
Deomid Ryabkov e5910da300 Deliver EV_CLOSE to the last endpoint handler
CL: mg: Deliver EV_CLOSE to the last endpoint handler

PUBLISHED_FROM=02ee2c6627ed9ee1d35022244f71dfe1877ce2c0
2019-03-19 13:15:41 +00:00
Deomid Ryabkov c277a1d878 Do not amalgamate platform_custom.h include
CL: none

PUBLISHED_FROM=4f84111ef76bd609348c439304f46556ce5d4497
2019-03-12 11:48:27 +00:00
Deomid Ryabkov 7820ad3a59 RS14100: Blinky
The humble beginning...

CL: RS14100: Blinky

PUBLISHED_FROM=7f1dc4d826122ababae44b52c52ed84b15d0ae5c
2019-03-08 23:03:39 +00:00
Sergey Lyubka 23533b83a4 Allow NULL handler for mg_bind and mg_connect
CL:  Allow NULL handler for mg_bind and mg_connect

PUBLISHED_FROM=4963d5c022c2c57dd03101d9c7e72ca910c3bb61
2019-03-06 12:33:24 +00:00
Deomid Ryabkov ab650ec5c9 Merge branch 'dev' 2019-03-04 15:19:32 +00:00
Deomid Ryabkov 8f36597048 Mongoose 6.14
PUBLISHED_FROM=3e6e17d1f1cfb05efc37d76279dcbedb7f1add5d
2019-03-04 15:15:35 +00:00
Deomid Ryabkov d0213ee90a ESP32: Add support for the 3/4 key encoding scheme
* Add calculated redundancy values when writing eFuse blocks 1-3
 * Perform 192 -> 256 bit key extension when encrypting images for flashing

Fixes https://github.com/cesanta/mos-tool/issues/37

CL: mos: ESP32: Add support for the 3/4 key encoding scheme

PUBLISHED_FROM=16639fb25d5200550ad2097929239d896e188b5b
2019-03-04 09:18:28 +00:00
Deomid Ryabkov 1e9fabe1ca Fix handling of WS handshake error response
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
2019-02-14 21:19:34 +00:00
Deomid Ryabkov 148d3f0562 STM32F2 and Particle Electron board support
CL: STM32F2 and Particle Electron board support

PUBLISHED_FROM=20dede6546e9f99d2829508177924790d87e985a
2019-02-12 13:36:54 +00:00
Deomid Ryabkov c3057df3f5 Fix mongoose CI test
CL: none

PUBLISHED_FROM=9510e460251c250cb6a67a40edc0af515044f9fe
2019-02-08 17:38:56 +00:00
Deomid Ryabkov 0b2e474d52 Improve ESP flasher baud rate setting
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
2019-02-08 17:38:55 +00:00
Deomid Ryabkov 95a36b1759 Log file:line instead of function; add cs_log_set_file_level()
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
2019-01-30 12:57:19 +00:00
Deomid Ryabkov 86ffa3a3ea Properly support MQTT wildcards when matching topics
CL: mg: Properly support MQTT wildcards when matching topics

PUBLISHED_FROM=aa60a71d488f4b56dff0951886c8a9a4066fd4f2
2019-01-22 12:19:04 +00:00
Deomid Ryabkov 69e2b2985d Add mg_strfree()
CL: Add mg_strfree()

PUBLISHED_FROM=b80566218986e0607a9d2758bf776a1031b27212
2019-01-16 22:48:59 +00:00
Бобби c431904b56 Send extra options with OPTIONS
CL: Send extra options with OPTIONS. Integrate https://github.com/cesanta/mongoose/pull/657

PUBLISHED_FROM=6ee609a92febd8d908f7713f94fb73657443a09a
2019-01-16 11:33:57 +00:00
Deomid Ryabkov c2a10601b9 Fix nsleep100 on STM32
CL: Fix nsleep100 on STM32

PUBLISHED_FROM=cabb98a0541bac9bb66bfa702d54bf8ff20063e7
2019-01-08 20:43:55 +00:00
Deomid Ryabkov e9a8e5468d Convert Python scripts to Python 3, delete unused ones
CL: none

PUBLISHED_FROM=4bbc2175634e20a726dd4b2dadff57f945b261d0
2018-12-25 20:38:58 +00:00
Sergey Lyubka 22e602debb Check for NULL in tcp_recved_tcpip()
CL: Check for NULL in tcp_recved_tcpip()

PUBLISHED_FROM=3f5bbc2e35b79d363eac4b99a1f0d17c9b81d4ec
2018-12-21 13:03:48 +00:00
Deomid Ryabkov 455cec67a5 CC3220: Enterprise auth support
CL: wifi: CC3220: Enterprise auth support

PUBLISHED_FROM=ce445eb5b740073c9a3f9811f1acd404ce134f2e
2018-12-18 18:19:21 +00:00
Deomid Ryabkov e2dfac946d Ensure that user sees all the data before connection is closed
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
2018-12-10 21:04:49 +00:00
Бобби c198d2e5f1 Make MG_CTL_MSG_MESSAGE_SIZE overridable
CL: Make MG_CTL_MSG_MESSAGE_SIZE overridable

Fix https://github.com/cesanta/mongoose/pull/987

PUBLISHED_FROM=b0a7c67297b98f616c9eadcd3c34b8747939c918
2018-12-07 10:04:00 +00:00
Deomid Ryabkov 9a70abef24 Add mbuf_append_and_free() and mbuf_move()
CL: Add mbuf_append_and_free() and mbuf_move()

PUBLISHED_FROM=bdf73906dd93b2ebeace160596508e15480b54b4
2018-12-05 21:49:01 +00:00
Deomid Ryabkov 53e1c469a2 Add ability for multipart data handler to provide pushback
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
2018-12-05 16:02:56 +00:00
Deomid Ryabkov 139c2061a8 Add create-fw-bundle command
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
2018-11-28 20:34:06 +00:00
Deomid Ryabkov 15b361fbac Add mbuf_clear()
PUBLISHED_FROM=754b98b3000b24ad3b3d9cc0b4c480ca005a1c3f
2018-11-23 15:50:55 +00:00
Deomid Ryabkov 3130e59244 Stop reading if connection is closing
CL: none

PUBLISHED_FROM=3b74ca02e2960bbbf130f6d95aef679f2917e824
2018-11-02 18:12:34 +00:00
Deomid Ryabkov 93286836f9 Read all available data during recv poll
CL: mg: Read all available data during recv poll

PUBLISHED_FROM=b081025b9fb392c988924c7097b5333c38053f6f
2018-11-02 14:50:32 +00:00
Deomid Ryabkov 91b57aa9a8 Add MG_MK_STR_N() and mg_str_starts_with()
CL: Add MG_MK_STR_N() and mg_str_starts_with()

PUBLISHED_FROM=f01003efc6aa6ff45fa99c7ad6e5319f5002f22d
2018-10-29 15:50:31 +00:00
Deomid Ryabkov 220231e647 Fix digest auth result comparison
Should use length of the exected response, not the response sent by the user.

CL: mg: Fix digest auth result comparison

PUBLISHED_FROM=23375133b8babac0b276b51395917ad975e1bd3c
2018-10-15 16:47:18 +00:00
Deomid Ryabkov c438bb0bc5 Make mg_rpc more easily portable
CL: none

PUBLISHED_FROM=2e77d72cdf82454349a7fe29cc77bd0b90ac4369
2018-10-09 12:04:12 +00:00
Deomid Ryabkov 95afa323c0 Merge pull request #978 from cesanta/dev
Mongoose 6.13
2018-10-08 14:06:45 +01:00
Deomid Ryabkov bc56353a79 Mongoose 6.13
CL: none

PUBLISHED_FROM=32418b7da17a68193e88405547152f58a4dd877f
2018-10-08 12:20:32 +00:00
Deomid Ryabkov 1ffccdb7b2 Remove a spammy log line
PUBLISHED_FROM=b3ec2b3b43a464700a6e6d75b7336f823549cce3
2018-10-04 15:48:48 +00:00
Deomid Ryabkov e79fe4b8f0 Update mbedTLS to 2.13.1
CL: Update mbedTLS to 2.13.1

PUBLISHED_FROM=bd1216f727605a901f062a044c0c0ca762f4a6d1
2018-10-04 10:06:35 +00:00
Deomid Ryabkov aaf1fc3a4a Schedule a poll when LwIP reports TCP data sent
PUBLISHED_FROM=0cf3029d9a9b851882325e2298b878bc83fc2d33
2018-09-28 11:03:47 +00:00
Deomid Ryabkov 8b42353039 Check HTTP chunk size, ensure it's reasonable
CL: mg: Check HTTP chunk size, ensure it's reasonable

PUBLISHED_FROM=d9f6babd314c092b42ce9e7fe31d6b30a38366a2
2018-09-27 12:51:21 +00:00
Deomid Ryabkov 05c687e251 Fix handling of keepalive HTTP requests/responses
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
2018-09-27 12:51:18 +00:00
Deomid Ryabkov 492b8f6950 CC3200: Fix boot loader regression
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
2018-09-25 20:32:35 +00:00
Deomid Ryabkov 8ccee82059 Add mgos_gpio_blink()
CL: Add mgos_gpio_blink()

PUBLISHED_FROM=a5d2e2f44413d1ab363abeeaf0fb497bd8f63d6d
2018-09-25 20:32:33 +00:00
Deomid Ryabkov b99a94a652 Fix build w/o logging
PUBLISHED_FROM=694346bd6562c55e5ab00886df47f7cbfb0a3720
2018-09-25 11:34:05 +00:00
Deomid Ryabkov 41e5d7e471 Use mbedTLS from mongoose-os-libs/mbedtls
mbedTLS is just another lib now

CL: Use mbedTLS from mongoose-os-libs/mbedtls

PUBLISHED_FROM=bae4739d22e871bd268b8a3233dbb69634770243
2018-09-20 20:38:11 +00:00
Sergey Lyubka 1adea37c45 Integrate https://github.com/cesanta/mongoose/pull/667, fix documentation
CL: Integrate https://github.com/cesanta/mongoose/pull/667, fix documentation

PUBLISHED_FROM=80a939fc3276b89c29716e7373f674dba86769ee
2018-09-20 15:34:36 +00:00
Deomid Ryabkov 98f6c8aa4f Trim recv_mbuf when we know the size of the data
CL: none

PUBLISHED_FROM=e354b67ab6f8246af50c601f5f70d36c029601ea
2018-09-17 16:04:00 +00:00
Deomid Ryabkov 341ae53e85 Update mongoose.h (amalgamation)
PUBLISHED_FROM=1fbe72f99bda5745c4b9b9def0601bdc5bf70e65
2018-09-14 21:19:15 +00:00
Sergey Lyubka 291fc024cd Docs nits
CL: Docs nits

PUBLISHED_FROM=1a2fc8080d94673acf300c6f07aba3a1e6272295
2018-09-14 08:03:58 +00:00
Deomid Ryabkov f63d833a33 Update STM32 build image
* Update CubeL4 to 1.13.0
 * Rebuild OurTLS with `-DMBEDTLS_X509_CA_CHAIN_ON_DISK`
 * Add `-Wextra` and fix build issues

CL: Update STM32 build image

PUBLISHED_FROM=a7eacff7580bab6c6e40bdaf6164df575a717c55
2018-09-11 11:49:08 +00:00
Deomid Ryabkov ab035901f8 ISM43XXX networking support (TCP, UDP client)
Listeners still TODO

CL: ISM43XXX networking support (TCP, UDP client)

PUBLISHED_FROM=b58ba88b9e6bd7b55ccb607d0b69cea98cb52fa5
2018-09-11 06:34:08 +00:00
Deomid Ryabkov 20f54059ad STM32: Make LWIP optional
CL: STM32: Make LWIP optional

PUBLISHED_FROM=eebffe7800a74d7b69aafd95e476b2e90328be98
2018-09-06 11:27:58 +00:00
Deomid Ryabkov 563c31303e Add net_if_null, a no-op net interface
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
2018-09-06 08:34:17 +00:00
Deomid Ryabkov 421e099f2b Refactor mg polling
* 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
2018-09-06 06:34:18 +00:00
Бобби 955d4a3129 Fix file upload on windows
CL: Fix https://github.com/cesanta/mongoose/issues/962 - file upload on windows

PUBLISHED_FROM=85688eee147a1df468cca92f4ac61526ce9c02bf
2018-08-21 15:06:40 +00:00
Deomid Ryabkov b84981ad03 STM32 OTA support for L475-IOT01 and DISCO-F746
A smattering of other related changes

CL: STM32 OTA support for L475-IOT01 and DISCO-F746

PUBLISHED_FROM=e7142337086d09ba21437455b22d00db47ab33f1
2018-08-18 07:49:30 +00:00
Deomid Ryabkov 777b8e94e2 Merge branch 'dev' (Mongoose 6.12) 2018-08-13 19:30:06 +03:00
Sergey Lyubka 6df642623a Delete CONTRIBUTING.md 2018-08-13 19:28:18 +03:00
Deomid Ryabkov 0a3e186f11 Mongoose 6.12
CL: Mongoose 6.12

PUBLISHED_FROM=8008e4db2f6d94d972fb6e1077525e262c8744aa
2018-08-13 14:41:42 +00:00
Deomid Ryabkov c2d83a9db0 Don't touch send_mbuf when sending MQTT messages
h/t @M4GNV5

Fixes https://github.com/cesanta/mongoose/issues/943
Closes https://github.com/cesanta/mongoose/issues/944

CL: mg: Don't touch send_mbuf when sending MQTT messages

PUBLISHED_FROM=da7b4f8acec2e403caa4addd5739d036a6a74c76
2018-08-13 14:04:49 +00:00
Deomid Ryabkov f33d3a4e02 Fix body length calculation in mg_handle_cgi
Fixes https://nvd.nist.gov/vuln/detail/CVE-2018-10945

CL: mg: Fix body length calculation in mg_handle_cgi

PUBLISHED_FROM=0c30cf36fdb67c75f6148468701e23d6ee72d953
2018-08-13 13:05:22 +00:00
Deomid Ryabkov 86b8a56b05 Add host name verification for OpenSSL
Closes https://github.com/cesanta/mongoose/pull/955

CL: mg: Add host name verification for OpenSSL

PUBLISHED_FROM=e35dd636ba7ce63116f0a38031074d22f6cd5dac
2018-08-13 13:05:21 +00:00
Бобби ac6ec15aed Make esp8266 compilation a little less verbose
CL: Make esp8266 compilation a little less verbose

PUBLISHED_FROM=0ec1412ea32243f263d52fbe0877ecca1efc5aef
2018-07-23 15:26:47 +00:00
Deomid Ryabkov 31632c6361 Fix build with CS_ENABLE_STDIO=0
Closes https://github.com/cesanta/mongoose/pull/945

CL: Fix build with CS_ENABLE_STDIO=0

PUBLISHED_FROM=7d15f17fc42241facdba5b1004b5b7f3dda599dc
2018-07-12 20:42:45 +00:00
Deomid Ryabkov 98c99279c3 Fix warnings on newer versions of GCC
PUBLISHED_FROM=f1d25145446057fed9e8d634ca637364ca43a5e8
2018-07-09 08:34:29 +00:00
Deomid Ryabkov cdb8d7b692 Add mg_strstrip: trims whitespace at the ends of s
CL: Add mg_strstrip: trims whitespace at the ends of s

PUBLISHED_FROM=a7e10054ac25fa2b3a878876da93a6b30d9507b3
2018-07-07 14:04:42 +00:00
Deomid Ryabkov 93ac3e19f0 Stringify multi-word macros correctly
Use vararg macros for this.

PUBLISHED_FROM=735c40b79dedef17a1fdbb5b846e984df0ae7018
2018-07-03 15:05:23 +00:00
Deomid Ryabkov 6a51af9efe Fix a bug in mg_mgr_init_opt with opts.num_ifaces
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
2018-06-27 08:50:07 +00:00
Deomid Ryabkov 9d73b3470b Add LFS (littleFS) library
CL: mos support for LFS (littlefs) https://github.com/ARMmbed/littlefs

PUBLISHED_FROM=e72957b4fb2c78949af4cf6d5bfef135ddba9fd9
2018-06-26 16:49:42 +00:00
Deomid Ryabkov 1c8449cea6 Fix pipelining issue with multipart upload
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
2018-06-26 12:05:04 +00:00
Deomid Ryabkov 3bbbd41196 Add missing CC3220 sub-header to mongoose.h
CL: Add missing CC3220 sub-header to mongoose.h

PUBLISHED_FROM=a143485b629109c6e16c66b035f02f7552f76129
2018-06-21 16:34:56 +00:00
Deomid Ryabkov 339bbee0df mg_file_upload_handler: Support multiple files
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
2018-06-20 13:35:31 +00:00
Deomid Ryabkov 9ba6eb716d mg_lwip: Fix race during clean conenction teardown
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
2018-06-18 16:35:04 +00:00
Deomid Ryabkov d949c19c7e mgos_nsleep100 impl for ARM-based platforms
startup cleanup on CC3220

CL: none

PUBLISHED_FROM=0998fad82fbcdbde30dca42833f2e48d148592bf
2018-06-06 08:04:33 +00:00
Deomid Ryabkov 1299d6118f Add MG_HIDE_SERVER_INFO
Closes https://github.com/cesanta/mos-libs/pull/2

CL: Add MG_HIDE_SERVER_INFO

PUBLISHED_FROM=ed8a5b65f1c8238df414cd1c1f8bb1f579082f55
2018-05-17 16:20:44 +00:00
Deomid Ryabkov 244ff92e78 Minor build optimization
PUBLISHED_FROM=9997c64ed0c713b5b8b29df7a49b532e880eac53
2018-05-10 19:05:40 +00:00
Deomid Ryabkov 53f34dea04 Fix TZ on ESP8266
CL: Fix TZ on ESP8266

PUBLISHED_FROM=435a501a8b52524bccb67bb5a8ae7e09dfb4d44a
2018-04-26 15:26:39 +00:00
Sergey Lyubka 1f5c3fac31 Delete CONTRIBUTING.md 2018-04-17 15:08:35 +01:00
Sergey Lyubka 7014258c8d Remove copyright notices - that explained in the CLA.
CL: none

PUBLISHED_FROM=9cb4b915906d471ef5de4e0825567d0b942d3f7b
2018-04-17 11:45:31 +00:00
Deomid Ryabkov 1614e7ba8d Restore FFI-ability of struct mg_str
mgos_dlsym needs to include mg_str for ffi_exports to be able to use it

PUBLISHED_FROM=a2dd167c8e8f9e9b7316a856f19a4603080c3632
2018-04-13 17:12:07 +00:00
Deomid Ryabkov 43b5a4e735 Add a special attribute to printf-like funcs
Enables extra compile-time checks

CL: none

PUBLISHED_FROM=9f7d658fbda5c721cf40293bf29967bb056d0437
2018-04-13 17:12:06 +00:00
Deomid Ryabkov 43191db63e Fix boot loader UART baud rate on soft reboot
Also remove `-O3` optimization flasg, it negates `-Os`. Saves ~400 bytes.

CL: none

PUBLISHED_FROM=f40f42e4f54a8e0e003ab65ec8f5838c2d932876
2018-04-11 18:35:15 +00:00
Deomid Ryabkov e89be2e944 Add mg_url_encode_opt()
CL: Add `mg_url_encode_opt()` - a parametrized version of `mg_url_encode()`

PUBLISHED_FROM=17fa57a7a5325b51b6e3aef3855eac4e82c35782
2018-04-10 11:04:31 +00:00
Deomid Ryabkov c2fbff6d0e Fix mg_http_parse_header
Per standard, cookies are delimited by `; `.

CL: Fix mg_http_parse_header: treat ";" as a delimiter.

PUBLISHED_FROM=039243c30f5fabf4a4700a43506f841b3268306a
2018-04-10 10:19:36 +00:00
Deomid Ryabkov b8eca17c55 Reamalgam mongoose.{c,h}
PUBLISHED_FROM=8828792097bd19774472b8a2e61420565684d174
2018-04-03 16:08:21 +00:00
Sergey Lyubka 4650e491df Apache license to common/
CL: Apache license to common/

PUBLISHED_FROM=901e9e4b12a31289b3515d1f86dd56a7f0f35c5e
2018-04-03 11:49:59 +00:00
Deomid Ryabkov 3e33e57707 Mongoose net_if and ssl_if refactoring
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
2018-03-30 23:19:49 +00:00
Deomid Ryabkov c80f4c5313 Fix an edge case in multipart HTTP upload parsing
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
2018-03-30 19:35:20 +00:00
Deomid Ryabkov 132ecbec2f Fix Mongoose and Frozen include paths
In preparation for making moving to lib.
Reduce amount of makefile copypasta a bit.

CL: none

PUBLISHED_FROM=70a016491f9605e37708385bdd698f48a8d64119
2018-03-28 14:12:23 +00:00
Deomid Ryabkov 0a90cab44a Improve mbuf allocation behavior
* 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
2018-03-22 07:49:57 +00:00
Serge A. Zaitsev d16dbc197f mongoose: fix http pipeline
mongoose: fix formatting

mongoose: fix formatting

mongoose: remove debugging messages

PUBLISHED_FROM=1194e018001cc5f2b598096593d7aac4ec8dc04d
2018-03-20 16:41:56 +00:00
Serge A. Zaitsev 127f27e375 mongoose: unit test for http get pipeline
PUBLISHED_FROM=00e8634913232eb2e50a0d739f85e81706dbc400
2018-03-17 16:35:04 +00:00
novlean 6523cc4da0 2018
PUBLISHED_FROM=63ce52177f5f13cb76f0fcb4689efb65a04318a2
2018-03-12 21:20:20 +00:00
novlean 2516da1c89 updated to 2018 2018-03-12 16:49:45 +00:00
Serge A. Zaitsev 0ae2b82b60 freshen: early attempts to make ota and config work
freshen: implement ota rollback

freshen: api for rpc

freshen: implement rpc api (without transport)

PUBLISHED_FROM=9f935f676161c81464a0dc53d5d8d085b2437ffb
2018-02-27 14:19:33 +00:00
Sergey Lyubka dab526936f Add missing test files to mongoose repo
PUBLISHED_FROM=9a81cc34aa0039a75c851bc3685055f46936252e
2018-02-23 11:19:42 +00:00
Бобби 780077d118 Fix mg_socketpair for lwip + UDP
CL: Fix mg_socketpair for lwip + UDP

PUBLISHED_FROM=6dd09136b3837016026523fb34acb5cc893cadbe
2018-02-18 16:49:38 +00:00
Deomid Ryabkov ad8f1d88d4 Fix buffer size passed to inet_ntop()
Fixes https://github.com/cesanta/mongoose-os/issues/394

CL: Fix buffer size passed to inet_ntop()

PUBLISHED_FROM=4a6702527627ccbb780f45200274b09a28be69ee
2018-02-13 12:49:53 +00:00
Deomid Ryabkov a3c4a48ef7 Make sure test assertions are evaluated once
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
2018-02-10 12:19:40 +00:00
Deomid Ryabkov 84a11fe3b1 Count both tests and individual checks
CL: none

PUBLISHED_FROM=ab7f50e1c68154832e862ebfb4a02d385ef7c6be
2018-02-08 19:20:00 +00:00
Dmitry Frank 2a3cfc9858 Bump mongoose version to 6.11
PUBLISHED_FROM=92604e1b7c65009a6214fea9f1b2460df721d38e
2018-02-08 16:51:43 +00:00
Dmitry Frank b9b20c6494 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
2018-02-07 23:04:29 +00:00
Deomid Ryabkov a8a7d2cf7e Minor tweaks for testing
PUBLISHED_FROM=d52aea1648ed8ec8dd2e71168884795d995b1826
2018-02-07 20:19:31 +00:00
Deomid Ryabkov 50ecc30b4d Commonize unit test main()
CL: none

PUBLISHED_FROM=ee76407d89f3fcbe3da23810117a374d06af0a25
2018-02-07 16:19:32 +00:00
Deomid Ryabkov cd89db5c2f Add a convenience macro invoke subroutines
To properly fail a test in a subroutine, return value needs to be passed up.
This snippet makes it short.

PUBLISHED_FROM=2f6328b5eb2921a4caa53d8887c02f73a5d817ea
2018-02-07 14:49:23 +00:00
Deomid Ryabkov 1ed99999bd Add ASSERT_{TRUE,FALSE} convenience macros
PUBLISHED_FROM=3cd6dd7f04b650ca637788d1017b6b5146c79569
2018-02-06 16:49:32 +00:00
Dmitry Frank 4afebdcb2b Add UDP client example
CL: Mongoose Web Server: Add UDP client example

Resolves https://github.com/cesanta/mongoose/issues/886

PUBLISHED_FROM=fcce2f1de3a800147e9246ffa01c428c1b8f552b
2018-02-06 13:34:33 +00:00
Dmitry Frank c3d9d17e34 Remove "mongoose" prefix from includes
In certain files it was necessary to make tests work from public
mongoose repo, so this commit makes things consistent.

PUBLISHED_FROM=694454d0ff007229c65d524a2a2beaf126420f15
2018-02-05 20:20:05 +00:00
Dmitry Frank 7bf5144e62 Make tests work on public repo as well
PUBLISHED_FROM=78acb18d597b6f47f31da13087fa6685f21ce445
2018-02-05 14:35:37 +00:00
Dmitry Frank 3eb4eb8074 Fix mongoose docs generation
PUBLISHED_FROM=331821dcd1f7dc8a94581cd8a9b51aa00a89fddc
2018-02-03 01:20:48 +02:00
Deomid Ryabkov ab000c684a Fix includes
Even though it makes no prectical difference due to the way amalgamation works

CL: none

PUBLISHED_FROM=6977833f2b469e5b969385ad9ae21a28af76746f
2018-02-03 01:20:47 +02:00
Dmitry Frank aba60dadec Add mg_ prefix to mongoose sources
CL: none

PUBLISHED_FROM=d6ebe5fa88c61ae3b8569897d9b09d54610bec73
2018-02-03 01:20:47 +02:00
Dmitry Frank f29457e967 Remove tunneling from mongoose
CL: Mongoose Web Server: Remove tunneling functionality which was used by nobody

PUBLISHED_FROM=38b9e8ae7b0a5a1dbba5cff4074843dc681267d3
2018-02-02 21:50:13 +00:00
Dmitry Frank 8742fac5d8 Publish mongoose src and tests
CL: Mongoose Web Server: Publish sources and tests

Resolves https://github.com/cesanta/mongoose/issues/745

PUBLISHED_FROM=7ecd7a3c518cfa614a6ba0838678dcb91b75a8c0
2018-02-02 15:49:55 +00:00
Dmitry Frank 0ab1c7ef76 Fail if passed a NULL handler
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
2018-02-02 06:35:12 +00:00
Dmitry Frank 47abc641f1 Fix nonce in digest authentication
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
2018-02-01 22:05:43 +00:00
Dmitry Frank 7519b2ef3a Improve websocket implementation
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
2018-02-01 13:20:19 +00:00
Dmitry Frank ce8657f12f Fix corner case in preparing cgi env
`path_info` was dereferenced without checking for NULL, and a few lines
below, it was checked for NULL.

CL: none

PUBLISHED_FROM=9f14dc68c152b9b1119b276f047686d831bace38
2018-01-30 20:39:54 +00:00
Dmitry Frank 8e366916d5 Ensure that the name buffer is null-terminated
CL: none

PUBLISHED_FROM=f165b556582f712c2c1c752e01c41d22fe593397
2018-01-30 20:39:53 +00:00
Dmitry Frank 33f53ab000 Don't ignore setsockopt return value
PUBLISHED_FROM=f3c1fcf015f6f72eca2eb3d5dad469cd66a837a9
2018-01-30 20:39:52 +00:00
Dmitry Frank bd15ad4301 Improve err handling in pubsub example
PUBLISHED_FROM=7660e252e1ac84bf2245718c548fb00288ff4e47
2018-01-30 20:39:51 +00:00
Dmitry Frank e5b3b8ad32 Ensure not to overflow buf in udp server example
PUBLISHED_FROM=413f5073b0fc267d66ce04d8d40e9e9d7abac94d
2018-01-30 20:39:50 +00:00
Julien Ammous e116c48bef Remove redundant initialization
CL: none

PUBLISHED_FROM=9d68cdc298c520798468b43a19c84251bd0c21b4
2018-01-30 19:39:08 +00:00
Julien Ammous 7d7bb3b388 Don't use user_data in mqtt server
Integrates https://github.com/cesanta/mongoose/pull/884
Closes https://github.com/cesanta/mongoose/issues/883

CL: Mongoose Web Server: Don't use user_data in mqtt server

PUBLISHED_FROM=7785784a766e0ba7514bbba604cde14e7bad3f73
2018-01-30 19:39:05 +00:00
Dmitry Frank 0b4bf13335 Fix mg_parse_multipart in case of malformed req
CL: Mongoose Web Server: Fix mg_parse_multipart in case of malformed request

PUBLISHED_FROM=9b33b03e9ab2ca204ad2f8d061df169246644072
2018-01-30 19:39:03 +00:00
Dmitry Frank 228984a3fc Fix a corner case in receiving UDP data
CL: none

PUBLISHED_FROM=9c13882517374644c6d799976f1048f04ae446d7
2018-01-30 14:35:15 +00:00
Dmitry Frank f084ad8008 Fix pubsub example
CL: Mongoose Web Server: Fix publish-subscribe example

PUBLISHED_FROM=04fdb66c1d4eb56798a5be2634f9f9bb2f18f288
2018-01-30 14:35:14 +00:00
Dmitry Frank 255da78bed Fix socket leak when there are too many open fds
CL: Mongoose Web Server: Fix socket leak when there are too many open file descriptors

Fixes https://github.com/cesanta/mongoose/issues/870

PUBLISHED_FROM=c802b6834a54eca37821d46efde192c527e0a6b7
2018-01-30 13:37:42 +00:00
Dmitry Frank 5d5badfcee Fix memory leak in big_upload example
PUBLISHED_FROM=e6ccbd73b27985fbf9949adc3e07c90a75f75603
2018-01-30 12:51:15 +00:00
Dmitry Frank 4cf9f99ae9 Fix docs link
PUBLISHED_FROM=2b18b68e500a3d6123e80bd4db19e3b3b9900012
2018-01-30 09:50:44 +00:00
Dmitry Frank 673f25f75a Include stdbool.h for NRF52
Fixes https://github.com/cesanta/mjs/issues/82
Integrates https://github.com/cesanta/mjs/pull/85

PUBLISHED_FROM=2f5f50c25ec1c92fdfb783cd95cb57f0cb20642b
2018-01-29 22:35:15 +00:00
Бобби 961fb96bb7 Fix OOB access in mg_match_prefix_n()
CL: Fix OOB access in mg_match_prefix_n().
    Made mg_match_prefix_n() return non-negative result.

PUBLISHED_FROM=611454df6a6c55bfa7ddf05e7d268a86fa0457a8
2018-01-27 13:50:13 +00:00
Deomid Ryabkov d6475fcd19 Fix TCP RX path regression in SSL mode
CL: Fix TCP RX path regression in SSL mode

PUBLISHED_FROM=2cfdb33e5f711bbc4b98e2d24ba3377de0f1d3c5
2018-01-18 11:04:45 +00:00
Dmitry Frank ac538f755f Close undrained and stuck http connections
CL: - Mongoose Web Server: close undrained and stuck http connections

PUBLISHED_FROM=a11656b195dbe2ef8473455a171a583e37cedb2c
2018-01-16 15:20:47 +00:00
Deomid Ryabkov 5b2eb4f0e1 Enable building with CS_ENABLE_STDIO=0
h/t @kzyapkov

PUBLISHED_FROM=d15a5a0057f69f2f755af6436e676b1b179d069d
2018-01-15 20:20:36 +00:00
Deomid Ryabkov 10c274c774 STM32 Ethernet support
AWS MQTT connection works

Also fixes https://github.com/mongoose-os-libs/ethernet/issues/1 (because why not).

PUBLISHED_FROM=7b0fa8894f2127335d075f2a97fcd37b932006b2
2018-01-12 13:02:29 +00:00
Deomid Ryabkov eb3b81297d Use stock ARM GCC and Newlib from Ubuntu distro
Standardize common packages in build images, to make better use of Docker image cache.

PUBLISHED_FROM=a080e83cf5dd80feaf7960147dee36413244a92c
2018-01-04 11:56:42 +00:00
Dmitry Frank 80f4133bbf Get rid of magic numbers in parse_mqtt
PUBLISHED_FROM=63cc7ed8c3378bebf209d3620efb09d73675370c
2018-01-02 10:50:38 +00:00
Dmitry Frank d10fb9451c Move the recv limit check to mqtt
PUBLISHED_FROM=028d6f56ec1cc15484c995335f00d087b590faef
2017-12-29 17:35:29 +00:00
Dmitry Frank 88ae2ecadb Drain rx_chain before closing the connection
PUBLISHED_FROM=08eee4052dd9bbc364875a577409cb78665dee30
2017-12-29 07:50:43 +00:00
Dmitry Frank 85d19dad47 Respect recv_mbuf_limit in lwip
PUBLISHED_FROM=470ff0f484bff3e4478651f0b64cc160bba8ebfc
2017-12-28 12:49:54 +00:00
Dmitry Frank c5cc414181 Improve docs of str_util.h
PUBLISHED_FROM=de02f5cc6a9d854e92cf674e5382f793709da831
2017-12-17 14:50:54 +00:00
Dmitry Frank 17703fe3e8 Improve docs for logging
PUBLISHED_FROM=72f0892ecfba5b1c3c2a70f0ecd5715578d7ffce
2017-12-16 17:55:53 +00:00
Dmitry Frank 04aeeba2fa Add inet_ntop and inet_pton to esp8266
PUBLISHED_FROM=0a321ace3753a518e299b795fb7a4eed19708bb6
2017-12-14 21:51:00 +00:00
Бобби 4e11d5cdbf Move shadow to event API
PUBLISHED_FROM=cd059adee921dd10fd89100b0e2500ff8d7743eb
2017-12-14 13:32:11 +00:00
Dmitry Frank be63c0dc89 Improve docs
PUBLISHED_FROM=3b75fd8247ba9028e0ef0c3e211e7c1a80013951
2017-12-04 10:06:08 +00:00
Sergey Lyubka 987bc1d580 Use 8k iobuf limit for aws
PUBLISHED_FROM=971951e1eeb82078b986cd6e25e52cfc1ccef286
2017-12-02 21:26:35 +00:00
Dmitry Frank ddd35c0cba Fail if authn file is configured but doesn't exist
PUBLISHED_FROM=2c176091ffb6c7c5cfe8ea4f05b6109e00b33383
2017-11-28 19:35:22 +00:00
Sergey Lyubka c97b615785 Fix mg_parse_uri()
PUBLISHED_FROM=e5b829d93ecf946e5bdbbf33132be7068ffe0dd2
2017-11-28 16:45:52 +00:00
Dmitry Frank 9ab6d084df Expose digest auth checking functions
PUBLISHED_FROM=1bfc6e332f56b68eb6155bb729a97a0d8d5a316c
2017-11-28 10:05:36 +00:00
Deomid Ryabkov cf8d0a25aa Rename base64.{c,h} to cs_base64.{c,h}
To avoid name clashes.

PUBLISHED_FROM=e6ae32ec48f9b599eace7a9214a1863cdc185fd9
2017-11-24 11:36:12 +00:00
Бобби 0a0852b576 Document mg_match_prefix
PUBLISHED_FROM=b85fe1ee1e7bae4528c1240d8531c410728d0709
2017-11-23 11:53:02 +00:00
Deomid Ryabkov 90716417c9 Compatibility with LwIP 2.0
2.0 redefined LWIP_VERSION in a way that is no longer compatible with use by preprocessor (boo).
also, tcp_pcb.acked is gone, but we only use it for debug, so it doesn't matter.

PUBLISHED_FROM=776f90a08bd5024fa8a61dae257af6c60ec6710d
2017-11-23 10:05:43 +00:00
Deomid Ryabkov 101afbc9b8 Use weaker but faster cipher suites
ECDHE is way too slow on ESP8266 w/o cryptochip, this sometimes results in WiFi STA deauths.
Disable DHE completely because it's just hopelessly slow.

PUBLISHED_FROM=d9c8e95b7d5c992f9e127726c569f187b1e0b453
2017-11-21 15:33:00 +00:00
Бобби a197646867 Integrate cesanta/mongoose-os/pull/370
PUBLISHED_FROM=5bee629477514370f9b670771e786c4f4ddae934
2017-11-09 09:49:28 +00:00
Бобби 00d1d2c0e7 Make mjs & frozen vc98 & vc2017 friendly
PUBLISHED_FROM=7cde8b374d5e318b5cdd69fc5b4de86b2a9552f5
2017-11-08 16:04:08 +00:00
Deomid Ryabkov 6e50fe4475 Mongoose 6.10
PUBLISHED_FROM=c61fa89018f8cef4f798e094acff8d36c72869f2
2017-10-31 10:01:27 +00:00
Deomid Ryabkov 7942803a75 Fix MQTT SUBSCRIBE parsing
Make sure topic is properly NUL-terminated.
Ignore SUBSCRIBE requests with no topic expressions.

PUBLISHED_FROM=a00f39dda44fe63299e971a91a98f8ee57dd2a64
2017-10-30 15:34:22 +00:00
Deomid Ryabkov a8b74a9021 Fix bug when network conn is closed before CGI
NULL out cgi_nc->user_data so it doesn't touch nc anymore.

PUBLISHED_FROM=de2f76981c377d8951fb8e18e8b3d41dbfcf38b1
2017-10-30 14:20:27 +00:00
Deomid Ryabkov 27a9a62843 Fix SimpleLink listener for SSL
Must set SSL parameters before invoking sl_Listen

PUBLISHED_FROM=9147e7aa945f75e73d5c7cd7987cb5749025a86b
2017-10-24 07:19:45 +00:00
Deomid Ryabkov 9b268b6c77 Fix timer handling
ev_timer_time may remain the same for legit reason, so to prevent looping, instead, reset it before invoking the handler.
To let user know what the initial setting was, pass it as the argument instead of current time (which is kind of pointless).

PUBLISHED_FROM=fa328009f097f9b49b5b0dd13a38ee6d6e6518de
2017-10-21 09:19:42 +00:00
Sergey Lyubka 3b3ac48edd Fix potential leak in socks client
PUBLISHED_FROM=2cb4449d2f36d59db2b0dc37c46b35de6a461810
2017-10-19 13:49:43 +00:00
Sergey Lyubka 598e96a0cc Make amalgam work on windows
PUBLISHED_FROM=92f43c7b0a705ff40c4aea07f2ee0627f8e0e4a1
2017-10-19 13:49:42 +00:00
Бобби b5dd0e8093 Use verbose flags in both socks client and server
PUBLISHED_FROM=d17e96a97e1621e9788844bcd627c3143d37315c
2017-10-19 13:24:30 +00:00
Deomid Ryabkov 9b24fdfd1d Reformat mongoose
PUBLISHED_FROM=5202fa46a6a834bde35168ba566d3dce7c48f453
2017-10-19 13:24:26 +00:00
Бобби 8313896a85 Unbind things from v7
PUBLISHED_FROM=d20f138ae37c99a34cc29e7bfb327d7834404d93
2017-10-18 16:05:25 +00:00
Бобби 8193302162 Initial socks5 client & server implementation
PUBLISHED_FROM=05d3cca6223c963e7ae89dde3628fa8fad46e6bd
2017-10-18 14:05:13 +00:00
Бобби 6e3e5560d0 Move mongoose docs to https://cesanta.com/docs/
PUBLISHED_FROM=ebf5568abe82952ab2751298185a10189098013f
2017-10-16 15:18:24 +00:00
Dmitry Frank f0c6630a16 BREAKING: Sys config API change
Now apps should use getters and setters instead of accessing struct
fields directly, e.g. instead of `get_cfg()->update.timeout` it should
be `mgos_sys_config_get_update_timeout()` to get the current value, and
`mgos_sys_config_set_update_timeout(123)` to update the value.

For now, the config structs are public, but they will be made private
soon, so use accessors to keep your code working.

PUBLISHED_FROM=f7d582421a8d7e4d1ed50a280f2670d8b62f8d45
2017-10-11 11:15:48 +00:00
Deomid Ryabkov 1db747da29 Do not double-count recved bytes
Mongoose would report consumed bytes twice if mg_call is invoked recursively (e.g. proto_handler uses mg_call to invoke user's handler).
Reporting twice as much recved as was delivered effectively disables LwIP's TCP throttling and causes buffers to grow too big.

PUBLISHED_FROM=4ad5cd5db4dd54623bd6de2d50d32ddcc9e2b08a
2017-09-14 13:51:03 +00:00
Deomid Ryabkov 8065439f96 Acquire lock when manipulating rx in SSL recv path
PUBLISHED_FROM=a34cfa3ebc12daf75d7f24c8d3f3707dcc33d9a2
2017-09-14 11:06:24 +00:00
Deomid Ryabkov 62c896a872 Merge pull request #856 from cesanta/dev
Mongoose 6.9
2017-09-13 14:57:33 +03:00
Deomid Ryabkov 2db07dfc3b Mongoose 6.9
PUBLISHED_FROM=9e9047060b688291655ed227d19b7937fa9a147d
2017-09-13 11:36:46 +00:00
Sergey Lyubka 34eb3f1e66 Merge pull request #855 from cesanta/dev
Mongoose 6.8
2017-09-13 11:48:50 +01:00
Deomid Ryabkov 9d30e892e9 Mongoose 6.8
PUBLISHED_FROM=082d0bf5e9b06b850382ce502c7f5b4d68a6a328
2017-09-13 09:21:30 +00:00
Dmitry Frank 0aaba7a461 Add cs_timegm
Which is a slightly modified version from
https://stackoverflow.com/questions/283166/easy-way-to-convert-a-struct-tm-expressed-in-utc-to-time-t-type

PUBLISHED_FROM=b73f920ca42c45473c23337782e815306bdf69f1
2017-09-12 16:20:16 +00:00
Deomid Ryabkov 3d6b568c6e Prefer ECDHE with CBC over DHE ciphersuites
PUBLISHED_FROM=4ddfc25af77247fac7e7d04cc0e56d6f3800f87b
2017-09-07 11:04:38 +00:00
Deomid Ryabkov 2b2816cfe4 Store reassembled WS frame length in proto_data
PUBLISHED_FROM=7bbe7dd20dca8435c786dca30200a4973ae0827d
2017-09-06 19:05:00 +00:00
Deomid Ryabkov 2fa18b47db Fix DNS name uncompression
PUBLISHED_FROM=07e820f539fa5feca2ad1cf81faca8404b773a65
2017-09-06 18:05:29 +00:00
Deomid Ryabkov c8af7cdd27 Check for int overflow when parsing WS frames
PUBLISHED_FROM=b7325b38e881455df703b0b628c41931565ccb33
2017-09-06 17:34:37 +00:00
Deomid Ryabkov f857f6394f Access QoS field after validating topic length
PUBLISHED_FROM=6f2d9849d75ca1ec2b6dade11ccad8d0c5d4b3bd
2017-09-06 15:35:15 +00:00
Deomid Ryabkov 97d733e129 Fix MQTT broker SUBSCRIBE request parsing
Add checks on the number of subscribe requests per packet and overall per-session subscription limit.

PUBLISHED_FROM=faaf5c50af31a0694c9308a664f2e418dbb0eb18
2017-09-06 13:23:13 +00:00
Deomid Ryabkov 77e44c7c0e Harden MQTT variable length parsing
PUBLISHED_FROM=e16ee57bc30277e5b5684e53da78e69baaf9f779
2017-09-06 11:49:43 +00:00
Наше вам с кисточкой abf89d32d9 Make C ws client work with Go
PUBLISHED_FROM=263553121b992ec0f66b0275b4e10f4176281812
2017-09-01 08:35:53 +00:00
Deomid Ryabkov 177e05deb2 CC3220: AWS connection works
PUBLISHED_FROM=5831462c5be0b79afff32130a1f45784f32bc524
2017-08-31 21:52:31 +00:00
Deomid Ryabkov eb5645241c CC3220: WiFi, basic networking support
PUBLISHED_FROM=db89a45a536f0234d6d5cf740354c0dbeeff1f26
2017-08-31 15:32:50 +00:00
Deomid Ryabkov 202300952c CC3220: GPIO, sys_config and mgos_init support
```
Using port /dev/ttyACM0
[Aug 30 19:33:02.105]
[Aug 30 19:33:02.114] cc32xx_init          c_no_libs 1.0 (20170830-163205/mos8@6587ffd6+)
[Aug 30 19:33:02.123] cc32xx_init          Mongoose OS 2017083016 (20170830-163205/mos8@6587ffd6+)
[Aug 30 19:33:02.130] cc32xx_init          RAM: 253588 total, 240044 free
[Aug 30 19:33:04.430] cc32xx_start_nwp     NWP v3.4.0.0 started, host driver v2.0.1.19
[Aug 30 19:33:04.437] mgos_vfs_dev_open    slfs_container ({"prefix": "spiffs.img.0"}) -> 20005a64
[Aug 30 19:33:04.450] cc32xx_vfs_dev_slfs_ 20005a64 spiffs.img.0.0 262144 0xfffffffffffffffe
[Aug 30 19:33:04.457] mgos_vfs_mount       Mount SPIFFS @ / (dev 20005a64, opts ) -> 20005a74
[Aug 30 19:33:06.102] mgos_vfs_mount       /: size 233681, used: 4016, free: 229665
[Aug 30 19:33:06.108] mgos_vfs_mount       Mount SLFS @ /slfs (dev 0, opts ) -> 20005ed4
[Aug 30 19:33:06.114] mgos_vfs_mount       /slfs: size 0, used: 0, free: 0
[Aug 30 19:33:06.718] mgos_sys_config_init MAC: 04A316459442
[Aug 30 19:33:06.720] mgos_sys_config_init WDT: 30 seconds
[Aug 30 19:33:06.724] Hello, world!
[Aug 30 19:33:06.728] mgos_init            Init done, RAM: 253588 total, 236544 free, 235864 min free
```

PUBLISHED_FROM=7e83c9ddcc642bd324a40e125d6636ece824fb18
2017-08-30 17:49:34 +00:00
Deomid Ryabkov c7bea65ae7 CC3220 FS support
For now, we only support SPIFFS-in-a-box, same as CC3200.
On CC3200SF it should be possible to have SPIFFS on built-in flash, but that is left for later.

PUBLISHED_FROM=dee337c8cd8ed288c22abe9960eef81e6e90cc4a
2017-08-30 16:50:03 +00:00
Deomid Ryabkov d5a9000d46 Harden MQTT parser some more
PUBLISHED_FROM=5e7fcc7bf145aa8e1045e8d627b1c0731bb4341b
2017-08-30 12:49:30 +00:00
Deomid Ryabkov f62018451f Fix subscription parsing in MQTT broker
Also, do not accept PUBLISH and SUBSCRIBE before a sucessful CONNECT.

PUBLISHED_FROM=b5096cdc2ec5da1358244c428efbbb2e20be1a05
2017-08-30 08:49:35 +00:00
Deomid Ryabkov 0a93e301c9 CC3220: Exception handling, NWP init
Also make CC3200 use newer ARM compiler, generates slightly smaller code.

PUBLISHED_FROM=a0be49d7ea864a95886f7110887a59f6f11802d7
2017-08-29 21:49:53 +00:00
Dmitry Frank 6fe9cae62a Add mg_next_comma_list_entry_n()
And mgos_conf_check_access_n()

PUBLISHED_FROM=c7de937b4f5463ca463d604183a4ee831617bd6d
2017-08-27 12:49:28 +00:00
Deomid Ryabkov 38e984a008 CC3220 first steps
Achievement unlocked: CC3220 port prints a boot banner.
Then locks up.

Included in this PR is refactoring to pull out common parts to be shared with CC3200.

PUBLISHED_FROM=5fb9d9a00bb9ce7f63dde20bc1876076b76d5257
2017-08-26 17:05:00 +00:00
Our CI Bot 09e4254718 Add mqtt_over_websocket_server example
Fixed bug in websocket handshake:
now adding Sec-WebSocket-Protocol header in handshake response.

PUBLISHED_FROM=e4a71ff9dc4aeec63db40cb7f356dc5b25c1215a
2017-08-24 10:34:35 +00:00
Dmitry Frank d4b55c4ceb Separate digest auth from HTTP headers parsing
PUBLISHED_FROM=f97569ae2f31ab94ce4875eae4d0a198f719c388
2017-08-22 19:51:53 +00:00
Deomid Ryabkov 7d5479985d Enable LWIP net_if locking on ESP32 (doh!)
https://forum.mongoose-os.com/discussion/comment/4620/#Comment_4620

PUBLISHED_FROM=679dd48e078615ef4f57d1879957b734f549ef2e
2017-08-21 14:24:51 +00:00
Deomid Ryabkov 6517af3dea CC3220 blinky
Ignore all the mess, this is just the beginning...

PUBLISHED_FROM=41ab3c5af0b1d07204619dd4d8dc2e84b6a54f32
2017-08-21 07:52:09 +00:00
ruslanvaliullin 7632a5e4af Fix ignoring DhcpNameServer
PUBLISHED_FROM=73d6767e4aaa7249eeb5d76f9e7160be041292ca
2017-08-17 15:51:21 +00:00
ruslanvaliullin 7f20c41dd5 Implement rmdir & sleep func instead macros
PUBLISHED_FROM=62c73e5fb4f70e2b5b8824ce092012508640b173
2017-08-17 14:32:36 +00:00
ruslanvaliullin 66b23b11b0 Fix Nmap reset on ESP8266
PUBLISHED_FROM=7b9c85e7708721f2c6d0e2fc8ad5c32c61b48854
2017-08-16 17:40:48 +00:00
Deomid Ryabkov 448b44094a Add automated check for extern "C"
Fix headers that didn't have it

PUBLISHED_FROM=ce8140783d4b661f16278a4a5adc957b21965473
2017-07-27 11:19:56 +00:00
Sergey Lyubka 8bbb44f90c Always send MG_EV_HTTP_CHUNK
PUBLISHED_FROM=33957356e1510b73b37768496c74a6bf12630215
2017-07-21 13:34:52 +00:00
Deomid Ryabkov 0fba87c755 Make mg_url_encode public
Change the API to heap-allocate the string and get rid of a bunch of fat stack buffers.

PUBLISHED_FROM=c793dc64a9a044a9769d92ea16859f5d704a2181
2017-07-21 12:06:52 +00:00
Sergey Lyubka fea648496c Fix https://github.com/cesanta/mongoose-os/issues/318
PUBLISHED_FROM=2fc7b59b2edd0f473acd22067439471778acef8e
2017-07-20 08:05:12 +00:00
Sergey Lyubka 944a6b761c Fix https://github.com/cesanta/mongoose/pull/824
PUBLISHED_FROM=ed2c39b9e00a7374af7fed5af0c9acd6c330334a
2017-07-17 14:28:35 +00:00
Sergey Lyubka f1ae183752 Fix https://github.com/cesanta/mongoose/pull/829
PUBLISHED_FROM=6e56c250fe62010e25b6ed489c0d608163ba629c
2017-07-17 14:28:34 +00:00
Sergey Lyubka a0ece4e969 Fix links for MWS readme
PUBLISHED_FROM=c6c31d47eedcfe09b675e3f56d967da5b22809f6
2017-07-17 12:18:57 +00:00
Sergey Lyubka 0bb14abbdd Nitpick for MQTT example
PUBLISHED_FROM=a0dd26c00b41363f1cc58c28f530fbdf272ed146
2017-07-14 10:52:37 +00:00
Deomid Ryabkov 4c37e49274 Disable insecure and deprectaed SSL protocols
Also allow disabling conmpression and forcing server cipher list.

PUBLISHED_FROM=5539deec9c2382ba34597872dd7f3a5abc0cc311
2017-07-05 17:04:31 +00:00
Deomid Ryabkov 2a2bc33a89 Add mg_strstr
PUBLISHED_FROM=4306e870e2cab854febb6becc198ca2247e2e002
2017-07-05 16:20:32 +00:00
Dmitry Frank 41558bbf64 Fix formatting
PUBLISHED_FROM=4d4d49136e13ba8035d452a4f64fcaf48f15bdb3
2017-07-04 19:35:55 +00:00
Sergey Lyubka 4d0cc95ff4 Add JS net api test
PUBLISHED_FROM=f2821b104f8f2fc196ce4064b7c9f35ea152368d
2017-07-04 19:04:45 +00:00
Deomid Ryabkov cfd28a4f7a Add mg_strchr
Write unit tests for some mg_str functions.

PUBLISHED_FROM=1fc7e1d5d5ef259d4023f295aec8651caa3e7e86
2017-07-03 15:05:54 +00:00
Deomid Ryabkov 5a0b6fc35a Use SSL_CTX_{get,set}_app_data to store context
h/t @hendrikw01

Fixes https://github.com/cesanta/mongoose/issues/826
Closes https://github.com/cesanta/mongoose/pull/831

PUBLISHED_FROM=d5e1285bee9bcbb85d581ee62972a2fde7d9c0db
2017-07-03 11:04:40 +00:00
Dmitry Frank 3e59e1c465 Fix formatting
PUBLISHED_FROM=1803e726eee7bb64496d70389655083eb70257ab
2017-07-02 20:05:53 +00:00
Sergey Lyubka ae611a6e55 Clean up v7 from mongoose
PUBLISHED_FROM=efa9cc3aaf0c5ae8841e029370f882b615cebf1b
2017-07-01 08:51:09 +00:00
Sergey Lyubka a7a2e3deb1 Introduce log filter
PUBLISHED_FROM=b8f538f87e034452032284d45b78090338e87f72
2017-06-29 14:34:28 +00:00
Deomid Ryabkov cae0a1cbc0 Fix mongoose amalgamation
PUBLISHED_FROM=16ae777c949caf87e7dce428d62fa8878a30d318
2017-06-28 19:13:47 +00:00
Sergey Lyubka 244e5f67d3 Commonize pattern matching functions
PUBLISHED_FROM=e69e298a51dbe0f9c47184169ecad06eef0676fc
2017-06-28 18:35:37 +00:00
Dmitry Frank ff078882d5 Don't define fileno stub in C++
PUBLISHED_FROM=98fb6c78d20a98dfba07ba6671bd51a394bbc4ca
2017-06-27 15:19:50 +00:00
Sergey Lyubka 8d76733fad Make mg_conn_addr_to_str return len
Also amend api_net.js to use returned length.

PUBLISHED_FROM=38e15f9587edf28049c5b9e5f126b4db159910e8
2017-06-26 21:02:02 +00:00
Deomid Ryabkov fb3a5a7d90 Disable cert verification when ssl_ca_cert is '*'
PUBLISHED_FROM=578706e48a2c1fbbf5e9aaab3eba743e7d13fa61
2017-06-21 14:23:30 +00:00
Deomid Ryabkov f374ac5f9a Do not close already closed connection
PUBLISHED_FROM=9e345f2319141f20b89e28a2d29adba21ea213e1
2017-06-20 20:06:18 +00:00
Deomid Ryabkov 02707364f0 Lower conn accept message verbosity to DEBUG
Raised in previous commit by mistake

PUBLISHED_FROM=31a73fb610c34ed0c85d081bfa11a8067f216696
2017-06-20 19:14:33 +00:00
Deomid Ryabkov 104106b9cf Invoke tcp_accepted() on the listening pcb
As required by the LWIP API

PUBLISHED_FROM=7bfc6d816aa69f8fdd7592ade48b2d52e2d4991a
2017-06-20 19:14:31 +00:00
Deomid Ryabkov 474e065a30 MAX_PATH_SIZE -> MG_MAX_PATH
PUBLISHED_FROM=32bda9e86a11cad3b908d211a1f7bc9d27312874
2017-06-20 18:06:36 +00:00
Deomid Ryabkov 27094896b1 mOS filesystem refactoring: introduce VFS
With different filesystem implementations and storage drivers, like grown-ups have :)
This is not currently used to add any new functionality, we still have
only one FS and driver on ESP8266 and ESP32; CC3200 has two: SPIFFS and SLFS.
This will be used soon to implement filesystems on additional SPI flash chips and SD cards.

PUBLISHED_FROM=293960fef82952c505e9b1925aac7724c7308362
2017-06-13 15:35:38 +00:00
Dmitry Frank cd48bcfd7d Don't ignore userdata in mg_bind
PUBLISHED_FROM=0ffcd770535efa66ff1b6f9201f2caf832bd5055
2017-06-09 19:05:40 +00:00
Sergey Lyubka 5baeba53d7 Reorg docs
PUBLISHED_FROM=657a53762ada0ab3fe715a15939eb510a637e37f
2017-06-09 19:05:34 +00:00
Dmitry Frank 3a3b433849 Don't ignore userdata in mg_bind
PUBLISHED_FROM=0ffcd770535efa66ff1b6f9201f2caf832bd5055
2017-06-09 16:18:45 +03:00
ruslanvaliullin a2192ae483 Add mbuf_append result check
PUBLISHED_FROM=967a7ff3684e548ddbfe92365f7718a99e14d098
2017-06-07 18:50:24 +00:00
Deomid Ryabkov 023b55f2e5 MQTT client keep alive fixes
- Move keep alive management up to the Mongoose library
 - Only outgoing control messgaes should reset keepalive timer
 - Add unit test

https://forum.mongoose-os.com/discussion/1155/mqtt-keep-alive-compliance-issue

PUBLISHED_FROM=f86e30744ded53a6f7f96afec066b4ff3b4372c0
2017-06-04 21:50:23 +00:00
Deomid Ryabkov e4309d472b Annotate cs_log_printf with format attribute
This adds compile-time checks for format strings.

Fix issues exposed by this.

PUBLISHED_FROM=b9f820d8ad44fce9186dfdad4fe109fafa5371ce
2017-05-30 12:05:34 +00:00
Deomid Ryabkov c5452fc2ec Don't ignore non-merge commits when publishing
Merge commits are not explicitly ignored either: they're just naturally
ignored as empty commits.

PUBLISHED_FROM=12871fd4c9b1e9de4e57e13d810bffd98ddba299
2017-05-28 13:22:49 +00:00
Dmitry Frank f78ee9d42e Don't ignore non-merge commits when publishing
Merge commits are not explicitly ignored either: they're just naturally
ignored as empty commits.

PUBLISHED_FROM=2c814104eedd76ee90813488277ecaaf2baf6315
2017-05-28 13:22:48 +00:00
Deomid Ryabkov c8416cc17d NULL out name server field properly
Fixes https://github.com/cesanta/mongoose-os/issues/260

PUBLISHED_FROM=e95076915d52edb2298e3ea386281c277e42c89a
2017-05-26 14:44:11 +00:00
Deomid Ryabkov cf0a969a65 ESP8266 and ESP32 build image updates
ESP32: 2.0-r6
ESP8266: 2.0.0-1.5.0-r5

This brings updated mbedTLS with support for on-disk CA chains:
https://github.com/cesanta/mbedtls/compare/esp32_2.0-r5...esp32_2.0-r6
ESP8266 gets bigger rollup (ESP32 got those changes earlier, seems ok):
https://github.com/cesanta/mbedtls/compare/esp8266...esp8266_2.0.0-1.5.0-r5

Saves ~1.5K RAM for now, but will allow adding more roots to ca.pem without wasting RAM.

Refactored docker build for ESP8266 in the same way as was done earlier for ESP32.

PUBLISHED_FROM=db8eb0f91875d02266a8baaf1141c0d65eb59674
2017-05-25 17:20:18 +00:00
Deomid Ryabkov 06670d3401 Fix double-removal of send_mbuf data with SSL on
Other minor fixes.
Also decrease idle poll interval to 100 ms, as a workaround for some cases of incorrect next poll delay computation.

Added HW tests for SSL fetches.

Fixes cesanta/mongoose-os#262

PUBLISHED_FROM=4d19f845768b4b3b990d25959d4211972368d7fc
2017-05-19 16:20:00 +00:00
Deomid Ryabkov acfc66cd60 Correctly report bytes sent via SSL
This prevented hexdump from showing data sent over SSL when using LWIP net_if

PUBLISHED_FROM=aa520a27bdd21294484c52bf33c8580f3b4bad65
2017-05-11 10:07:09 +00:00
Deomid Ryabkov 6f140202ad Fix LWIP net_if when RTOS is used; use for ESP32
All calls to core LWIP APIs should go through the tcpip thread.

PUBLISHED_FROM=ebe8c7f043394a75a46810f2b6626582c63b9e68
2017-05-09 16:27:53 +00:00
Sergey Lyubka cfe77a3d58 Move struct http_message::body
Rationale: this is the optimisation to make JS FFI-ed API
work nicer. We don't have strucuture introspection now,
and do not generate offsets automatially. Thus, using a
stable well-known location of the parsed message body is
better, in case of number of HTTP headers macro changes.

PUBLISHED_FROM=55bf25ac77060a9c81dfecd6601f037562530801
2017-05-06 11:26:53 +00:00
Sergey Lyubka a0527a7f0e Fix esp8266 rtos example build
PUBLISHED_FROM=80055394237617605c57a07ac29c43d5197cbf5c
2017-05-05 10:25:41 +00:00
Sergey Lyubka c90cffa688 Fix docker invocation
PUBLISHED_FROM=064b5e508017b0115239fc880f21ca08b9422a25
2017-05-05 09:55:12 +00:00
Deomid Ryabkov d7a633bfa3 Fix timers when polling loop gets delayed
Past due timers should be brought forward to restore interval.

PUBLISHED_FROM=dbe1b8b98804cf8de81e1dbe814222422363278f
2017-05-03 12:51:15 +00:00
Deomid Ryabkov 0ea3cdd228 Implement sending stdout and stderr to MQTT topics
Configured via `debug.std{out,err}_topic`

PUBLISHED_FROM=66c581c38c5039aa9ecc406f8aac0b7e3c6541fc
2017-05-02 21:23:58 +00:00
Deomid Ryabkov ddef065493 Enable SNTP on CC3200
PUBLISHED_FROM=cea0fc4db21f5b68fd3e779334989fef84a1637a
2017-05-02 21:05:40 +00:00
Ruslan Valiullin ac857d18db Add mg multithreaded example
PUBLISHED_FROM=8a3424ba6260b0351d7c06270dc141d804ae7f77
2017-05-02 15:55:53 +00:00
Deomid Ryabkov 663e928d65 Fix mg_strdup_nul
PUBLISHED_FROM=25bc4d20016bcb71c4e2e4b7be8d2d0566fdfa2e
2017-04-27 14:39:46 +00:00
Deomid Ryabkov 189cd8c5f6 Add mg_assemble_uri
PUBLISHED_FROM=533e134a48e0fca55509c3eb16b0a6b64c1188e8
2017-04-27 13:50:33 +00:00
Deomid Ryabkov 692f436b3d Make mg_connect_ws accept http:// URLs
As well as URLs without prefix

PUBLISHED_FROM=ee298f6575603c8b384888633fe16413695ba70d
2017-04-27 10:51:31 +00:00
Deomid Ryabkov 2e65ce8272 Fix mg_parse_uri for URIs with fragment but no qs
PUBLISHED_FROM=8fb53581e8979c28026f9c2bcacb89de740c18cf
2017-04-26 14:50:38 +00:00
Deomid Ryabkov a35e5bd966 A function to make a NUL-terminated copy of mg_str
PUBLISHED_FROM=c1310b7d62f3ad6e2f24fea9f5229588c56b0bbe
2017-04-25 10:47:30 +00:00
Deomid Ryabkov 83fe5a17f3 Make mg_connect_{http,ws} use mg_parse_uri
Remove the specialized URI parser, clean up code a bit.

Fix parsing of URIs with IPv6 hosts (http://[2001:2:3::4]:567/)

PUBLISHED_FROM=968ad97585d928123106ce3828920ee073113f83
2017-04-24 14:59:52 +00:00
Deomid Ryabkov 49bbfaf130 Fix mg_lwip_if_get_conn_addr when there's no pcb
Connection may not (yet) have a TCP or UDP PCB associated with it.
mg_lwip_if_get_conn_addr should not crash in this case.

PUBLISHED_FROM=fd0ed683b18b3f549135c9d79eeadfc7348ab05a
2017-04-21 19:33:17 +00:00
Sergey Lyubka cd9c7dcbec Correct negative AAAA answer with NSEC RR
PUBLISHED_FROM=c7e3132d55e603f159019e3f0290e01b189e75e0
2017-04-19 12:57:45 +00:00
Deomid Ryabkov f868fc861b Enable hosts and resolv.conf lookups on UNIX only
Not relevant for other platforms

PUBLISHED_FROM=65b8959ee677555e2fb330c84d443e0a93d9fd1c
2017-04-18 22:39:24 +00:00
Deomid Ryabkov 84907d5bc4 Ignore tcp sent cb when there's no asscociated nc
TCP ACK may arrive after the we've corresponding mg_connection has already been closed.
Fixes cesanta/mongoose-os#235

PUBLISHED_FROM=8164b86131ef08c1b2a6a08630920d600b3f91ac
2017-04-18 14:38:08 +00:00
Deomid Ryabkov 1cee8a16b9 Fix mg_socket_if_get_conn_addr for UDP sockets
Remote address is not associated with an outgoing UDP socket.
Instead, it is stored in mg_connection.sa

PUBLISHED_FROM=16f82ee8a69b995d684ec96b8db6b5591cd400db
2017-04-18 12:41:54 +00:00
Deomid Ryabkov 57e32b87c7 Fix MQTT will_message length calculation
PUBLISHED_FROM=d2400f6ef4837411586fb27db0b1fa03d94283c6
2017-04-17 07:24:54 +00:00
Ruslan Valiullin 6926655513 add to cgi doc note about zombies
PUBLISHED_FROM=fb1796f11a595befd160bd5ab1088b6e39f16757
2017-04-15 06:44:43 +00:00
Ruslan Valiullin 8354319e72 websocket_chat added MG_EV_HTTP_REQUEST
PUBLISHED_FROM=6f5e1b4a97ada21025f892d3348808bffb469dfa
2017-04-14 12:57:30 +00:00
Deomid Ryabkov f9596cc1db Perform endpoint auth check on multipart requests
https://github.com/cesanta/mongoose-os/issues/229#issuecomment-293613426

PUBLISHED_FROM=1c34db7ab2598eca1db0266cc6cdd31c32a16fff
2017-04-12 16:59:49 +00:00
Deomid Ryabkov b2e2ad9a45 Fix hexdump on ESP8266, deliver MG_EV_SEND [...]
[...] after handing data off to LWIP, do not wait for ACK.
We don't do it in net_if_socket, don't do it here either.
Also prevents multiple send attempt on the same send_mbuf data.

PUBLISHED_FROM=4e5a677ebda84af1514f34299e53ce856a537883
2017-04-12 15:54:29 +00:00
Deomid Ryabkov a07fb2be51 Log DNS failures in mOS
To aid disagnosing cases like https://forum.cesanta.com/index.php?p=/discussion/397/retries-connecting-to-aws-broker

PUBLISHED_FROM=98680b594dbed42234fc53050c9df292feb32f35
2017-04-11 15:51:27 +00:00
Deomid Ryabkov 7f259f2a79 Add optional digest auth to mOS HTTP server
If http.auth_{domain,file} are configured, all HTTP requests require valid digest authorization header.
This applies to files served by mg_http_serve as well as synamic endpoints such as /update and /rpc.

mongoose-os#229

PUBLISHED_FROM=824d594147cfeb2428b463d24478b207839aa5e2
2017-04-11 10:39:45 +00:00
Deomid Ryabkov 7c0493071f Fix a typo
PUBLISHED_FROM=183a1bb571d0e2f5c23181107d30417f73c1eeb1
2017-04-11 11:22:42 +01:00
Alexander Alashkin c60fe0c6f6 Fix crash in multipart handling
Close cesanta/dev#6974

PUBLISHED_FROM=4d4e4a46eceba10aec8dacb7f8f58bd078c92307
2017-04-11 11:22:18 +01:00
Sergey Lyubka 8ce34af9f3 Clean send_mbuf in mg_if_sent_cb, fix hexdump
PUBLISHED_FROM=3d222e548a3323b957376666e6702b408843b5a3
2017-04-11 00:06:03 +00:00
Sergey Lyubka 82761bb875 Bobify format targets
PUBLISHED_FROM=2c1d372e4db856e23266c29195c07968abc2ec81
2017-04-10 22:50:30 +00:00
Deomid Ryabkov 08a10a8af5 Handle multiple MQTT messages per RECV event
PUBLISHED_FROM=fc98c51254dd94d3f443fb66e49449da7d9e754c
2017-04-10 15:51:13 +00:00
Dmitry Frank bd130136bc Commonize arg checking in cfunctions
Add `mjs_check_arg()` which checks whether argument is provided, and
checks its type. It simplifies code and makes it smaller (because
error strings are not ad-hoc, so they are not duplicated)

As part of that, also commonize type stringifying: implement
`mjs_stringify_type` and reimplement `mjs_typeof` on top of that.

Use `mjs_check_arg()` in `mjs_string_slice()` and
`mjs_string_char_code_at()`.

PUBLISHED_FROM=0b72cf479738ff405d991cbd4bf9e75edda0f111
2017-04-10 10:09:07 +00:00
Ruslan Valiullin fb04203b72 Fix eintr, zombie
PUBLISHED_FROM=f6d7d0f9c6de8ffeeb3bcd8aace6c1434281ddf7
2017-04-09 16:07:59 +00:00
Deomid Ryabkov 4172c190e5 Fix MQTT handshake; change to version 3.1.1
Differences between 3.1 and 3.1.1:
https://github.com/mqtt/mqtt.github.io/wiki/Differences-between-3.1.0-and-3.1.1

None of them are breaking.

PUBLISHED_FROM=cf2abd28deb1dabf787e07bcfdb335ff72462865
2017-04-08 07:21:01 +00:00
Deomid Ryabkov 920abd627b Minor SNTP fixes
PUBLISHED_FROM=03d04996f160f777339eec9528f2f187e1051ff9
2017-04-07 11:10:37 +00:00
Deomid Ryabkov 02b7399f9a Fix a typo
PUBLISHED_FROM=183a1bb571d0e2f5c23181107d30417f73c1eeb1
2017-04-03 14:20:16 +00:00
Alexander Alashkin b8402ed073 Fix crash in multipart handling
Close cesanta/dev#6974

PUBLISHED_FROM=4d4e4a46eceba10aec8dacb7f8f58bd078c92307
2017-04-03 09:25:12 +00:00
Deomid Ryabkov 06c5c4d2a4 Handle NULL tpcb in mg_lwip_tcp_write
This can happen if the underlying LWIP TCP PCB has been destroyed (we got tcp_error_cb).

PUBLISHED_FROM=7a060aa4ca2a0c5a818fe9bc6b08cd0733c0ef8f
2017-03-30 15:32:33 +00:00
Alexander Alashkin 57a4ec31d1 Fix MinGW compilation
PUBLISHED_FROM=66b2dee87dc50de5f2891dee789beec89c3f6fb4
2017-03-30 12:18:56 +00:00
Alexander Alashkin 511c9a6d4a Add simple mongoose/esp32 example (w/out mOS)
PUBLISHED_FROM=0e407a2fb328107540d753123fe027f43860d0ef
2017-03-29 13:53:25 +00:00
Ilia Penev 8ec47111d5 Fix COAP compilation
PUBLISHED_FROM=0a0ef6f68d743cbba91d9ba911f1c5be69e6aac7
2017-03-29 12:47:33 +00:00
Alexander Alashkin 8b67274cc0 Fix mg_get_http_var retval
PUBLISHED_FROM=257deff5ea20302627e77a0f29cf2359276a41d4
2017-03-24 13:24:37 +00:00
Dmitry Frank af22fb7a06 Include mg_mem.h into str_util
PUBLISHED_FROM=990564aa54946b2a5b52d3a9c31f80b8e93c6b44
2017-03-23 22:07:22 +00:00
David Hargat df5fff5e72 Consistent MG_MALLOC, MG_REALLOC and MG_FREE calls
PUBLISHED_FROM=e7f306b5d1a1366d3ec71fa238c5e18c03aadf8d
2017-03-23 18:54:06 +00:00
benrubson d9243d1c0b Fix MD5 disabling
PUBLISHED_FROM=bb03593fb2abfb79daa3118b786428ee3e693e3d
2017-03-21 10:50:32 +00:00
Alexander Alashkin 2fb145d39d Fix DISABLE_MD5 and DISABLE_SHA1 naming
PUBLISHED_FROM=2babde0d0c6add14aa500f4bf1c833715d979c6c
2017-03-21 10:24:11 +00:00
Yiming Sun 14094aaef7 Fix typo
PUBLISHED_FROM=56fdeaf4965ef26c398267c8656735bb52e45085
2017-03-21 08:50:43 +00:00
Alexander Alashkin ec752645ee Remove ajax_upload
PUBLISHED_FROM=599ccd99e7bf422cac5e8b1f5ccebe3cac2780e8
2017-03-21 07:35:52 +00:00
Sergey Lyubka ceb2f1da41 Update upload example
PUBLISHED_FROM=a28c1da3f0dd597792439246313ca39984ab7536
2017-03-20 17:23:38 +00:00
Alexander Alashkin aab857a66e Add ajax_upload to big_upload
PUBLISHED_FROM=7c919ba3a2afa74cec9947e78299b4bb7a64b4bc
2017-03-20 16:55:31 +00:00
Alexander Alashkin 066be0fe30 Add ajax_upload example
PUBLISHED_FROM=c5691d4321fff2e03f689b0195abd1ec6a188418
2017-03-20 10:51:24 +00:00
Alexander Alashkin 380e87ddfa Honor DNS server from DHCP
PUBLISHED_FROM=10772301ef115c31ada3521ff4235c33a421b782
2017-03-20 09:53:12 +00:00
Alexander Alashkin e9a7a2af18 Fix WinCE compilation
PUBLISHED_FROM=51d68829414739b04fafc9198d86b817c38d71d2
2017-03-17 15:19:29 +00:00
Deomid Ryabkov a83e7d8c42 Properly shut down the SSL connection
By sending close_notify

PUBLISHED_FROM=028a001cb9470a16cc7a6544805bfb042a435779
2017-03-15 23:12:57 +00:00
Dmitry Frank bf7dd7ac63 Add separate userdata for each http endpoint hdlr
PUBLISHED_FROM=29a204c2c7f35724b6f1e8435edb94869da2362c
2017-03-15 17:43:19 +00:00
Dmitry Frank 0fc3370859 First step towards separate userdata argument
PUBLISHED_FROM=93fe1cc2c5e2513509511a81e5919cbd37056b10
2017-03-15 00:52:59 +00:00
Deomid Ryabkov c416012f97 MGOS SNTP support for ESP8266 and ESP32
PUBLISHED_FROM=8e07541e7a3b951dcfd08381b46f6143773eae45
2017-03-13 17:53:35 +00:00
Deomid Ryabkov d3a8862bd8 Make interface vtables const
Frees up a bit of ram on ESP

PUBLISHED_FROM=0ea046cc63704481bca138b3096937669b94733d
2017-03-11 00:11:56 +00:00
Deomid Ryabkov 08353731ef Fix MQTT PUB{ACK,REC,REL,COMP} and UNSUBACK flags
Flags should be 0 for all of these, except PUBREL (flags = 2).

PUBLISHED_FROM=46bf63fe12020d4cb493e52ceb3bae0291484b40
2017-03-08 00:23:14 +00:00
Deomid Ryabkov 16700244b0 Fix parsing of MQTT QoS > 0 PUBLISH messages
Message ID comes after topic, not before.

PUBLISHED_FROM=1ec2a56e290b67061b18c745671dc7f089b9cc0d
2017-03-07 23:52:42 +00:00
Deomid Ryabkov 49ca223e9c Minor memory optimization
Release pbuf sooner: after copying data from, before invoking user code

PUBLISHED_FROM=b877c96ef602bbca26762b18b9dde17eb880d1f9
2017-03-07 17:19:47 +00:00
Sergey Lyubka 38efe632ae Squash warning
PUBLISHED_FROM=72d80f8ed2c10866b44d56d8133c76b22bc105b0
2017-03-06 21:51:43 +00:00
Deomid Ryabkov 39a3bb7e44 Log method and URI in mg_http_handler
PUBLISHED_FROM=34c3e49d523b0f5c7056f91e4b422f21f5694df9
2017-03-02 09:36:08 +00:00
Alexander Alashkin 920e8d9145 Add shims for mongoose file operations
PUBLISHED_FROM=b5b12cdf4273f21dbcdac9bfb6a06063152914c9
2017-03-01 10:06:47 +00:00
Alexander Alashkin aed6d05d8c Do not test reassembled buffer for WS_OP_CLOSE
PUBLISHED_FROM=0e8de208b553b63c8367f66893389587bd17359f
2017-03-01 10:06:46 +00:00
Alexander Alashkin d85d95a40b Fix potential out-of-bound
PUBLISHED_FROM=71b40189bcedbe9338915c1aad939835125dad26
2017-03-01 10:06:45 +00:00
Alexander Alashkin b5dd54a404 Fix doc typos
PUBLISHED_FROM=1bdacf793b35ebe70d0a3a9d64260dd2bd135c73
2017-03-01 06:19:58 +00:00
Yiming Sun f7c0a2ee15 Fix server_example.md
PUBLISHED_FROM=dfbfeaae983daa0412964ac0402759f632bf7aeb
2017-02-28 11:05:31 +00:00
Yiming Sun 874b5bfdbf Fix comment in mongoose.h
PUBLISHED_FROM=35e8f18aa611b45c271d0178d9197291bfa9726d
2017-02-28 10:50:21 +00:00
Yiming Sun 71d09722be Fix http_client doc
PUBLISHED_FROM=f415ddbac47e3069d3ab29467a23f6b8dab0066f
2017-02-27 20:20:33 +00:00
Dmitry Frank 349d25dccf Fix # matching logic
E.g. given the expression `foo/#`:

- `foo/bar` matches
- `foo/` should not match
- `foo` should not match

PUBLISHED_FROM=40f3290cb9a478b22d9f1ab6382884b5de70e266
2017-02-24 15:35:20 +00:00
Dmitry Frank 3942914945 Fix subscription to wildcard topics
`mg_mqtt_match_topic_expression()` and friends are public now.

So far, only `#` is supported.

PUBLISHED_FROM=20c031bcf34be84771c4a9c456318634eb9a517c
2017-02-24 14:21:33 +00:00
Dmitry Frank 60c16bbb5d Fix mos docker image name
PUBLISHED_FROM=91016ab1629a65976d2cc2f00aec4e1667cb4a8f
2017-02-23 21:35:24 +00:00
Sergey Lyubka 70b5f4130e Add http post example
PUBLISHED_FROM=94f830a5fa4b806fb2cf60c93a9e8744022ff8d7
2017-02-23 17:50:14 +00:00
Sergey Lyubka 17cfecc5c3 Mongoose examples fixes
PUBLISHED_FROM=b47a5b6987ee8d9e7c9bae2bd4d2943d2e7f76a9
2017-02-20 10:05:57 +00:00
Deomid Ryabkov ebdd18769b Add core dump and exception handling to RTOS port
PUBLISHED_FROM=dba64da598b45469c7fd458865c75d3eb6853c2d
2017-02-19 10:05:31 +00:00
Deomid Ryabkov f974fddd2a Fix ESP8266_RTOS example; add mos flashing
PUBLISHED_FROM=d87814d40f0acdc7a96fbd132c2157ccb499c7c6
2017-02-17 14:51:49 +00:00
Dmitry Frank b1a46da309 Implement Array.prototype.length
We don't have a real Array.prototype of course, just `[1,2,3].length`
behaves like we do.

PUBLISHED_FROM=456379377652cb60fc6f9521d8d358480237c58a
2017-02-17 14:51:48 +00:00
Deomid Ryabkov 81879be4be RTOS stability improvements
PUBLISHED_FROM=2992473e6c05c1dc95878cc549eccba7abcedccf
2017-02-16 16:05:22 +00:00
Deomid Ryabkov 0a094d4c1f Decouple mg_lwip_accept_cb from mg_if_accept_tcp_cb
Must be invoked on mongoose main task, not on LWIP

Also request immediate poll oif there is data to be sent and space to
send it.

PUBLISHED_FROM=53576651452d8d7193da9e63f5b97f6f8729c45b
2017-02-16 12:19:23 +00:00
Deomid Ryabkov 66a96410d4 ESP8266: Add RTOS SDK port (MGOS_ESP8266_RTOS=1)
PUBLISHED_FROM=ca5332e63700274ed9aeea9d9d1802e89fa788fa
2017-02-16 11:05:34 +00:00
Deomid Ryabkov d4b23f08b6 Implement client support for TLS-PSK
For both OpenSSL and mbedTLS

PUBLISHED_FROM=0bfd5f128b4c4c062cb6f0ca0da9b30790aa8bf8
2017-02-15 08:20:53 +00:00
Deomid Ryabkov d6d956b9d8 Do not prefix successfulresponse with "Error: "
It's confusing

PUBLISHED_FROM=9158ccd920dabf92963e76aa96a988753b9c427d
2017-02-13 15:05:11 +00:00
Deomid Ryabkov 383b2a48c5 Update logo in connected_device examples
PUBLISHED_FROM=6319df7f49dc921ddb672ba9789dfbbff8c25d9f
2017-02-13 14:05:04 +00:00
Sergey Lyubka ab1c464950 Fix https://github.com/cesanta/mongoose/issues/765
PUBLISHED_FROM=f7f8ce9421d96a5f0d90afe4c930c53662b4e907
2017-02-11 04:50:44 +00:00
Deomid Ryabkov f20b5191f2 Check UDP pbuf for being NULL
cesanta/mongoose-os#186

PUBLISHED_FROM=30460b56211eb0dff4d05bff45f256ac1da2caf4
2017-02-10 02:35:08 +00:00
Deomid Ryabkov fc113d64f5 Add mg_hexdumpf: mg_hexdump that outputs to a file
PUBLISHED_FROM=f0fe58c9f01ef0c7b491ed0e5f51b983e4119507
2017-02-09 10:33:33 +00:00
Deomid Ryabkov 6f6b12bee7 Lower verbosity of a debug message
PUBLISHED_FROM=6ff979319c31363df16cedf99b2432bd83db1473
2017-02-09 10:21:15 +00:00
Deomid Ryabkov 4e6c2867da UDP fixes: move recv callback into event loop, ...
...and fix a leak where UDP connections with SEND_AND_CLOSE set would not be closed

PUBLISHED_FROM=d60f1fc037e8e57671c7d3146fabc1f068bbb514
2017-02-09 10:21:12 +00:00
Alexander Alashkin 54989e819a Fix multipart parsing
Close cesanta/mongoose#770

PUBLISHED_FROM=ae55988f1c6ccdff172b8db405adb36c91289d95
2017-02-08 10:54:46 +00:00
Dmitry Frank bf505bb68d Update readme of nrf examples
And also fix `flash` target for nrf51

PUBLISHED_FROM=decc6242380eb7070bfbcb26c57780e756588cc3
2017-02-08 08:25:32 +00:00
Deomid Ryabkov 4072062b72 Add MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN
And set to 1024 for mOS.

PUBLISHED_FROM=ee3a66ad935cfb50355ebd7bae59c8230914878d
2017-02-08 08:25:31 +00:00
Alexander Alashkin d6ba37dc3c Correct msg len for chunked encoding
Close cesanta/dev#6485

PUBLISHED_FROM=172ab4f18f1fb3e6110ad03eea18a7f87f2e531a
2017-02-07 12:25:06 +00:00
Alexander Alashkin a58d21aa28 Add overrun protection to mg_sock_to_str
Relate to cesanta/mongoose#780

PUBLISHED_FROM=145d94c52be03ac2d909eae8166774ffd40f0df1
2017-02-07 12:25:05 +00:00
Alexander Alashkin 6e8d4129b2 Use _exit in CGI. Close cesanta/mongoose#779
PUBLISHED_FROM=bfe62d3824ee3a6e66b7d1a57ee7bad3b726649d
2017-02-07 11:09:49 +00:00
Alexander Alashkin 2485a8f8d9 Fix signs comparison. Close cesanta/mongoose#774
PUBLISHED_FROM=a875606de6f4b2c202b25ce20efcb1ca33eb75b8
2017-02-07 08:25:31 +00:00
Sergey Lyubka 1ae908f6d5 Add mqtt codec
PUBLISHED_FROM=f780559966a6a955603e05aeaa5dde8455bff991
2017-02-06 17:39:02 +00:00
Alexander Alashkin 6b923bdff1 Add stm32/cube to hwtests
PUBLISHED_FROM=478792d0479ba2154f0a65eea066f6ae6f235f84
2017-02-06 17:25:16 +00:00
Alexander Alashkin d39969d1e6 Restore links to mongoose/examples
PUBLISHED_FROM=67dc5d1ed30dc2500032be73dcdb214bd62c59d0
2017-02-06 14:09:01 +00:00
Alexander Alashkin eaef5bd133 Revert "Stop publish examples to mongoose repo"
This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2.

PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193
2017-02-06 14:08:59 +00:00
Sergey Lyubka 7cc7df8c0e Merge pull request #778 from cesanta/remove_examples
Remove examples
2017-02-03 10:23:29 +00:00
Alexander Alashkin 551f393da7 Remove examples 2017-02-03 12:17:07 +02:00
Sergey Lyubka e81f8373a2 Update mongoose docs
PUBLISHED_FROM=cfd0018a5824c5ccac532558be86c17cda64ce50
2017-02-02 14:24:49 +00:00
Sergey Lyubka dfa83f2c85 Fix TCP close sequence
PUBLISHED_FROM=ed6cf7fd63b6f80d5c37ab93899ecd09bac6102b
2017-02-01 20:26:46 +00:00
Alexander Alashkin 91bdbc5193 Fix warn in mg_lwip_if_poll
PUBLISHED_FROM=0bcb3e892e1ba2329aef5d17375fe4d3879dc666
2017-01-31 13:39:29 +00:00
Alexander Alashkin 707b9ed2d6 Remove mg_enable_multithreading. Close cesanta/dev#6511
PUBLISHED_FROM=7864ffa26cb553f5d4a93248f67c288327ec23b0
2017-01-30 13:55:49 +00:00
Alexander Alashkin cd6b846e22 Fix mongoose/mbed compilation
PUBLISHED_FROM=c754e6961fc197d3057740169f55025b305b6936
2017-01-30 13:10:47 +00:00
Alexander Alashkin 807e4ea6ec Fix STM32F4_CC3100 Mongoose example compilation
PUBLISHED_FROM=7a67a67d2f0007e241e4ccb57bc24a43ba20bfde
2017-01-30 12:09:43 +00:00
Alexander Alashkin 507e8bfac9 Drop Arduino support
PUBLISHED_FROM=85768c0d2536d9c31885a5127710b9756e3229a3
2017-01-30 09:39:15 +00:00
Deomid Ryabkov 2ea63a0ea6 Limit len of prefix; makes log tidy w/ long names
PUBLISHED_FROM=570530179da327f8bb156bbbd7c557014c1630c1
2017-01-30 09:24:48 +00:00
Deomid Ryabkov 7988acbff4 Raise log level of mbedTLS socket evs to LL_DEBUG
PUBLISHED_FROM=ed0ac4133342c733977e7884a6bbadab7ee74127
2017-01-26 12:38:30 +00:00
Alexander Alashkin b8c3740446 Map STM32 pins to MOS pins
PUBLISHED_FROM=6724de19c28f972a785b0d5e7dd4b41889e04850
2017-01-25 09:08:43 +00:00
Deomid Ryabkov 7bdbd80552 Fix ESP32 encr. OTA; clean up {open,read,close}dir
Fixed a bunch of things to make OTA work on ESP32 with flash encryption:
writes to app aprtitions must be 32-byte aligned and mod 32 in size.
When merging filesystems during update, use spiffs_vfs_* functions so
that old fs is properly decrypted.

Refactored cs_dirent stuff: SPIFFS support moved to spiffs_vfs.c,
added dirent.h on ESP8266 and CC3200 which includes cs_dirent.h
Define DIR and dirent only if asked (ESP8266, CC3200, WIN32).

PUBLISHED_FROM=58b0d05cdc41b1a9e02d341e2a1cdcb012829232
2017-01-24 12:53:35 +00:00
Alexander Alashkin 577ad2599c Enable additional services for stm32/cube
PUBLISHED_FROM=b22a136bc630b7cf4a62fd9d91b85e0e939a7f82
2017-01-18 15:10:28 +00:00
Alexander Alashkin 4d9f8168b8 Change Mongoose version to 6.7
PUBLISHED_FROM=e18f33e14f4c0e1cb004aa264dd64ca5a0056190
2017-01-17 09:08:53 +00:00
Deomid Ryabkov f1d0b451b1 ESP32: Update esp-idf
cesanta/esp-idf is rebased onto espressif/esp-idf#aece3d6fc62fd91d3c5a87e0ab2ddb5ac51d8ff0

A few wifi changes and VFS support for directory-related functions.

PUBLISHED_FROM=7823db802945122aa1b5453da8abd8e380cbf2fa
2017-01-13 00:44:47 +00:00
Dmitry Frank ac921d4657 Improve includes in the amalgamation script
Now it also tries to find the included file relatively to the "parent"
file. This is required for amalgamation of the frozen into mjs, since
`frozen.c` includes `frozen.h` instead of `frozen/frozen.h`.

PUBLISHED_FROM=8f670a1509a30cfdfb22e454b7851f4cf28fb98d
2017-01-13 00:24:43 +00:00
Alexander Alashkin f046434f3b c_hello/stm32-cube, part 2
PUBLISHED_FROM=1f767c1383c1dcd366e667681aebd41c30a102f3
2017-01-11 23:07:59 +00:00
Alexander Alashkin 58b9ee41fa Use LWIP in stm32/cube
PUBLISHED_FROM=da389ddabf96918fd1bc022e0696dbb4542c71c1
2017-01-11 12:37:44 +00:00
Alexander Alashkin d28d7a67f2 c_hello/stm32-cube, part 2
PUBLISHED_FROM=fe7230811b7f12286c5ac6de1ef8fb068cd61145
2017-01-10 18:38:24 +00:00
Deomid Ryabkov 20370e65d6 Fix parsing of SSL cipher suite specs for mbedtls
The list of cipher suites must be retained while the context is alive.

PUBLISHED_FROM=a3a82e42c1214c54ae1a40fbc49bc26bca32c053
2017-01-10 13:38:08 +00:00
Deomid Ryabkov 67626d49c9 Add ssl_cipher_suites to mg_{bind,connect}_opts
Optional specification of SSL/TLS cipher suites.

PUBLISHED_FROM=e8968c6c7a92f10514d3ee575c2fb9be862e6cf8
2017-01-09 23:53:00 +00:00
Deomid Ryabkov cd9e179fcb Format for previous commit
PUBLISHED_FROM=609ef3587e4293b0cdbf865cfc466bbb85233361
2017-01-09 17:04:03 +00:00
Deomid Ryabkov 0ba28e6153 Raise verbosity of some log messages
These are not spammy and help debug issues with serving files

PUBLISHED_FROM=84b0ee174314373d472678a14ca87f575fda6e14
2017-01-09 17:04:02 +00:00
Alexander Alashkin de791765b2 c_hello for STM32/cube, part 1
PUBLISHED_FROM=13fe18cb6c92e5dd6d9e319c35e256e2b206a110
2017-01-09 17:03:57 +00:00
Alexander Alashkin e79121acb7 Fix link in documentation
PUBLISHED_FROM=d4337a442a8f5728826eb109bdca41ca03a18d2a
2017-01-09 17:03:46 +00:00
Dmitry Frank 4bdec5c1c1 Rename mongoose-iot to mongoose-os
URLs like mongoose-iot.com are left intact

PUBLISHED_FROM=b8502b163c26a2cb54598db57ba094333fe7cf54
2017-01-09 17:03:38 +00:00
Deomid Ryabkov fa39d2f2fa Remove a dead submodule entry
PUBLISHED_FROM=0b6e19e41c12675a487cb61c4f6e0aaba0be0758
2016-12-23 15:37:41 +00:00
Deomid Ryabkov c55d06ed57 Add directory listing support ot ESP32
PUBLISHED_FROM=336d6b28d6165ece75d25911058ffdd075a3c191
2016-12-23 12:37:07 +00:00
Deomid Ryabkov 3829873552 Support MIOT app builds for ESP32
PUBLISHED_FROM=44bcbb87c326a4e05e96dc0b094fd9dd1a9d4276
2016-12-21 21:47:06 +00:00
Deomid Ryabkov 54ebcc5bd8 Minor fixes to socket support when used with LWIP
- LWIP UDP sockets are always writable and they are not reported as
   such by select() (bug? featuyre?). TCP sockets are ok.
 - Always deliver MG_EV_POLL, whether we have other fd_events or not.
   Otherwise MG_EV_POLL would not be delivered at all to perma-writable
   UDP sockets (as they are on LWIP).
 - Ignore EAGAIN/EWOULDBLOCK errors while connecting, this happens
   during SSL handshake.

PUBLISHED_FROM=3b1ee0d2b0c672512da5c9d6141aba1112983426
2016-12-21 13:06:21 +00:00
Deomid Ryabkov 7782500dbb Commonize bitbang I2C master and use it in ESP32
Until issues with hardware I2C are resolved

PUBLISHED_FROM=78bced9f18b5bfbf547de06f813bf98c82eea6ea
2016-12-20 16:05:58 +00:00
novlean 86ec6bb2f8 updated for mOS 2016-12-20 14:59:08 +00:00
Alexander Alashkin 02499d672b Build c_mqtt/stm32 - part 1, with stubs
PUBLISHED_FROM=de4b9f3e9eeafa75bb8919abacd86fb23fdefc1b
2016-12-15 14:06:50 +00:00
Alexander Alashkin 8c2e641ed7 Simplest c_hello/stm32
PUBLISHED_FROM=3a22eb96ff011ef8327cd1b78b56a3af86ba2c84
2016-12-14 16:22:16 +00:00
Dmitry Frank 29c53082eb In cs_simplelink, check if MG_NET_IF is defined
PUBLISHED_FROM=20c87885c8f778139d3df20507d6870070bcc787
2016-12-14 13:21:54 +00:00
Deomid Ryabkov 2fa988fc7b Bring up main task, start MG loop and load config
PUBLISHED_FROM=7c81ec28457cda3a503e4ab01fc8593e474df4b8
2016-12-13 17:51:33 +00:00
Alexander Alashkin 72f1d444d3 Fix miot compilation in C++ mode
PUBLISHED_FROM=42997efb3ddc462c33d2cf7e8ef0e922797d9901
2016-12-13 15:21:26 +00:00
Deomid Ryabkov 7dcc94202d SPIFFS libc integration refactoring; ESP32 support
Factor out common part of SPIFFS libc interface support from the CC3200
port and reuse it for ESP32. Minor cleanups.

PUBLISHED_FROM=19ad4049372f83046abd8eba29cfc7c2cc405671
2016-12-13 10:37:09 +00:00
Sergey Lyubka a447ae5eab MQTT parsing fix
PUBLISHED_FROM=41f43cb0e707259740de3346308f746c2a3778fd
2016-12-13 10:37:06 +00:00
Dmitry Frank 54ad1e4e47 Prepare pic32 docker image and xc32 makefile
This PR does not include `fw/platforms/pic32` since it's too dirty.

PUBLISHED_FROM=db50ba389202da80355aafe5f2c1ceeca7bffe41
2016-12-12 21:35:49 +00:00
Deomid Ryabkov 39ea91cfc2 Test building with MG_ENABLE_FILESYSTEM=0
Fix errors so it builds.

PUBLISHED_FROM=db9fc9ef997d6b1847117e8db9aefdc7e540f4cc
2016-12-09 23:35:54 +00:00
Dmitry Frank 5ebff5d15e Rename pic32_harmony -> pic32
PUBLISHED_FROM=00ca7b2adabde94a683ac4d33be1f2bdbb17772f
2016-12-09 22:06:14 +00:00
Dmitry Frank 731512a947 Define mg_file_upload_handler() only if needed
Namely, define it if only `MG_ENABLE_HTTP_STREAMING_MULTIPART` and
`MG_ENABLE_FILESYSTEM` are on

PUBLISHED_FROM=3094738a4b76ceb09a3c2374e8d9d914b71c3441
2016-12-09 16:06:17 +00:00
Alexander Alashkin 304dbca63d Fix miot-mbed errors and warning, part 3
PUBLISHED_FROM=2f6fb7ea5abdcd4ca9b06956172938ee3bc28459
2016-12-09 12:36:00 +00:00
Dmitry Frank 18ff0fafe0 Implement stringify macro
And use it for `FW_ARCHITECTURE`. This is needed because with
Microchip's xc32, `-DFOO=\"bar\"` results in `FOO` being `bar`, not
`"bar"`, so we have to stringify differently.

PUBLISHED_FROM=d0aeebb55ef9e0e92a7f750104cd6600e0d9c636
2016-12-08 22:22:24 +00:00
Alexander Alashkin 25de791424 Fix miot-mbed compilation, part 2
PUBLISHED_FROM=bd87b901b7c1c1a4f9b0f875f0b024b672121d4a
2016-12-08 19:21:53 +00:00
Alexander Alashkin 6e88c9cfd1 Fix WEAK redefinition in mbed
PUBLISHED_FROM=6abc158f198f5bd032e5ab06cc0ba3373434cdbe
2016-12-08 16:21:37 +00:00
Marko Mikulicic 9937e88985 Fix comparisons
PUBLISHED_FROM=4d86de7f73ef9d4c0f236e1fe1201e5de792f19f
2016-12-07 18:05:56 +00:00
Sergey Lyubka 57f964a139 Add mqtt last will
PUBLISHED_FROM=fb856714ead67390dfd7ce9d208ae5ae19ce7c6d
2016-12-07 17:21:56 +00:00
Dmitry Frank cbd5835112 Include sys/types.h for PIC32 port
On PIC32MZ, this is required to get `ntohl` and friends.

PUBLISHED_FROM=82ab532cd3757df6f79215f3eaca90cd87f6c965
2016-12-02 16:06:42 +00:00
Alexander Alashkin fba32acb73 Replace memcmp with strncmp in mongoose
PUBLISHED_FROM=3c5859f06ab838bba7c95c4878c4e7e883329810
2016-12-02 13:51:30 +00:00
Sergey Lyubka 2fdb1f78a2 Fix amalgamation conflicts: POC
PUBLISHED_FROM=5b63325ade34b9032476fc88ac407816990f1cfc
2016-12-01 22:21:14 +00:00
Alexander Alashkin ea2069df51 Fix coredump in mg_reverse_proxy_handler
PUBLISHED_FROM=ca0ae588290f133ef7640ca538847a63c0cb544b
2016-12-01 09:21:11 +00:00
Alexander Alashkin 7267fc757d Fix mg_stat
PUBLISHED_FROM=e6fb19c5256b6d43359f21b325e16b415152f26f
2016-11-29 13:36:55 +00:00
Alexander Alashkin ea7d69060d Replace fopen with mg_fopen
PUBLISHED_FROM=764ea806a5d31bd545a5d99de80e2ee0234ebcab
2016-11-29 13:36:54 +00:00
Alexander Alashkin 6e5e2eb694 Restore HTTP errors descriptions
PUBLISHED_FROM=26becdaf7dd61481b88b166ea87d44a7bc796660
2016-11-29 11:22:06 +00:00
Deomid Ryabkov 51466df7b9 Check for SEND_AND_CLOSE after HANDSHAKE_REQUEST
Assume handshake request was declined if either MG_F_CLOSE_IMMEDIATELY _or_ MG_F_SEND_AND_CLOSE is set.

PUBLISHED_FROM=60af32a3f8890e826205465b9add2f58b1d46e5f
2016-11-28 15:51:14 +00:00
Deomid Ryabkov d6259332d4 Fix use-after-free
Free keys and cert before conf, not after

PUBLISHED_FROM=5628f56eb6973a779179d641fb425d0f14db39cf
2016-11-28 15:21:18 +00:00
Deomid Ryabkov 260229a4d1 Free certs and keys on client TLS connections
Renegotiation is disabled, so we don't need them.
Reduces per-connection usage when idle by 3K.

PUBLISHED_FROM=24b2ac9557107f7da412dae6a42257c9b7c812d5
2016-11-28 12:05:41 +00:00
Deomid Ryabkov 7776df241c Enable server name verification on mbedTLS
PUBLISHED_FROM=54774944d5402a5d6a351b4609428940c0ad20ea
2016-11-28 08:50:42 +00:00
Deomid Ryabkov e17fdcb077 Minor memory shavings on ESP8266; ~2.5K less
- Only allow one TCP segment in flight. Each segment is 1.5K and it
   adds up. This may increase latency, but memory is precious on ESP.
   At teh same time, optimize use of tcp_output: do not send a new segment
   on every write, only call tcp_output at the end of connection
   processing during poll.

 - Build LWIP with DNS disabled. We have our won resolver, and LWIP's
   allocates large static buffers (1K).

 - mbedTLS: Deallocate peer's certificate at the end of SSL handshake,
   reduces idle SSL connection footprint by ~1.5K.

 Some tweaks to the heap log viewer (which made all the above possible).

PUBLISHED_FROM=6e84bba64eacb2d737561e09313918104921ea80
2016-11-27 17:21:29 +00:00
Deomid Ryabkov d96629cdf4 Add support for PEM certs on SimpleLink
Also performs trnasparent SPIFFS -> SLFS cert copy.

If the file's extension is .pem, convert it to DER format and put on SLFS.

PUBLISHED_FROM=364caab21969ca28a05802c4dde93a11d1e0feda
2016-11-25 19:30:05 +00:00
Dmitry Frank 0c79fcfbd0 Add a flag to prevent a tunnel from reconnection
Also fixed a memory leak on reconnect: previously, each reconnect was
creating a `struct mg_connection` which was never reclaimed

PUBLISHED_FROM=eefdcf557e032ac81d5ed3aba55ac912e400148e
2016-11-25 11:36:14 +00:00
Alexander Alashkin 9125830de6 Fix stkovf in mg_resolve_async_opt
PUBLISHED_FROM=8e37c51c6b0bf7d0782f3a997360827471b95d2e
2016-11-25 08:21:38 +00:00
Alexander Alashkin 55963d0c9a Fix typo in platforms_esp
PUBLISHED_FROM=b17ef5bc8ec801fca91c89af5f97767a55911952
2016-11-24 13:21:09 +00:00
Deomid Ryabkov 44f7b91826 Fix use of SLFS from TI libc "device" interface
PUBLISHED_FROM=e1bb89268dfc4d51880b89b07fb2f69cb49e053b
2016-11-24 12:50:52 +00:00
Deomid Ryabkov 731ea5d50d Increase debug level of stat() and open() messages
Useful for debugging at level 3

PUBLISHED_FROM=b6a4565df0de0dccf37c182c71d2f4c852f2291a
2016-11-24 10:21:58 +00:00
Alexander Alashkin 9e517fde00 Implement SNTP client
PUBLISHED_FROM=ac54bcbc81a9ee688e8b90e261172be76a9fbacd
2016-11-24 09:51:58 +00:00
Dmitry Frank 1ff61837ac Fix mg_http_common_url_parse
The only client of `mg_http_common_url_parse` (namely,
`mg_connect_http_base`) expects `port_i` to be the index in the address
string at which the port was added.

PUBLISHED_FROM=b095926b5485e4674e3c59ff8481171831fb61ae
2016-11-23 18:06:50 +00:00
Deomid Ryabkov 3a8464e4b8 Reinstate fs_slfs_rename stub
Needed by TI libc for use with add_device

PUBLISHED_FROM=ff0713c5f4d04810894d8e1a82aaac25aa101365
2016-11-23 11:07:11 +00:00
Marko Mikulicic 39b0b8e2fd Fix clang formatting
PUBLISHED_FROM=ea64670e42ae58bbe26abee5d928f2afcd83bd46
2016-11-23 08:06:09 +00:00
Sergey Lyubka 3a61186491 Ubreak v7 build - add missing includes
PUBLISHED_FROM=01d691c9e06486cab0903b8db98e56fffc3fb234
2016-11-22 16:21:38 +00:00
Deomid Ryabkov 2180e1786c Allow use of absolute paths on SLFS
If the path starts with /, do not drop it.
There are no directories on SLFS, but use of /pretend/paths/to/files.txt
is common. What we do drop is the ./ prefix (added by mongoose when document_root=.)

PUBLISHED_FROM=5108bc078dfaf8f8afa4db554b4769d9d7b8a103
2016-11-22 15:52:04 +00:00
Deomid Ryabkov 8fb5e8ef19 mbedTLS support for LWIP net_if
PUBLISHED_FROM=a733ba6e06887a448f96f92679f6f8adbe9c61f7
2016-11-22 13:21:42 +00:00
Ilia Penev a8f54d1851 Integrate PR170
PUBLISHED_FROM=f1a804466bea6d6d77103525d76ef7b819b63477
2016-11-22 08:05:55 +00:00
Deomid Ryabkov c9721d4d7f Re-enable amalgam tools publishing
PUBLISHED_FROM=f7fb01509b3f3982724cc3b05e357d8dd385a546
2016-11-21 22:36:43 +00:00
Marko Mikulicic c848372bbe Rename tools/amalgam to tools/amalgam.py
PUBLISHED_FROM=7c6cb5517d0d2b13f29af29c511dd7f0baa5acc6
2016-11-21 22:19:19 +00:00
Marko Mikulicic a23daa1547 Move mg_a*printf to common
PUBLISHED_FROM=cccd28ef43ec4e08fa52340ce78bda10db5ac27a
2016-11-18 15:36:00 +00:00
Sergey Lyubka 9dba6c806b Add endpoint to list tunnels
PUBLISHED_FROM=f45d9832a884374f6f9ea3f2e0a8c9465f214896
2016-11-18 12:21:11 +00:00
Marko Mikulicic fc635a9340 Move mg_ncasecmp and sister to common string utils
PUBLISHED_FROM=182c43c3bd82190cb816c8ebaddccc13a94950d0
2016-11-17 11:21:17 +00:00
Alexander Alashkin 81f738af3f Fix mg_http_common_url_parse
PUBLISHED_FROM=51c44c445309aa0850b227949a0a0a6be433d08c
2016-11-17 11:05:57 +00:00
Alexander Alashkin f6165d23e4 Fix stack overflow in mg_hexdump
PUBLISHED_FROM=5025692f3f4593b3ea38af51f8f49e1ac4df6b88
2016-11-16 17:36:14 +00:00
Alexander Alashkin e4a4b6f260 Fix coredump in mg_tun_destroy_client
PUBLISHED_FROM=56ff5afe805e4680e02183a8c3887ea60ee5ebfe
2016-11-16 12:21:31 +00:00
Dmitry Frank 0ceee1dc05 Rename mg_ -> miot_ under fw
`MG_ENABLE_...` macros are not yet renamed because it involves some
logic change: e.g.  instead of defining `MG_ENABLE_MQTT`, one should
define `MIOT_ENABLE_MQTT`, which should imply `MG_ENABLE_MQTT` as well.

Macro refactoring is going to be done in another PR.

PUBLISHED_FROM=f8b66d5772846126b94223a729a6bd87897f8de6
2016-11-15 14:36:10 +00:00
Alexander Alashkin 8a6cf95fad Fix mg_match_prefix
PUBLISHED_FROM=4fdfa61e7b3b62083b0ac8fe74dd2dd3793f50fe
2016-11-15 13:36:31 +00:00
Dmitry Frank 37a7031f4e Minor formatting fix
PUBLISHED_FROM=c56b4ae00c454e6931ab29b095641bf0222f860c
2016-11-15 09:51:14 +00:00
Dmitry Frank 8874f3de9d Fix simplelink SSL context
It wasn't checked for `NULL`, and on CC3200 NULL dereferencing addresses
doesn't cause a crash, so it worked by pure luck: ctx->ssl_key was 0.
After `mg_` to `miot_` refactoring it's not the case anymore (presumably
because linker arranged objects in a different order), so this bug shown
up.

PUBLISHED_FROM=0f1cc73a078c18432c68ae0f9b14dd06b3bb4279
2016-11-15 09:06:03 +00:00
Marko Mikulicic 3c5d48ea13 Promote tun example to a unit test
PUBLISHED_FROM=0454cdeec5c7120eb4bf905fdd5b7abdcb4003c2
2016-11-14 18:06:04 +00:00
Sergey Lyubka a0d98b7a39 Fix msvc6 build
PUBLISHED_FROM=196199fd02ec9b20d1e76d1414bfafa624f9ebce
2016-11-14 17:51:07 +00:00
Marko Mikulicic 74b75899d3 Make cc3200 sprintf workaround smaller
in light of the root cause discovered by rojer
and addressed in cesanta/dev#5882 for the http connection code path.

PUBLISHED_FROM=aea563150a0411cbe3fdc6f7911529f3136cc76f
2016-11-14 17:06:31 +00:00
Deomid Ryabkov 240eca0b68 Avoid passing NULL to %.*s
CC3200 (TI's C library) doesn't like it

https://e2e.ti.com/support/development_tools/compiler/f/343/t/554883

PUBLISHED_FROM=d0e9fb7ebb7d189d1a76451d609f1f1861c7a837
2016-11-14 16:20:08 +00:00
Marko Mikulicic cd54b18de3 After establishing tun, remove http proto handler
PUBLISHED_FROM=8449d4df2a4caf7afc0f9b50f85bb01d79b8c4eb
2016-11-14 16:20:04 +00:00
Deomid Ryabkov 65e01dbabc Initial support for mbedTLS
PUBLISHED_FROM=edb1063d3fd64e3c732f16b8bf101c065cdacddd
2016-11-14 16:20:02 +00:00
Deomid Ryabkov 62276ce63e Add digital signature to test key usage; 2048 bit
Digital signature key usage is required for the key to be used for (EC)DHE.

PUBLISHED_FROM=b33366d484aff2c478b2f44b85dba33d04d3a808
2016-11-14 16:20:01 +00:00
Deomid Ryabkov f67fe352cf Pull out common SSL interface
Currently only OpenSSL API impl, but the plan is to add more.

PUBLISHED_FROM=c85b26fa2312047768bdcf3eca583e60862aba90
2016-11-11 20:51:01 +00:00
Marko Mikulicic 4805797752 Fix hexdump memory overflow
PUBLISHED_FROM=a6f3f33432ce43b6d4462de623ba61a53e7f18df
2016-11-11 16:05:53 +00:00
Marko Mikulicic 4c038508f2 Extract tun proto name constant
PUBLISHED_FROM=574362ea7d90a17cd49963a430559824cfcff802
2016-11-11 10:06:02 +00:00
Marko Mikulicic 15db11c0e6 Fix tunnel teardown
PUBLISHED_FROM=2c23e4a4dfc7129da657c5935f06335fc022394a
2016-11-11 08:21:37 +00:00
Deomid Ryabkov 97fe505bb4 clang-format more stuff in common
PUBLISHED_FROM=8b5c6f70d5582402f327c4da7baee7cc15ee13aa
2016-11-10 23:50:42 +00:00
Deomid Ryabkov fd45a6d31b CS_LOG_TS_DIFF -> CS_LOG_ENABLE_TS_DIFF; ifdef->if
PUBLISHED_FROM=48c8d4326ea8a24edd8d1ca011be9e7643219084
2016-11-10 16:21:28 +00:00
Marko Mikulicic e1a9ad7f82 Overload mg_bind to bind to tunnel
PUBLISHED_FROM=f554cc63dfea12455fe5e428c6ce5f3152774f8e
2016-11-10 13:07:17 +00:00
Deomid Ryabkov 296affc6e4 Make Krypton define KR_VERSION; use it to detect
PUBLISHED_FROM=ea039cdc30aec44db074871ff6b2d2582f98b5c9
2016-11-10 11:50:56 +00:00
Marko Mikulicic 1889e12b54 Support username:pass authority in HTTP/WS urls
PUBLISHED_FROM=39a1c2a271c5cd961670e11c830105c17ba0b2e4
2016-11-10 11:21:43 +00:00
Sergey Lyubka 5e91d919e0 Make mg_register_http_endpoint work for websocket
PUBLISHED_FROM=5bf5a007929b3b6275121f3cf949526e881fb482
2016-11-09 17:21:38 +00:00
Marko Mikulicic 5934846852 Make mg_tun_bind take separate user+pass
PUBLISHED_FROM=3ee9478275c4b9253b1dd4f98a69cecc89290bce
2016-11-09 15:51:08 +00:00
Marko Mikulicic 5045dfab74 Mongoose TCP tunnel
PUBLISHED_FROM=f03b963aaec02574e47c28ee8033551440b94f2d
2016-11-09 15:05:46 +00:00
Alexander Alashkin 499a7d6a37 Fix mg_is_error
PUBLISHED_FROM=80481f8dbcb93d04eee51ecc6366949420a61f2f
2016-11-09 13:50:52 +00:00
Alexander Alashkin f72c3fa9a7 Unbreak PIC32 compilation. Close cesanta/dev#5807
PUBLISHED_FROM=cfd7de45e4357a17719501b8ab004c2edbd3e87e
2016-11-09 11:21:02 +00:00
Alexander Alashkin d0c50632cd Fixes in MQTT for AWS support
PUBLISHED_FROM=2b82f3793b3c6d0cf1266e4cc0e67930f43002c5
2016-11-09 10:05:40 +00:00
Marko Mikulicic fffb54e2c6 Implementing MG interfaces
PUBLISHED_FROM=46496c2d5340a0bbe4fe1c6c9ff187bc65d2d35f
2016-11-08 22:36:13 +00:00
Deomid Ryabkov 8bf3bd48a6 Include sys/param.h on UNIX (to get PATH_MAX)
PUBLISHED_FROM=774764f9d316e111912dae1fcaf2933141c59a60
2016-11-07 16:36:05 +00:00
Deomid Ryabkov dbe976ad3e Disable parallel builds of the Tiva example
Causes issues on Windows - looks like "parallel" makefiles
do not handle spaces in directory names properly.

PUBLISHED_FROM=5d83e737e9f81041db21fd82c32146471eac1764
2016-11-07 14:05:46 +00:00
Deomid Ryabkov 9a8a6b53ae Minor fix to the LPC example
PUBLISHED_FROM=3a99921093957c2ba9c1a0938fa00b3a29784d81
2016-11-06 02:20:43 +00:00
Dmitry Frank 84132b7b2a Add readme for nRF51 example
And pre-create directories for SDK for both nRF51 and nRF52.

PUBLISHED_FROM=00caf156f48da92804c6af8efe323535fbc5497d
2016-11-04 19:35:50 +00:00
Dmitry Frank e69a7a1b25 Enable warnings on nRF5x examples
Now all warnings are disabled on SDK files, and enabled on our
application's files.

Fixed a couple of things in nRF52 which were unnoticed because all
warnings were disabled there from the beginning.

PUBLISHED_FROM=a33ab22d0ce85efea364b80478986b88f4b0a3a2
2016-11-04 19:05:54 +00:00
Dmitry Frank 7f2bdc217a Fix nRF51 compiler flag for GCC
PUBLISHED_FROM=f8b4e8650d72c2ec5525e0510fbc8a80f8645a14
2016-11-04 18:05:42 +00:00
Dmitry Frank 76bb35d5db Adjust udp_recv callback type for nRF5x
PUBLISHED_FROM=66db56192ae710e3f865fef47593b49e0ed4f133
2016-11-04 17:35:37 +00:00
Dmitry Frank 0187f297d1 Make nRF51 example work with GCC
Unfortunately it turns out Nordic's examples were able to build with GCC
just because they suppressed all warnings; I had to do the same here
because there are some macro redefinitions of arm-none-eabi-gcc and
lwip.

TODO: resolve that and do not suppress warnings.

PUBLISHED_FROM=e65c7b0f2451f85765d958d7f67eb9262f7bc929
2016-11-04 12:20:35 +00:00
Dmitry Frank 6ff49dc196 Fix nRF51 example and add RTT support to it
Now it works in hardware.

PUBLISHED_FROM=f223bde2d2bebe97513ce073eb887552bc3d93af
2016-11-03 22:50:36 +00:00
Alexander Alashkin cd778396ff Update mg_coap_add_option doc
PUBLISHED_FROM=cded8f36e2833e7c256ba6cbca0ebf1f6012dee7
2016-11-03 17:20:55 +00:00
Marko Mikulicic 0dcb50d39c Fix doc for MG_EV_WEBSOCKET_HANDSHAKE_REQUEST
PUBLISHED_FROM=79d3bc5ba7887e2126b64d2ea804c62606264ce2
2016-11-02 23:50:36 +00:00
Deomid Ryabkov fd763846e5 TI Tiva TM4C129 support and example project
PUBLISHED_FROM=c3d59657adff247f565bf0be59192e32d5d0bbf6
2016-11-02 18:55:04 +00:00
Alexander Alashkin f4f310cf51 Add WinCE example, update Mongoose for WinCE6.0
PUBLISHED_FROM=2a76ccddb62b63caeaca3785a07d7d0b94125eaf
2016-11-02 10:11:20 +00:00
Dmitry Frank 0798b72470 Add names to mg_event_handler_t's args
PUBLISHED_FROM=3caea25dec11260561349fa096547bd62ecdb509
2016-11-01 23:25:18 +00:00
Deomid Ryabkov 39a17f8a72 Add text msgs for HTTP status codes 400 and 503
PUBLISHED_FROM=1bd3308933354e147c4e8aa375728a1ede6d8ab4
2016-11-01 18:10:46 +00:00
Deomid Ryabkov 78454da3b3 BREAKING: Set MG_F_SEND_AND_CLOSE on UDP conns
Long-lived UDP "connections" i.e. interactions that involve more
than one request and response are rare, most are transactional:
response is sent and the "connection" is closed. Or - should be.
But users (including ourselves) tend to forget about that part,
because UDP is connectionless and one does not think about
processing a UDP request as handling a connection that needs to be
closed. Thus, we begin with SEND_AND_CLOSE flag set, which should
be a reasonable default for most use cases, but it is possible to
turn it off the connection should be kept alive after processing.

PUBLISHED_FROM=1677d8024aa9afa7e18d8a04d829b699f7f2f103
2016-11-01 14:26:00 +00:00
Alexander Alashkin e62dc8f3b2 Handle MG_EV_CLOSE in examples
PUBLISHED_FROM=57c62a4123a54ecb455dbf91f3fe562fb0cf2ec2
2016-11-01 08:58:38 +00:00
Deomid Ryabkov e99088348d Use ICACHE_FLASH to guess CS_P_ESP8266
Also, do not require -DRTOS_SDK and pick socket/low-level event manager
based on LWIP_SOCKET.

PUBLISHED_FROM=d4afbdf8dab62a1c6ac4ca075c4a58887223dba4
2016-10-31 22:57:59 +00:00
Deomid Ryabkov 6a12bd7abc Wrap LOG and DBG in do { ... } while(0)
PUBLISHED_FROM=c4f3d44ed16dba60db3198b90478c1b2e6f2a5c1
2016-10-31 20:11:37 +00:00
Deomid Ryabkov b39e30fb0c Example LPCXpresso project for NXP LPC4088
PUBLISHED_FROM=ec4c4ec1ca7fee10c67fbba5a603d59fe44a046d
2016-10-31 13:02:01 +00:00
Deomid Ryabkov 92b15395a4 Add CS_P_NXP_LPC - platform def for NXP LPC MCUs
PUBLISHED_FROM=d6ed793313a98545d5a89faafc8526b658ffff66
2016-10-28 18:12:08 +00:00
Alexander Alashkin 7411ff1fca Drop load_balancer example
PUBLISHED_FROM=d823db5e8b2831201e22bbdd3188e93bbbbbbb09
2016-10-28 17:33:08 +00:00
Marko Mikulicic f2e7facbc3 Fix master build
amalgamation, ansi C and queue.h usage issue

PUBLISHED_FROM=96a2b8a90d590da0f2d9939c1d2bc7a64d1fe36a
2016-10-28 14:29:58 +00:00
Sergey Lyubka f1b4f0c463 Fix SEGFAULT in MQTT server
PUBLISHED_FROM=6455082726781aab819a7f8645e81adaa7fc7669
2016-10-28 14:12:40 +00:00
Dmitry Frank c04e3f80b9 Make mongoose compile for nRF51
PUBLISHED_FROM=6af3ed56802d2619f673c36059370440a0c06397
2016-10-28 11:08:09 +00:00
Dmitry Frank 717e872fdd Fix nRF52 Keil project file
Keil actually saves project on disk only when the project is closed,
that's why these changes were missing before

PUBLISHED_FROM=d8ebdaa009ff5676bf6c16aaa2fe8356b03d3b8b
2016-10-27 18:37:09 +00:00
Dmitry Frank dbff932d8b Improve readme for nRF example
PUBLISHED_FROM=7b02f8e7bb85ce1b45f872610645e619de5e313a
2016-10-27 18:23:53 +00:00
Deomid Ryabkov 5c9f463cab Add MG_EV_HTTP_MULTIPART_REQUEST_END
This event is sent at the end of the request

PUBLISHED_FROM=0b841a26320e3edbf73126e2ed8d286d4e5f3fa8
2016-10-27 18:09:57 +00:00
Sergey Lyubka 3a8f47befd Mqtt: parsing auth info in the connect message
PUBLISHED_FROM=017e707ea2bd7b1d1972fbb92e5d98c74e17e9d0
2016-10-27 17:53:17 +00:00
Marko Mikulicic a3e2a41834 Improve error reporting of mg_connect_http
PUBLISHED_FROM=8149fc5ab3c6f7d6ec360473f0e6847040ca820b
2016-10-27 15:22:31 +00:00
Dmitry Frank b667bd709d Specify void arguments explicitly
PUBLISHED_FROM=345ac55417a9b012e89244d36bfb9ebf8e908637
2016-10-27 12:37:38 +00:00
Marko Mikulicic a4c668e37a Expose reverse proxy API for dynamic mounts
PUBLISHED_FROM=00772400bce7c15368d91741092ebc8ab0842e19
2016-10-27 12:08:05 +00:00
Marko Mikulicic 900bbe724a Mongoose forwarding
PUBLISHED_FROM=51652f0157bb951a43508f0fe948c62c351e96ba
2016-10-26 14:52:10 +00:00
Alexander Alashkin f5a2857620 Add PIC32/Harmony http_server example
PUBLISHED_FROM=c393396605d5418fda4ff386170bb9a6d6658a93
2016-10-26 13:53:09 +00:00
Deomid Ryabkov 2ef6f7248d Remove -DNO_BSD_SOCKETS, this macro is not used
PUBLISHED_FROM=b860ada45e76b0e04d214fedb04f5a7dd9c7d8f0
2016-10-26 13:07:03 +00:00
Alexander Alashkin 06b430e57f PIC32 Harmony TCP/IP support basics
PUBLISHED_FROM=31f8f61de954fa3a36ebad162bdb730c0db95b58
2016-10-26 12:00:13 +00:00
Dmitry Frank f061dcf8b6 Make nRF5 example fit better in nRF ecosystem
By making dir hierarchy replicate that of examples provided with the nRF
IoT SDK.

Also, example for Keil uVision IDE is added.

PUBLISHED_FROM=1a3d9a54d15eb1acfb1b5d162138576a387ed21c
2016-10-26 12:00:09 +00:00
Sergey Lyubka 99377bdd30 Fix user registration flow
PUBLISHED_FROM=bac8c10063215f7f7163f607213d15a3c5f81552
2016-10-26 11:02:09 +00:00
Deomid Ryabkov c6b5343c9b Target CC3200 example to production device
PUBLISHED_FROM=623dda0737c8426754044880713c1283c4b181b6
2016-10-26 10:39:04 +00:00
Sergey Lyubka 7f4e2a93d0 Sort docs API entries alphabetically
PUBLISHED_FROM=73ef8ae768585d3c204e6e022848f49e8f4a8de2
2016-10-26 08:28:07 +00:00
Marko Mikulicic c151f9bc59 Denoisify mongoose poll logging
PUBLISHED_FROM=ec1cb82cc2404cfe2abdf3bd445ddec3d4ff3e57
2016-10-25 16:55:50 +00:00
Deomid Ryabkov 204bf9acec Krypton + LWIP fixes
* Make kr_{send,recv} report status via return code instaed of errno
 * Move mg_if_* recv and connect callback invocation out of LWIP
   callbacks: these can be nested and we don't want that to happen
   to our callbacks. Instead, we post events for the event manager to
   process during next poll.

PUBLISHED_FROM=9b3c1de796fae381dea1641807e51d7a897a398e
2016-10-25 15:30:04 +00:00
Dmitry Frank e3bac87016 Make mongoose compile with ARMCC
(It compiles, but doesn't really work yet)

PUBLISHED_FROM=0382d355a343bdab9c9eeed87229efe90c30c40b
2016-10-25 09:56:40 +00:00
Marko Mikulicic 1f09505248 Fix byte order defines under OSX
PUBLISHED_FROM=327a8d729519aa0ad953594a32d63fddac4d1ec9
2016-10-25 08:34:47 +00:00
Sergey Lyubka 7f99013179 Make backend build under win32, MSVC98
PUBLISHED_FROM=961e25e133eff8ee168557f186713d5babbd0c5f
2016-10-24 21:49:11 +00:00
Dmitry Frank 8d72c2a7b2 Add HTTP example for nRF
PUBLISHED_FROM=d9d979057d5269ac32d16545dd2489485bda642a
2016-10-24 11:13:26 +00:00
Alexander Alashkin c722cfec18 Fix c++11 mg compilation
PUBLISHED_FROM=a121a15698884203a573741e73fefaa5923dce4d
2016-10-22 14:32:00 +00:00
Alexander Alashkin 835af2cae1 Fix CoAP/CC3200 compilation
PUBLISHED_FROM=00e4c01cc2bccd63b0f18b797e2c0503a489ef6f
2016-10-21 15:57:55 +00:00
Marko Mikulicic bd2a4097b2 Bump sha pointer to latest simplelink_mbed
PUBLISHED_FROM=d0c765e56e926c2f2e57cc95dc3ffbdef93c98c3
2016-10-21 12:13:11 +00:00
Ilia Penev fcc75c6a3f Fix CoAP packet size calculation
PUBLISHED_FROM=43532ec3951779d17438b457fe6de6dea8f514fd
2016-10-21 12:13:10 +00:00
Marko Mikulicic e08b234326 ARM mbed STM32+cc3100 demo
PUBLISHED_FROM=edf899f7493b70660006fd605f0301a44cd16356
2016-10-21 10:16:47 +00:00
Marko Mikulicic 5bd3df7a0f Fix mg_time on mbed and make DNS work around epoch
PUBLISHED_FROM=c1aeef9dc25baba794b3269b44441c5bafbca5a8
2016-10-20 22:36:39 +00:00
Deomid Ryabkov 5bbf24bf41 Fix line endings in console messages
PUBLISHED_FROM=b7cf888512e535fcb81371d797bf8a72440baeaa
2016-10-20 13:36:13 +00:00
Deomid Ryabkov ace1dc53b2 Fix DHCP message
PUBLISHED_FROM=9efa7b516d0541e9f6f8002aa24cf7115f0d9b2b
2016-10-20 12:51:30 +00:00
Deomid Ryabkov 100480a1d5 Tweak NXP example project settings
- Enable parallel build
 - Generate FW in bin format

PUBLISHED_FROM=ce7d827b42f5619c58287f5c71191c54261d8de1
2016-10-20 12:22:18 +00:00
Deomid Ryabkov a89a2df603 Fix SDK_PATH
PUBLISHED_FROM=df1d2f45c0eea6e3f9b749b539c696684be74155
2016-10-20 11:45:51 +00:00
Deomid Ryabkov 988ad66a12 Add Mongoose example project for NXP Kinetis K64
PUBLISHED_FROM=c3e39efb339ed9ae45ac4bbb3bd421704ea5a143
2016-10-20 07:51:19 +00:00
Dmitry Frank 85d6292b8f Add nRF port for Mongoose
Example is not yet added

PUBLISHED_FROM=2732386091a0d4cd8d4c6e64dc16467780ec72a5
2016-10-19 19:22:15 +00:00
Sergey Lyubka 98ab0950c9 Restore Mongoose README changes
PUBLISHED_FROM=6f3ba456089f4812ac7e5e1d7456f7f36a7157bc
2016-10-19 14:38:07 +00:00
Deomid Ryabkov a7f9043072 Add MG_ENABLE_FILESYSTEM to MSP432 examples
PUBLISHED_FROM=36289eddbb3c5c172c36ab737e2f23c763058ed2
2016-10-19 13:36:17 +00:00
Deomid Ryabkov 6d8b747ff2 Add MG_ENABLE_FILESYSTEM to CCS projects
Update compiler version to 5.2.8

PUBLISHED_FROM=5e9cd9571127d980b9d4dbe78f2aefb78a4d90f5
2016-10-19 12:41:56 +00:00
Deomid Ryabkov a17eae4142 Enable MQTT client by default
PUBLISHED_FROM=cb5d5afe166f637082d4b1d1bce5d9c263e91fd0
2016-10-18 15:51:31 +00:00
Deomid Ryabkov 7b05d70042 CS_P_ESP_LWIP -> CS_P_ESP8266;add CS_P_NXP_KINETIS
LWIP part has been finally fully split from the ESP part, and ESP
platform defs reduced to bare minimum. It is now possible to use LWIP
in either low-level or socket mode without any ESP dependencies,
and NXP Kinetis platform is the first to make use of it.

PUBLISHED_FROM=4a9055897609c812296bdab5b4943ffde641ced2
2016-10-18 12:38:06 +00:00
Sergey Lyubka f328907da4 Return "status": XX for all RESTful calls
PUBLISHED_FROM=92e6e136946fd1f376e6ecbeea30f106caccaae5
2016-10-18 11:51:36 +00:00
novlean 1cea7ba487 Update README.md 2016-10-18 11:40:10 +01:00
novlean 6848452149 Update README.md 2016-10-18 11:38:36 +01:00
novlean f9a1d47f13 Update README.md
Updated with changes.
2016-10-18 11:36:25 +01:00
Deomid Ryabkov 492dcdca8d MG_DISABLE_(DNS|(_SYNC)?_RESOLVER) -> MG_ENABLE_$1
Disable sync resolver by default.

PUBLISHED_FROM=dbaed194e5fe211c07564fe6880649a1aee7f662
2016-10-17 19:21:46 +00:00
Deomid Ryabkov 4ef3a778c1 Introduce MG_NET_IF var, replaces MG_NET_IF_*
Possible values:
  MG_NET_IF_SOCKET (1) - traditional BSD socket API
  MG_NET_IF_SIMPLELINK (2) - TI's SimpleLink socket interface
  MG_NET_IF_LWIP_LOW_LEVEL - a net_if implementation that uses LWIP's
    low-level API, when LWIP_SOCKET is not available.

PUBLISHED_FROM=a5c0aebb7b6bdb1f1f4cb3210763d16f3ab5e133
2016-10-17 18:21:58 +00:00
Marko Mikulicic 31c5ef1bc3 Don't clang-format non checked out things
mbed-os is a directory that gets checked out by the mbed cli
(a tool similar in spirit to miot) and it contains a lot of
.c sources, so many of them that clang-format burns your CPU.

While we're at it, also fix check_no_ifdefs when running under a commit
hook.

PUBLISHED_FROM=e5dd457ea3c4f9bd880f2491fb322dffa7abf70a
2016-10-17 17:06:23 +00:00
Dmitry Frank 4656e7b0dd Don't access nc->ssl if SSL is disabled
PUBLISHED_FROM=bdbd9416f73f84a3d8afbffe886d0922c36769d4
2016-10-17 10:07:37 +00:00
Alexander Alashkin 4216cf2ac1 Enable FS for WinCE
PUBLISHED_FROM=ec3ed105e29251bdd9b8ad08e8e56c0873ced8ae
2016-10-17 09:22:32 +00:00
Deomid Ryabkov 37e4f51668 MG_DISABLE_SOCKETPAIR -> MG_ENABLE_BROADCAST
PUBLISHED_FROM=81b6289a4b54043df557142f0de8cc66bc5190d4
2016-10-17 04:07:06 +00:00
Deomid Ryabkov 1dae0373c8 MG_DISABLE_POPEN -> MG_ENABLE_HTTP_SSI_EXEC
PUBLISHED_FROM=55b2b70a688234f6ebcfba37eced20ee5d5387a1
2016-10-16 23:21:56 +00:00
Deomid Ryabkov e928f36456 MG_DISABLE_HTTP(|_SSI|_WEBSOCKET) -> MG_ENABLE$1
Factor out SSI and WS code from http.c

HTTP + WS are enabled by default, but MQTT is built without HTTP
support as a compilation test.

PUBLISHED_FROM=925ed9a55abb193ed7deac1c9675a0e5b35dca50
2016-10-14 17:06:19 +00:00
Alexander Alashkin fcb94a1742 Port Mongoose to WinCE, part I
PUBLISHED_FROM=292d73fa3e90377b1f929ae47ae1073dab5a4089
2016-10-14 13:37:07 +00:00
Deomid Ryabkov 8ff010ca0f MG_DISABLE_FILESYSTEM -> MG_ENABLE_FILESYSTEM
PUBLISHED_FROM=026810475d98df117ab1dadf40276759190aad19
2016-10-14 12:37:13 +00:00
Deomid Ryabkov 241090a82b CS_DISABLE_(STDIO|HEXDUMP) -> CS_ENABLE_$1
PUBLISHED_FROM=9fd0cebfa8df53b5d9574a8d013305ddda5e7a18
2016-10-14 10:22:30 +00:00
Marko Mikulicic 618bef0eb2 Fix stm32f4_cc311 example and add it to CI
The build has been broken because MQTT has been disabled during some refactoring
but never caught because this example was never built on CI.

PUBLISHED_FROM=b67051ff948f1ac89448fc707f41cdf5d48cdaaf
2016-10-14 08:37:28 +00:00
Deomid Ryabkov 3b69f5d500 MG_DISABLE_DAV -> MG_ENABLE_HTTP_WEBDAV
PUBLISHED_FROM=62267ea0a8e10d8ba7bad590d1a56b179bcffce9
2016-10-14 07:06:13 +00:00
Deomid Ryabkov b298d46a40 MG_DISABLE_MQTT -> MG_ENABLE_MQTT
PUBLISHED_FROM=34e6028b68e286f81be7ba0f8ae73b760f144131
2016-10-13 21:08:22 +00:00
Deomid Ryabkov 75059d1bdc Rename MG_DISABLE_CGI -> MG_ENABLE_CGI
Also factor out CGI-related code from http.c, it's getting too big.

Build tests with -Wundef

PUBLISHED_FROM=a1e82fafba73812c249db0b49c59d1b48417b60d
2016-10-13 19:22:50 +00:00
Deomid Ryabkov 15e9a92798 Run V7 tests with -Wundef
PUBLISHED_FROM=e2375c5b10be12a75f6a5f9df56ebe9f5faa9331
2016-10-13 19:07:34 +00:00
Deomid Ryabkov bafc30bec6 Change from using #ifdef to #if for features tests
"#if FOO" still works with simple -DFOO, but gives more flexibility.
Specifically, if user expressed no preference (FOO is not defined),
we can apply reasonable defaults (this is the legitimate use of ifdef).

In short, from now on, please use

 #if MG_ENABLE_FOO

instead of

 #ifdef MG_ENABLE_FOO

Since we are all used to #ifdef, this change also adds a precommit check
to police this. Specifically, in *.h and *.c files that are Copyright Cesanta,
"ifdef" and "if defined()" are not allowed to be used with macros that contain
ENABLE or DISABLE, unless the like also contains "ifdef-ok".

Hence, if you are sure you want to use ifdef, use this:

 #ifdef MG_ENABLE_FOO /* ifdef-ok */

PUBLISHED_FROM=9be829448f53cff575d6cae8b9945fb12531c15a
2016-10-13 18:07:25 +00:00
Alexander Alashkin 0a8f839281 Mongoose 6.6
PUBLISHED_FROM=23d031720d8d6e170eab6bd615797f33e36a6701
2016-10-12 10:06:27 +00:00
Deomid Ryabkov ab48174bac esp_mg_net_if refactoring: split LWIP & ESP parts
esp_mg_net_if was a rat's nest of mongoose net_if and event manager
implementaions and the event loop task for the ESP8266 miot port.
From that, pieces that are related to LWIP support have been pulled out,
separated into net_if and event manager files, and event loop task
has been moved under the miot esp8266 dirrectory.

This is done to facilitate LWIP code reuse. This may not be the end of
it, but it's a start.

Note: custom retransmit logic has been removed for now. Can be
reintroduced later is necessary.

PUBLISHED_FROM=fd5bbf75714583ce95776d4c76b6c5b5dc535364
2016-10-11 18:38:10 +00:00
Marko Mikulicic 4439251f17 Add MBED as platform
Currently this allows V7 to be built on MBED; more
work is likely required to port mongoose.

PUBLISHED_FROM=32cd0a38349c8e9019af46d4ce7e1429e660db25
2016-10-11 10:29:41 +00:00
Deomid Ryabkov f9a6403b11 Add MG_EV_SSI_CALL_CTX
This is the variant of MG_EV_SSI_CALL with context of the SSI call being
processed in addition to the tag argument. Specifically, call handler
now gets access to the HTTP request and the name of the file being processed.

MG_EV_SSI_CALL is preserved for backward compatibility.

PUBLISHED_FROM=eeea7487c062505abdb23b6f64994ff7a6b60ff8
2016-10-04 23:51:29 +00:00
Deomid Ryabkov 786f46c655 Update TI compiler to 5.2.8
PUBLISHED_FROM=75a0ee6e842da6c8f9e8f1eb85165b64fada0d6a
2016-10-03 15:06:53 +00:00
Sergey Lyubka 5ebd9fe7a5 uart-to-websocket page content changes
PUBLISHED_FROM=e8db78b70a80ef63f1f6090b1ad5d16315e8f8c9
2016-10-03 15:06:52 +00:00
Deomid Ryabkov 2302ae5e88 Update TI compiler to 5.2.8
PUBLISHED_FROM=75a0ee6e842da6c8f9e8f1eb85165b64fada0d6a
2016-10-03 15:06:16 +00:00
Deomid Ryabkov 8b12263dbc Fix mg_http_send_redirect doc
PUBLISHED_FROM=77cd3df9959b0e3a2550d1581586e69878bbee0d
2016-09-30 13:06:39 +00:00
Alexander Alashkin 376d2666a5 Add PIC32MX/CC3100 mqtt_client example
PUBLISHED_FROM=cda885a9dc5d1203b7b59b13ea7fd7934b31260a
2016-09-30 12:39:35 +00:00
Deomid Ryabkov d90622630f Link MIOT for Linux statically
PUBLISHED_FROM=4f0adab828ebf06dbc3e0c4333bf0053f374b62f
2016-09-30 12:39:32 +00:00
Alexander Alashkin da447b1067 Add PIC32MX/CC3100 mqtt_client example
PUBLISHED_FROM=cda885a9dc5d1203b7b59b13ea7fd7934b31260a
2016-09-30 12:37:08 +00:00
Deomid Ryabkov 460d95afc5 Add mg_http_send_redirect and make examples use it
PUBLISHED_FROM=f45e06aeba1c00212078d539b6f74cb8bd054326
2016-09-30 11:22:00 +00:00
Alexander Alashkin 8f522048d8 Use gethostbyname for localhost
PUBLISHED_FROM=97c58e8624e0d4fa0f043acf6b20e2a1a5ca1b51
2016-09-30 06:50:52 +00:00
Deomid Ryabkov 147c095105 Report errors in the netcat example
PUBLISHED_FROM=f43dc48512ff13028a57571b537c41d9658034b5
2016-09-29 12:05:53 +00:00
Alexander Alashkin fecb11f2fa Add CoAP server example doc. Closes cesanta/dev#4917
PUBLISHED_FROM=ee7728db61721c0628a00ed702a47f7382ad7cd7
2016-09-29 11:50:59 +00:00
Alexander Alashkin 56e50c2dbe Add CoAP client example doc
PUBLISHED_FROM=51fd5cd50ae8c9fce43d95d06fec2e7582018d00
2016-09-29 11:05:59 +00:00
Deomid Ryabkov c1b5e9b260 Rename MSP432 example project
So they are distinct from CC3200 projects during import

Also update compiler version (5.2.7 -> 5.2.8)

PUBLISHED_FROM=23834212eb51ad068579726a2870e8e6ae87ab9c
2016-09-28 12:51:35 +00:00
Marko Mikulicic 286fa90ee9 Simple mDNS + DNS-SD impl
Main TODOs:
1. the spec requires the impl to resend the reply once and
   to send gratuitous updates

2. advertise our clubby services as DNS-SD sub-services.

---

Tested with:

1. https://play.google.com/store/apps/details?id=com.grokkt.android.bonjour&hl=en
2. https://play.google.com/store/apps/details?id=com.druk.bonjour.browser&hl=en
3. osx `dns-sd`

Works well enough; it doesn't have some glitches due the fact that we
don't retransmit yet and we don't send gratuitous updates.

PUBLISHED_FROM=38d7a50beb274d4aeeda5b0b58e44dfa0789da84
2016-09-28 08:51:47 +00:00
Deomid Ryabkov d63fb70c69 Publish the amalgamation tools
PUBLISHED_FROM=27ed0bd32e33252495b92361d2943a3450448f62
2016-09-27 15:36:56 +00:00
Deomid Ryabkov 4d76a3be4c Amalgamation changes - clean up paths
Make paths embedded in amalgamated files nice and relative.
This facilitates subsequent clean un- and re-amalgamation.

PUBLISHED_FROM=d83e6000617c54ceaeb78b80c25814996043fe66
2016-09-27 05:06:32 +00:00
Dmitry Frank d9c612ef2b Fix miot serial communication on Windows
PUBLISHED_FROM=426ff040865ea9626ba62bcbca3aa84fb40fd3ea
2016-09-26 20:21:42 +00:00
Sergey Lyubka 3b3ca1c1b3 Update README.md 2016-09-26 15:46:44 +01:00
Alexander Alashkin 2e748fdbf1 Fix handles leak in CGI
PUBLISHED_FROM=6052b7bfec6af33328cbe369da60e9672ebac437
2016-09-23 15:06:46 +00:00
Deomid Ryabkov 6c99691d1c Add build target for leenoox (using docker)
PUBLISHED_FROM=46a7902a727e0ba34c3dbbe5ee04d5119afbaaff
2016-09-23 15:06:45 +00:00
Alexander Alashkin fd067c8077 Fix handles leak in CGI
PUBLISHED_FROM=6052b7bfec6af33328cbe369da60e9672ebac437
2016-09-23 15:06:02 +00:00
Marko Mikulicic 04012760d1 Add small multicast server demo for mongoose
PUBLISHED_FROM=c5f6b0c64bc1e43030743b6aae5d06ae231df5dc
2016-09-23 10:21:37 +00:00
Alexander Alashkin 0ec1a141f1 Fix mg_http_parse_headers
PUBLISHED_FROM=7e88f60283d499732e8df663814067849d9567bb
2016-09-23 10:21:36 +00:00
Deomid Ryabkov 7414a4fb06 Stop pretending that sl_* API is BSD-compatible
PUBLISHED_FROM=355fea9a5a75ac926d4c64d41828ebcd96c04080
2016-09-22 19:51:06 +00:00
Deomid Ryabkov abbd44e276 Fix WS handshake nonce generation
PUBLISHED_FROM=ae8d436db9aee9aec7b5ac1cbee6bc4e32d8c6cf
2016-09-22 16:05:38 +00:00
Sergey Lyubka 13e80e6bd5 Add HTTP examples for MIOT
PUBLISHED_FROM=a7ca2e0b705390b32bf2bac44aaaf60c6fcc8522
2016-09-22 14:21:11 +00:00
Deomid Ryabkov ffa981d172 Update CC3200 sensor demo example
PUBLISHED_FROM=9e29cac6a7d4b632b7f4a3ab0fe5411368ad0f5a
2016-09-16 21:20:56 +00:00
Deomid Ryabkov 806f07db67 Fix MG_hello project build
PUBLISHED_FROM=450e5c045b6515fba0e0614c6d76a58712c72160
2016-09-15 13:36:09 +00:00
Alexander Alashkin 6746933a3d Fix Windows compilation
PUBLISHED_FROM=04bcd98025263f32d337730cf179bdfc35b683f1
2016-09-15 12:21:53 +00:00
Dmitry Frank 8cb2833fa7 Implement miot dev call
PUBLISHED_FROM=40d62ce03a4f739b458076395941e4ad7c932fb3
2016-09-15 12:21:52 +00:00
Alexander Alashkin 1730f3c0c9 Fix Windows compilation
PUBLISHED_FROM=04bcd98025263f32d337730cf179bdfc35b683f1
2016-09-15 12:21:21 +00:00
Sergey Lyubka d6dda04f4f Update mg_mgr docstring
PUBLISHED_FROM=da57dfe52e315dc1901d761289f0445be6e93cea
2016-09-13 11:37:47 +00:00
Artem Bulavin 1b0825ef4b Docs deployment via docs/make_doc
PUBLISHED_FROM=da5f7f80a9876ac4f1889a1176a3048f47980659
2016-09-13 11:37:46 +00:00
Sergey Lyubka 7249b2bd5f Update mg_mgr docstring
PUBLISHED_FROM=da57dfe52e315dc1901d761289f0445be6e93cea
2016-09-13 11:36:17 +00:00
Alexander Alashkin 238bf1a29e Fix MSVC2015 warnings in mongoose
PUBLISHED_FROM=9e2d5c45d112b9e9493d995b12fe989e93d66d5b
2016-09-13 08:51:20 +00:00
Alexander Alashkin 4cbf81da59 Use user timeout in multithreading polling
PUBLISHED_FROM=dbf75bfba087f1b0aa0531e5003ba3e69ed1a6ab
2016-09-12 14:21:05 +00:00
Alexander Alashkin d9b7ec18e7 Add MG_F_ENABLE_BROADCAST option
PUBLISHED_FROM=293a54ab09e6879b6f0c36975a137eeaeff92098
2016-09-12 12:36:56 +00:00
Alexander Alashkin ffed9c4d8c Copy flags for accepted connection
PUBLISHED_FROM=4787d59fdc9f4da525ddfae46e5203d06a596ef4
2016-09-12 10:51:11 +00:00
Sergey Lyubka 0dc0c5a0e0 Add WebSocket support to the netcat example
PUBLISHED_FROM=c494ab910d0b1b98ea6ea4024450c60d0abff01d
2016-09-09 22:29:34 +00:00
Dmitry Frank 57f826ece1 Implement miot cloud group add, list, delete
PUBLISHED_FROM=4b6f7b6fb4559e085c93f5f8827b8fae1701de70
2016-09-09 22:29:33 +00:00
Sergey Lyubka 729bdebc50 Add WebSocket support to the netcat example
PUBLISHED_FROM=c494ab910d0b1b98ea6ea4024450c60d0abff01d
2016-09-09 22:20:58 +00:00
Dmitry Frank 2a541175b5 Use void arguments list consistently in C code
On my way, fixed a couple of cases where we had `()` in the header, and
non-empty argument list in the source file.

PUBLISHED_FROM=5519526cf84e2bbd425a726fcc112fea1a95cbf1
2016-09-05 15:51:19 +00:00
Alexander Alashkin 5f93f7162f Add STM32F4/CC3100 example & Co
PUBLISHED_FROM=7f805d89dcb795c9b3ee637ef1dbdcfcf3323469
2016-09-05 15:06:21 +00:00
Sergey Lyubka 3640554503 Add DNS server example
PUBLISHED_FROM=0d71533fd475c152c29fe304ca95559512a6059d
2016-09-02 21:06:16 +00:00
Sergey Lyubka 12437fd7fe Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
2016-09-01 14:35:02 +00:00
Deomid Ryabkov 4120f953c7 Report bind error in simplest_web_server_ssl
PUBLISHED_FROM=73e7ed5dd69cbca00ad6f67125915fbfb296770b
2016-08-31 12:30:22 +00:00
Deomid Ryabkov 844c7787f9 Ignore SL_EAGAIN
It was observed that sl_Send can return SL_EAGAIN, despite the fact that
we only call write_to_socket if it was reported as writeable.

PUBLISHED_FROM=e4cbacb3f16bb7abb479222d7dcbfbe113a39161
2016-08-29 18:20:54 +00:00
Deomid Ryabkov 0fe9ec1499 C Clubby refactoring
Complete rewrite of the C Clubby implementation: it is now modeled after
the Go implementation, with a slight difference that codec and channel
are the same object (something we should probably do in Go as well, as
we only have a single type of channel so far, which is used with all
types of codecs).

This implementation also comes with a new external API,
which is hopefully cleaner and easier to use (see mg_clubby.h).

In this PR I am not adding any new types of channels, but a UART channel
as well as websocket listener channel will be added after this lands.

PUBLISHED_FROM=d545d4bb6434e2a02ad159f9e4b64e594a4797e7
2016-08-29 11:20:54 +00:00
Sergey Lyubka b3fb21dacc Add DLL building example
PUBLISHED_FROM=20d24793d766ee289c6bde95bd5ad01202cd614b
2016-08-26 09:21:09 +00:00
Alexander Alashkin 2deaf084e4 Fix clang -std=c99 compilation
PUBLISHED_FROM=fc3f24d40f92f206e5de4a2fd15100430db87717
2016-08-24 12:50:59 +00:00
Deomid Ryabkov 1b324510cc Add simplest_web_server_ssl example
PUBLISHED_FROM=8945dc72ce22d48c582e7cdd01348494677ac5bb
2016-08-22 22:20:45 +00:00
Artem Bulavin fd839f1827 Pointer to int casting warning
PUBLISHED_FROM=6bf2a710edaae6133d68eaf900ede14bba75ad5a
2016-08-19 09:05:55 +00:00
Alexander Alashkin f149f4aab1 Remove cs_dbg.h from amalgamated headers
PUBLISHED_FROM=993c4b1bec363e3f7975b83710e694792bedf5b3
2016-08-18 14:06:18 +00:00
Marko Mikulicic af6fc64ab9 Add restart flag to ourci workers
PUBLISHED_FROM=f85aaf2215f8323866eab9fb5143407b44fa1959
2016-08-16 17:21:03 +00:00
Artem Bulavin ff159bf30a Simple mongoose http urls crawler
PUBLISHED_FROM=4eead54610606827963e7c244fcd8ab9a13d4c07
2016-08-16 14:36:11 +00:00
Alexander Alashkin 8cdd19bcae Call MG_EV_ACCEPT on spawn
PUBLISHED_FROM=f1b4ce4334d24bf613db88ccb28cb3668390ce1d
2016-08-16 09:36:05 +00:00
Alexander Alashkin 2efc859829 Fix mt
PUBLISHED_FROM=6e33f546c4d096ef03103f6010124e5d568700b0
2016-08-15 16:21:14 +00:00
Alexander Alashkin d4a8351464 Remove port :5000 from docker.cesanta in Makefiles
PUBLISHED_FROM=b2454104b99100f23db0777f874ab8a33727acca
2016-08-12 15:36:30 +00:00
Deomid Ryabkov 5fa544fc78 Make mg_http_serve_file public
A way to serve a single, specific file as opposed to the hairy monster
that is mg_serve_http.

PUBLISHED_FROM=6ed1bc487b9d41d212a5907337182f23b040aecf
2016-08-09 10:51:02 +00:00
Deomid Ryabkov 1070dd2d87 Fix overrun in url rewrites, add tests
PUBLISHED_FROM=03dc62aa69dddcbe41d5bc5c014de248332da918
2016-08-09 10:06:12 +00:00
Deomid Ryabkov af98854ce4 Delete old cookie_auth example
PUBLISHED_FROM=c118b2796f697e8d5493bb3d534cee7406060c1a
2016-08-08 14:06:05 +00:00
Deomid Ryabkov 7cace648c0 Improve cookie auth example
Use templated index page and SSI calls instead of hard-coded html

PUBLISHED_FROM=eade9dfe283952ed5465cd0ff1924f61a14dea0c
2016-08-08 11:28:52 +00:00
Deomid Ryabkov 447bf4adb0 Compile examples with -Werror
PUBLISHED_FROM=5a24bda9029db3fc7bf04dc871656d65d551f4ab
2016-08-08 10:36:19 +00:00
Deomid Ryabkov 6572c1c692 Add a cookie auth and session management example
PUBLISHED_FROM=243437cf7d48b04aef3896bc4c5d4010975299a4
2016-08-08 10:36:19 +00:00
Dmitry Frank 7b48859f8d Fix mongoose comment a little
PUBLISHED_FROM=542e7c82fa494bef52222495301ab53dce43cd8f
2016-08-04 19:51:10 +00:00
Marko Mikulicic a6230bafe7 Make unamalgamated build work with bazel
PUBLISHED_FROM=c6756bc74e6c25e4c120024e3ee2e3406068ad92
2016-07-30 02:21:16 +00:00
Deomid Ryabkov cc8f1466c7 Turn on func. sections + dead section elimination
In CCS example projects

PUBLISHED_FROM=b3ab112f74ae475cb93bf06fdb7db811bbb99a59
2016-07-27 20:36:15 +00:00
Deomid Ryabkov 69f810febc Remove debug that slipped into prod code
PUBLISHED_FROM=7bacb1af60e85e4ed56a600fa3d1dbba1679db59
2016-07-26 18:39:48 +00:00
Dmitry Frank e5da7440d7 Bring back JS precompilation to CC3200
We haven't actually _fixed_ evaluation of precompiled bcode from
non-mmapped memory: we just never free it. For sane use case (do not
evaluate the same file more than once) it should be acceptable.

PUBLISHED_FROM=a9ca2d8fa72e9c40c93415d060ee8db697caa225
2016-07-26 15:36:00 +00:00
Dmitry Frank 849ec1684a Apply Mongoose docs edits by Ev
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
2016-07-26 15:06:04 +00:00
Alexander Alashkin 4f210cd8eb Fix error messages and more
PUBLISHED_FROM=11c57fc5ece01686e9cecab5e3bfce54a2825836
2016-07-25 17:21:23 +00:00
Evelyn 285f75764c Update mg_match_prefix.md 2016-07-25 17:37:20 +01:00
Evelyn 3586203753 Update mg_next_comma_list_entry.md 2016-07-25 17:36:46 +01:00
Alexander Alashkin e406de7e00 Remove extra error message
PUBLISHED_FROM=8b7fcfc1bc32ff9ff38e2904ddb730c83bf9fae4
2016-07-25 16:36:18 +00:00
Evelyn 53ed8502c9 Update mg_is_big_endian.md 2016-07-25 17:35:41 +01:00
Evelyn ac8c756879 Update mg_avprintf.md 2016-07-25 17:35:27 +01:00
Evelyn 07faacdaf9 Update mg_hexdump_connection.md 2016-07-25 17:34:35 +01:00
Evelyn 8464844518 Update mg_hexdump.md 2016-07-25 17:34:03 +01:00
Evelyn fe2d1ff027 Update mg_sock_addr_to_str.md 2016-07-25 17:33:17 +01:00
Evelyn 8d129e359e Update mg_conn_addr_to_str.md 2016-07-25 17:33:03 +01:00
Evelyn 39aa56457b Update mg_start_thread.md 2016-07-25 17:32:22 +01:00
Evelyn 8491d5da8b Update mg_open.md 2016-07-25 17:31:57 +01:00
Evelyn 681196e2c8 Update mg_fopen.md 2016-07-25 17:31:43 +01:00
Evelyn 836ad5ebab Update mg_stat.md 2016-07-25 17:31:28 +01:00
Evelyn a3ea1eddfb Update mg_base64_decode.md 2016-07-25 17:30:59 +01:00
Evelyn a2c06ac6ba Update mg_skip.md 2016-07-25 17:30:04 +01:00
Evelyn a5c697fa2d Update mg_coap_parse.md 2016-07-25 17:28:59 +01:00
Evelyn be199b4fe9 Update mg_coap_send_ack.md 2016-07-25 17:28:05 +01:00
Evelyn cc15320cfe Update mg_coap_send_message.md 2016-07-25 17:27:50 +01:00
Evelyn 70bae59ec6 Update mg_coap_free_options.md 2016-07-25 17:27:31 +01:00
Evelyn d4f3361805 Update mg_coap_add_option.md 2016-07-25 17:26:59 +01:00
Evelyn 332c855d40 Update mg_set_protocol_coap.md 2016-07-25 17:26:43 +01:00
Evelyn 01e3fa4d13 Update mg_mqtt_next.md 2016-07-25 17:26:26 +01:00
Evelyn 15a0f7a00a Update mg_mqtt_broker.md 2016-07-25 17:26:05 +01:00
Evelyn a751adba2a Update mg_mqtt_broker_init.md 2016-07-25 17:25:21 +01:00
Evelyn 10eed010df Update mg_mqtt_next_subscribe_topic.md 2016-07-25 17:25:00 +01:00
Evelyn 033ca26216 Update mg_mqtt_pong.md 2016-07-25 17:24:19 +01:00
Evelyn 40793cbdce Update mg_mqtt_ping.md 2016-07-25 17:24:10 +01:00
Evelyn 48a1b2ec75 Update mg_mqtt_unsuback.md 2016-07-25 17:24:03 +01:00
Evelyn 1a55556c66 Update mg_mqtt_suback.md 2016-07-25 17:23:53 +01:00
Evelyn 3edd3ccbe6 Update mg_mqtt_pubcomp.md 2016-07-25 17:23:39 +01:00
Evelyn 194933e037 Update mg_mqtt_pubrel.md 2016-07-25 17:23:30 +01:00
Evelyn 38deaedaef Update mg_mqtt_pubrec.md 2016-07-25 17:23:15 +01:00
Evelyn fc3dd5900c Update mg_mqtt_puback.md 2016-07-25 17:23:06 +01:00
Evelyn b1213425d0 Update mg_mqtt_connack.md 2016-07-25 17:22:53 +01:00
Evelyn 40f0b450a8 Update mg_mqtt_disconnect.md 2016-07-25 17:22:43 +01:00
Evelyn 0bab3977a8 Update mg_mqtt_unsubscribe.md 2016-07-25 17:22:35 +01:00
Evelyn 2c46760b77 Update mg_mqtt_subscribe.md 2016-07-25 17:22:22 +01:00
Evelyn 878c9ae5ae Update mg_mqtt_publish.md 2016-07-25 17:22:11 +01:00
Evelyn c8553de09e Update mg_send_mqtt_handshake_opt.md 2016-07-25 17:22:02 +01:00
Evelyn 6738858e11 Update mg_send_mqtt_handshake.md 2016-07-25 17:21:52 +01:00
Evelyn 61cd6ab86e Update mg_set_protocol_mqtt.md 2016-07-25 17:21:43 +01:00
Evelyn 77704b669a Update mg_dns_send_reply.md 2016-07-25 17:21:22 +01:00
Evelyn 770be613d7 Update mg_dns_reply_record.md 2016-07-25 17:20:33 +01:00
Evelyn 9790366449 Update mg_dns_create_reply.md 2016-07-25 17:19:44 +01:00
Evelyn 89f0a8c530 Update mg_set_protocol_dns.md 2016-07-25 17:18:19 +01:00
Evelyn f72a06e25a Update mg_dns_uncompress_name.md 2016-07-25 17:17:35 +01:00
Evelyn 8b975533e5 Update mg_dns_encode_record.md 2016-07-25 17:15:49 +01:00
Evelyn b32f7a9b57 Update mg_dns_copy_questions.md 2016-07-25 17:14:48 +01:00
Evelyn e1e0083897 Update mg_dns_insert_header.md 2016-07-25 17:14:27 +01:00
Evelyn ca08ac0e3c Update mg_send_dns_query.md 2016-07-25 17:14:13 +01:00
Evelyn a5b85b4462 Update mg_dns_parse_record_data.md 2016-07-25 17:14:03 +01:00
Deomid Ryabkov 3feab3a16d No-JS mode refactoring
Now JS is controlled with a make variable as opposed to a proproc define.

This allows skipping compiling a whole bunch of files when JS is
disabled, e.g. whole freezing step on ESP, or compiling v7.c on CC3200
which takes a while only to be discarded in its entirety later.

Var name is SJ_ENABLE_JS (note change from disable logic to enable to be in line with other stuff). Default is 1, meaning JS is enabled.

Also changed clubby knob in the same way: SJ_ENABLE_CLUBBY, default is 1 as well.

PUBLISHED_FROM=105277e9536e423d6363a51ff9acea9550a9c496
2016-07-25 15:06:00 +00:00
Evelyn 5d76e57b81 Update mg_set_protocol_http_websocket.md 2016-07-25 15:08:27 +01:00
Alexander Alashkin 9101cd0339 Use lld for ID
PUBLISHED_FROM=1246247fc29eb9a75b986ff7bb2d2350a52c03fc
2016-07-22 16:26:31 +00:00
Evelyn 4b2d3f5f5b Update mg_http_check_digest_auth.md 2016-07-22 16:23:52 +01:00
Evelyn 482a471abb Update mg_file_upload_handler.md 2016-07-22 16:23:16 +01:00
Evelyn 4d90bb0d02 Update mg_register_http_endpoint.md 2016-07-22 16:22:15 +01:00
Evelyn 202dfc18be Update mg_serve_http.md 2016-07-22 16:21:47 +01:00
Evelyn 13f4742699 Update mg_connect_http_opt.md 2016-07-22 16:21:30 +01:00
Evelyn 33e769bd75 Update mg_connect_http.md 2016-07-22 16:20:58 +01:00
Evelyn 992f3000ef Update mg_http_create_digest_auth_header.md 2016-07-22 16:20:04 +01:00
Evelyn 7ea4adae5e Update mg_url_decode.md 2016-07-22 16:19:38 +01:00
Evelyn 5ed9991135 Update mg_get_http_var.md 2016-07-22 16:18:42 +01:00
Evelyn dc2527c11f Update mg_parse_multipart.md 2016-07-22 16:17:58 +01:00
Evelyn bee95654f3 Update mg_http_parse_header.md 2016-07-22 16:17:08 +01:00
Evelyn 48296bb1cf Update mg_get_http_header.md 2016-07-22 16:16:21 +01:00
Evelyn 1ee9735354 Update mg_parse_http.md 2016-07-22 16:16:00 +01:00
Evelyn f8da303ca1 Update mg_printf_html_escape.md 2016-07-22 16:15:26 +01:00
Evelyn 6ae6ee9fd2 Update mg_send_head.md 2016-07-22 16:15:01 +01:00
Evelyn a11eafc5b3 Update mg_send_response_line.md 2016-07-22 16:13:59 +01:00
Evelyn efe53b57e4 Update mg_printf_http_chunk.md 2016-07-22 16:13:38 +01:00
Evelyn e2330944d4 Update mg_send_http_chunk.md 2016-07-22 16:13:20 +01:00
Evelyn 1c18906db7 Update mg_printf_websocket_frame.md 2016-07-22 16:12:07 +01:00
Evelyn 873ceb48bd Update mg_send_websocket_framev.md 2016-07-22 16:11:32 +01:00
Evelyn a48b955d89 Update mg_send_websocket_frame.md 2016-07-22 16:11:11 +01:00
Evelyn b92fae2bfb Update mg_connect_ws_opt.md 2016-07-22 16:10:30 +01:00
Evelyn 156be17191 Update mg_connect_ws_opt.md 2016-07-22 16:10:12 +01:00
Evelyn 92290cfe81 Update mg_connect_ws.md 2016-07-22 16:09:47 +01:00
Evelyn 29725c97f1 Update mg_send_websocket_handshake2.md 2016-07-22 16:08:59 +01:00
Evelyn 56b9cd14cb Update mg_send_websocket_handshake.md 2016-07-22 16:07:44 +01:00
Evelyn 3550cc8f48 Update mg_set_protocol_http_websocket.md 2016-07-22 16:03:38 +01:00
Deomid Ryabkov 6a3d01ee6b Depend on v7.c properly
PUBLISHED_FROM=cf49d0d345e4a7607c535f9578b8ed4160f2fccd
2016-07-22 14:31:13 +00:00
Evelyn 27986213aa Update mg_check_ip_acl.md 2016-07-22 15:23:11 +01:00
Evelyn a2d07ef983 Update mg_check_ip_acl.md 2016-07-22 15:13:59 +01:00
Evelyn 3cf4e32d9f Update mg_event_handler_t.md 2016-07-22 15:06:40 +01:00
Evelyn a54584b716 Update mg_set_timer.md 2016-07-22 15:06:00 +01:00
Evelyn 51907e2642 Update mg_enable_javascript.md 2016-07-22 15:04:58 +01:00
Evelyn 5dd9d37ef2 Update mg_enable_multithreading.md 2016-07-22 15:04:01 +01:00
Evelyn f900854e0d Update mg_socketpair.md 2016-07-22 14:54:30 +01:00
Evelyn d20e94f763 Update mg_printf.md 2016-07-22 14:53:54 +01:00
Evelyn 58de2ad2d7 Update mg_send.md 2016-07-22 14:53:28 +01:00
Evelyn f30c7b75d0 Update mg_set_ssl.md 2016-07-22 14:52:31 +01:00
Evelyn c5b8e55e12 Update mg_connect_opt.md 2016-07-22 14:48:10 +01:00
Evelyn 559874fce7 Update mg_connect.md 2016-07-22 14:41:40 +01:00
Evelyn 1875653b34 Update mg_bind_opt.md 2016-07-22 14:41:23 +01:00
Evelyn 6df770e72d Update mg_bind.md 2016-07-22 14:39:26 +01:00
Evelyn 51d415c8dd Update mg_add_sock_opt.md 2016-07-22 14:38:44 +01:00
Evelyn 63bf428c34 Update mg_add_sock.md 2016-07-22 14:37:21 +01:00
Evelyn a5d2772082 Update mg_next.md 2016-07-22 14:36:53 +01:00
Evelyn 43c317ef4c Update mg_broadcast.md 2016-07-22 14:36:13 +01:00
Evelyn 01ffdb69d0 Update mg_mgr_poll.md 2016-07-22 14:35:08 +01:00
Evelyn a78f346ac6 Update mg_mgr_free.md 2016-07-22 14:34:04 +01:00
Evelyn 4ae88c859e Update mg_mgr_init.md 2016-07-22 14:33:30 +01:00
Marko Mikulicic e8a97f12d7 Skip C build if not changed - step 1
Note: this is only the first step; the C sources won't be built until
the second step is done.

The actual build takes about 1.3s on cloud2 which still runs the docker
containers and image layers on the very slow spinning disk. cloud3 has
docker mounted on the SSD disk; measured speedups of 20-30%

PUBLISHED_FROM=c5acef1d64ebc8dca8ed31f51685c8b3090c5767
2016-07-22 12:51:18 +00:00
Evelyn 06aabdefbe Update mg_mgr_init.md 2016-07-22 13:48:35 +01:00
Deomid Ryabkov 15643f8e67 Use rand() instead of random(), it's more standard
Remove the random() stubs from the codebase

PUBLISHED_FROM=0f56ec7dffa0af1f5061a17d8801239d6f0e32a5
2016-07-22 11:06:16 +00:00
Deomid Ryabkov b987df1974 Refactor sys_config and ro_vars
Use the same config mechanism for ro_vars as for sys_config, get rid of a bunch of custom code.

PUBLISHED_FROM=d2be76cb97090669dd6a21e95d0ba821eaa1a313
2016-07-21 16:35:59 +00:00
Deomid Ryabkov cbe63d43df Prevent repeated invocation of Clubby handler
PUBLISHED_FROM=de348f944de60d116d9d1f5d18e920991c811fa8
2016-07-21 15:22:36 +00:00
Marko Mikulicic e91a7c9599 Reamalgam after .h edits
PUBLISHED_FROM=da1faa9b46cd0ff22dcba6d324b5847c4a0d42d8
2016-07-21 15:06:41 +00:00
Sergey Lyubka 3054952a5e Add %T to the API ref
PUBLISHED_FROM=f6679ea960b3aa0bc9142515548835ee0f78af67
2016-07-21 14:36:12 +00:00
Artem Bulavin 3244df9cd1 Added UI response on authentication, fixed non-clickable buttons
PUBLISHED_FROM=a4666982707fcc96cfe6e75903cab9ac225351e4
2016-07-21 14:07:13 +00:00
Dmitry Frank 1f75081f6e Add build option V7_NO_COMPILER
Which disables tokenizer, parser, AST, and compiler. On ESP8266, it
frees 21K of ROM.

PUBLISHED_FROM=ff4c53ace6b9056c595b9e12ef3453330d659775
2016-07-21 13:51:54 +00:00
Marko Mikulicic 2c83a50a8a Document %.*Q
PUBLISHED_FROM=5dc567f8978d5414835f7a2338a78ae9eb683f55
2016-07-21 13:38:48 +00:00
Deomid Ryabkov 1c80fc28ee Destroy net interface before invoking MG_EV_CLOSE
So that socket/connection/whatever is really closed by the time user code is run.

Speed up test_http_endpoints by using appropriate wait conditions.

PUBLISHED_FROM=5fc8a772cc2a9c3b8c9dbddde9f99b41ce4d334c
2016-07-20 14:52:12 +00:00
Sergey Lyubka 810eab9a58 Add SSI doc string
PUBLISHED_FROM=73540bf103672916eae35959d5e992a3616a6604
2016-07-20 11:07:37 +00:00
Deomid Ryabkov 256aa0296d Fix compilation for non-MGIOT projects
That don't have CONSOLE_UART defined

PUBLISHED_FROM=7930bb639baf81cff8ce53c6f81e9739668aae08
2016-07-15 13:34:59 +00:00
Deomid Ryabkov 2eb506c5e0 Make console output in SLFS adapter overrideable
PUBLISHED_FROM=455184fbe730cf62340046c73ffd8ae4b0e0a2c1
2016-07-15 13:19:51 +00:00
Deomid Ryabkov 9f78a2902b Fix SSL stuff
Do not use CA bundle on CC3200, it doesn't work.
Make ssl_ca_cert = "*" mean "no verification" and make sure
SSL is enabled on the connection when it's required, even w/o verification.

PUBLISHED_FROM=c8710a5d24ecfe174ef45b7f81c114d41faf5c12
2016-07-14 13:19:55 +00:00
Deomid Ryabkov 613ae4ee34 Fix led toggline in CC3200 sensor demo
PUBLISHED_FROM=10369c7903f3c9433e8c9f6f9725f014aed5768d
2016-07-13 20:04:48 +00:00
Deomid Ryabkov ab208b71c4 Do not define rename() when compiling with TI libc
PUBLISHED_FROM=e9878fc5d55b0b2da854573a7a84e8e14e2f301d
2016-07-13 19:49:47 +00:00
Alexander Alashkin 68dd8d277d Get rid of ubjson
PUBLISHED_FROM=e6f1dca95ec7ed3795adf493cca9cdcdc07381f5
2016-07-12 20:49:59 +00:00
Deomid Ryabkov 36a1927915 Mongoose 6.5
PUBLISHED_FROM=d151a5a0bf34b135a7a2c879f5a6bd5676af275a
2016-07-12 13:20:04 +00:00
Deomid Ryabkov 68437de416 Fix handling of socket write errors
PUBLISHED_FROM=7264edfb3b8e4e37f15f2993f479dfe0a9550b1d
2016-07-12 11:04:59 +00:00
Deomid Ryabkov 459cd1b095 Properly override rename on Newlib
Newlib implements rename as _link and _unlink, not _rename.
There is no _link on either SLFS or SPIFFS, so override rename directly.

PUBLISHED_FROM=ebb54664f8a3c8664ecab1fac021bef286a0e230
2016-07-11 16:49:56 +00:00
rojer 6f7f774080 Merge pull request #678 from tbfly/master
!): Fix for compile error in Android.
2016-07-08 16:51:53 +01:00
Deomid Ryabkov fc0bf1953a Fix and improve sorting on Mongoose index pages
Remember sorting settings in url fragment, reverse order on repeated
header click.

PUBLISHED_FROM=faa033eddc86d0aafc12a86aea4145646ea2c89c
2016-07-07 15:49:59 +00:00
Deomid Ryabkov c907e6c5fb Commonize mg_str
PUBLISHED_FROM=0e6a1c1a2356c1e12580e498c64ba7be367f601c
2016-07-06 23:49:57 +00:00
Deomid Ryabkov 29b3950ee7 Handle SimpleLink restarts in Mongoose
SimpleLink restart invalidates all sockets.
Listeners are restarted, outgoing connections are closed.

PUBLISHED_FROM=15567dfb822bffbd44d39ba0e69a7ac64fd7a1c8
2016-07-06 13:56:50 +00:00
Deomid Ryabkov 0e0c6b8357 Fix off-by one
cesanta/mongoose#677

PUBLISHED_FROM=4b62bdefac08fa3bedf511dc4d6f7463af3325fc
2016-07-06 13:56:48 +00:00
Sergey Lyubka 6f17f3e2c2 Add timers example to mongoose
PUBLISHED_FROM=1599cf1d06c8f177918cbcf574c28c9e93d56d39
2016-07-06 13:56:47 +00:00
Lu ZhiHe df107a272e !): Fix for compile error in Android. 2016-07-06 14:50:08 +08:00
Sergey Lyubka b7a0748312 Ditch JSON-RPC from mongoose
PUBLISHED_FROM=89b978c02be2f10eb930ff13673d45249fd67763
2016-07-01 11:35:18 +00:00
Alexander Alashkin 421b420a0c Fix mp+keepalive combination
PUBLISHED_FROM=dbfcfa91ad85d6447726d0d7e9fe15709f4c4646
2016-06-29 23:12:25 +03:00
Sergey Lyubka a478dc5935 Remove old mongoose logo
PUBLISHED_FROM=2dd69a5db6ca56215726b563e1551c683f21a768
2016-06-28 16:05:04 +00:00
Deomid Ryabkov 4d65cb1c0f Make Mongoose's SHA1 algo pluggable
PUBLISHED_FROM=bdaeed6628ffb544e31d7fd59475f3a2e78c2967
2016-06-28 10:05:31 +00:00
Deomid Ryabkov ced823cd95 Add a radio button to teh settins_panel example
PUBLISHED_FROM=2daba7380508df24d909f922c5009286b4d8e7cf
2016-06-28 09:27:44 +00:00
Deomid Ryabkov 79325bd219 Lower verbosity of a message
PUBLISHED_FROM=3b4cbc497c4a0eee2d46f561c0717415ca85c242
2016-06-27 10:50:32 +00:00
Deomid Ryabkov 5a19135c35 Ignore SL_ENOPROTOOPT w/ DOMAIN_NAME_VERIFICATION
Domain name verification feature was added in NWP service pack
(reported version: 2.6.0.5). Older versions do not support it.
There's not much we can do about it, so we just ignore the error.

PUBLISHED_FROM=9495250de1945aae4f2bdf7dddcd7bf1248e24c2
2016-06-24 13:35:33 +00:00
Deomid Ryabkov 290e5f83d4 Switch to TI compiler + UMM malloc for CC3200
Frees up ~19KB RAM:

Before:
  Code size: 210616
  RAM at startup: 48636 total, 34472 free
  RAM after sys init: 15024 free

After:
  Code size: 195784
  RAM at startup: 65096 total, 52980 free
  RAM after sys init: 34116 free

PUBLISHED_FROM=32a9cb8fb6d75cf428bc3548dd5684ce6e52c508
2016-06-22 19:05:07 +00:00
Deomid Ryabkov b535cb319a Ensure asprintf'd string is NUL-terminated
PUBLISHED_FROM=b4062780d22be37acdbecd86e5951245e2908ff8
2016-06-22 16:20:15 +00:00
Deomid Ryabkov e3a9c6afb4 Mass-fix header guards
PUBLISHED_FROM=7e5fc4da88069a6193d911660f522b43ed1a5d40
2016-06-20 10:50:01 +00:00
rojer 3f1a33e4b4 Handle errors better in listening code for CC3200
PUBLISHED_FROM=9d4ab680fa672690735b827f56e135330f72beed
2016-06-15 13:35:00 +00:00
rojer 441eaa7f6c Handle errors better in listening code for CC3200
PUBLISHED_FROM=9d4ab680fa672690735b827f56e135330f72beed
2016-06-15 14:32:44 +01:00
rojer 632153a1b4 Fix FNC CLI logging
PUBLISHED_FROM=171b25e15cad2c87eb40a8123fe8ea07e34c41f7
2016-06-15 14:32:36 +01:00
Sergey Lyubka f9d0ad9dc3 Do not leak in mg_connect_ws_opt()
PUBLISHED_FROM=e6de3b3747a1cd79c3930c2640fadc8356ffed61
2016-06-15 12:05:00 +00:00
rojer a67323fc12 Change main code image filename in CC3200 bundles
/sys/mcuimg.bin is just another file on SLFS, no reason to give it
special treatment. Preserve backward compatibility with old bundles:
translate sys_mcuimg.bin -> /sys/mcuimg.bin

PUBLISHED_FROM=be89a3d9785046f09279fef9e2bb6604eeaa576e
2016-06-13 15:04:54 +00:00
rojer 1daa5e69b1 Add timestamp to LB log
PUBLISHED_FROM=61b87fcee909241d5bdf2ba7407003c0c3cfbd72
2016-06-13 12:34:30 +00:00
Sergey Lyubka 1718490982 Simplify Contributions section in readmes
PUBLISHED_FROM=3a14579dabba4088e54350945dc17fd6ebb0d700
2016-06-10 12:34:41 +00:00
rojer 1d4f97bb4c SimpleLink net_if impl w/ async support; MG_F_SSL
SimpleLink sockets are suffciently different from BSD that all the
ifdefs have become too messy to warrant a separate net_if
implementation. As part of this we also implement proper async connect
support.

Added MG_F_SSL to identify SSL-enabled connections in a generic way,
since SSL state can be different depending on the implementation.

PUBLISHED_FROM=9cdb8c880b90683e4a26b972cf439d47d6f60917
2016-06-09 17:49:53 +00:00
rojer 183fc7ced9 clang-format *ALL* the things!
PUBLISHED_FROM=faf0beb7545eb426c941fc366b6f87667723eb4c
2016-06-09 11:19:57 +00:00
rojer dcf1cedec9 SimpleLink SSL support; split cert and key opts
SL requires cert and key to be separate files in DER format.

Date verification is disabled for now.

PUBLISHED_FROM=7d76150ed356140728a1e5fd82d8a0456347b7dc
2016-06-09 11:04:56 +00:00
Marko Mikulicic 845e608280 Clean docs while publishing
PUBLISHED_FROM=274a19d6988002fb029e614bffea4083002324a1
2016-06-07 20:40:26 +00:00
rojer d6ecfe7f24 Make error message more clear
PUBLISHED_FROM=f8e052f1a256f671de133135901b509d39608a82
2016-06-07 20:40:25 +00:00
rojer 06b6bf6185 Propagate nc->err to err on CC3200
PUBLISHED_FROM=db7254b5bf25961a700cbce954ef02d41b176500
2016-06-07 16:43:24 +02:00
rojer 04a38b446f Fix compilation with MG_DISABLE_HTTP_WEBSOCKET
Make restful_server and netcat examples compilation tests:
 - netcat doesn't use HTTP, compile it with MG_DISABLE_HTTP
 - restful_server doesn't use websocket, compile it with
   MG_DISABLE_HTTP_WEBSOCKET

h/t @labourcier, cesanta/mongoose#665

PUBLISHED_FROM=4494ac3cbd81e8314beb557ab301b4b44c4afb89
2016-06-07 16:43:24 +02:00
Deomid Ryabkov dfde5785a6 Use fw_meta script from the build image
PUBLISHED_FROM=996721b6d28ee25fcfcb514d716552c4afa238e1
2016-06-02 22:28:48 +01:00
Deomid Ryabkov 1a61455eef Magic numbers are magic
PUBLISHED_FROM=cec68bab53fc81b4085b81fba0c52e0c42b09f0f
2016-05-31 15:36:25 +01:00
Sergey Lyubka 9f2ecb0144 Minor rephrasing in Mongoose overview doc
PUBLISHED_FROM=1562c629ce08004a5243a61eed79e1c3161f1268
2016-05-30 11:17:41 +01:00
Sergey Lyubka 3265060dc8 Add Mongoose overview doc section
PUBLISHED_FROM=9fb2260cd76ae30b51db02053f4d2debf4cdf900
2016-05-30 11:17:40 +01:00
Alexander Alashkin 58b8acd68a Check malloc results, Contribute to cesanta/dev#3726
PUBLISHED_FROM=309be4a56754250406dd48f1abd30b68776f5c7e
2016-05-28 19:06:09 +01:00
Sergey Lyubka 3ec09ceedf Reference media files in doc directly
PUBLISHED_FROM=da22d5ea0aa366d7cb9bba838f8e173ae0178f5e
2016-05-28 19:00:05 +01:00
Sergey Lyubka 1ce4aa81ee Simplify doc generation infra
PUBLISHED_FROM=80e77fda1c358294f251ca77d3dd64e8ca9160e5
2016-05-28 19:00:04 +01:00
Dmitry Frank 177e829f4b Add v7 arg to _mk_ and _get_ functions
`v7_mk_undefined()` and `v7_mk_null()` are left unchanged, but marked
deprecated, and `V7_UNDEFINED` and `V7_NULL` are public now.

Xtensa code size with instrumentation: 590400 -> 590432, i.e. 32 bytes.
Xtensa code size without instrumentation: 530848 -> 531760, i.e. 912
bytes.

As objdump reveals, inside v7.c, `v7_mk_number` and others are inlined,
so the extra v7 argument is eliminated; outside of v7.c it's obviously
not inlined.

----

Also, v7_get_int() is added, which currently just casts stored double
value to int

PUBLISHED_FROM=e984b7308faf2380b3de388f238e0fae0aea545d
2016-05-28 18:59:27 +01:00
Marko Mikulicic b5b672ec89 Implement MQTT connect username/password
PUBLISHED_FROM=be604dc6b3650c78daaa02ea4db8cd067069b5e1
2016-05-18 12:07:20 +03:00
Deomid Ryabkov d41419c8d3 Update the CC3200 build image
* Add TI compiler
 * Remove cc3200prog, we don't use it
 * Update to Xenial (new Ubuntu stable release).
   It has ARM toolchain in the repos too, which is nice (no more PPA).

PUBLISHED_FROM=57d6650b438c5665023346abefbc953263e3f87b
2016-05-16 13:57:14 +03:00
Deomid Ryabkov 5e4d9dc17a Restore REMOTE_ADDR and SERVER_PORT CGI env vars
cesanta/mongoose#573

PUBLISHED_FROM=687722f0dbc3c49e6691e01e0d0b1ab2d181bd2f
2016-05-16 13:57:14 +03:00
Sergey Lyubka 4ac688e560 Make mg_http_check_digest_auth() public
PUBLISHED_FROM=f00b94cabc2a89d27d5bc78d68d67db0930811b4
2016-05-16 13:57:13 +03:00
Deomid Ryabkov 5d0a5cfe72 Add CPP guards to net_if.h
cesanta/mongoose#653

PUBLISHED_FROM=a676dbce6d04b78ca316a4601e9cbb676ecc88d2
2016-05-15 22:07:14 +03:00
Dmitry Frank d4b81bb911 Refactor v7_to_number -> v7_get_double and others
We wanted to avoid `to` since it implies some kind of conversion, but
these functions merely return underlying C entity.

Public API changes:

- `v7_to_number()` -> `v7_get_double()`
- `v7_to_boolean()` -> `v7_get_bool()`
- `v7_to_cstring()` -> `v7_get_cstring()`
- `v7_get_string_data()` -> `v7_get_string()`
- `v7_to_foreign()` -> `v7_get_ptr()`

Private API changes:

- `v7_to_pointer()` -> `get_ptr()`
- `v7_to_generic_object()` -> `get_generic_object_struct()`
- `v7_to_object()` -> `get_object_struct()`
- `to_js_function()` -> `get_js_function_struct()`
- `to_cfunction()` -> `get_cfunction_ptr()`

PUBLISHED_FROM=036ac18d442c1128106292ad3e7a818b177eec6a
2016-05-15 22:07:13 +03:00
Dmitry Frank 23122b327c Remove old docs, rename docs_new to docs
It would be probably good idea to also remove tools/docgen.py and
asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which
may contain some useful info which we'll need at least to review before
removing.

PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
2016-05-15 22:07:04 +03:00
Marko Mikulicic f443c64341 Temporarily disable appdash from docker-compose
Until I read the doc and find how to limit the retention,
otherwise it just eats all my ram and cpu and things start to fall
apart.

PUBLISHED_FROM=eb33fb44736f07b992270689217aca4af70513ff
2016-05-15 22:07:04 +03:00
Marko Mikulicic c84af7d1e2 Use stdint.h on MSVC >= 2012
Closes cesanta/mongoose#659

PUBLISHED_FROM=8a2e029715e5e7f9a2c75eea9b55270c51b273ef
2016-05-11 19:30:38 +02:00
Sergey Lyubka 19a28b3c81 Update cs_md5 description according to reality
PUBLISHED_FROM=b9c776bac4c8f2456c71b33641601fb38b30347e
2016-05-03 14:17:15 +02:00
Sergey Lyubka 69944c1d3a Add cookie auth example to Mongoose
PUBLISHED_FROM=88bc5059504cfedd078cab277a6d68d1e583fba1
2016-05-03 13:13:08 +01:00
Deomid Ryabkov 81bf4921d4 Compile mg-iot-cc3200 with ARM compiler, step 1
Code size: 167144 vs 199440

More changes to come (console support, warnings cleanup).

PUBLISHED_FROM=cbc06efcb354c240654518b493496a69293ebc2a
2016-05-03 13:13:04 +01:00
Deomid Ryabkov 91f6eedb24 Remove the definition of UNUSED
It's barely used in our code and conflicts with ont in SimpleLink SDK

PUBLISHED_FROM=ef0fc468d32c9a8e0df888c2de084c08ebe92ea7
2016-05-03 13:13:03 +01:00
Alexander Alashkin dae150a3a5 Split HTTP HWTest
PUBLISHED_FROM=69dc2fadfa0aad32290bd676331b57d0b5595c60
2016-05-03 13:13:00 +01:00
Deomid Ryabkov 8a81dce0c1 Handle orderly shutdown of remote sockets
When getting a EOF from remote, do not close immediately, drain the send
buffer.

PUBLISHED_FROM=e06cdaa2abc0d67d5d88bf3e72d887590a7aeccf
2016-04-29 15:16:46 +01:00
Deomid Ryabkov 203d4a79e2 Improved handling of sockets > FD_SETSIZE
PUBLISHED_FROM=0bf765bf2248d43514643f335592a77d5875618e
2016-04-29 15:16:45 +01:00
Deomid Ryabkov b04d47c3a9 Update README for CC3200 examples
PUBLISHED_FROM=53ce21efbb0e769089293b1aa11d2b2f3136161d
2016-04-28 13:51:20 +01:00
Marko Mikulicic 8fcd1906a2 Minor cleanup after line numbers feature
PUBLISHED_FROM=302ebfe7d711602e75c8db4bc843b0d52a382542
2016-04-28 13:51:19 +01:00
Marko Mikulicic 9939212379 Add c linkage guard to simplelink header
Closes cesanta/mongoose#649

PUBLISHED_FROM=deb804a1257f8a6ecc4bf0f877b70c32f1d39e43
2016-04-28 12:19:27 +02:00
Deomid Ryabkov 38752f1327 Add C decls to TI platform headers
h/t @kzyapkov, cesanta/mongoose#649

PUBLISHED_FROM=c21158c9476b9a4abd281ec99c7fa62ea5e708b8
2016-04-28 11:59:45 +02:00
Alexander Alashkin 6b51ec3371 Reaggange HWTests, move port(s) number to cfg
PUBLISHED_FROM=274bff744d9c3d12285f026d21c1c776946fae20
2016-04-28 11:59:44 +02:00
Deomid Ryabkov 5714056f9f Update websocket_chat, add websocket_chat_client
A number of people asked for a WebSocket client example,
websocket_chat_client is one.

PUBLISHED_FROM=c33e758c0a36a0aa919bdb6ef37ed1478d6b29e2
2016-04-27 17:48:40 +01:00
Deomid Ryabkov 21665e367c Auto-disable CGI if socketpair is disabled
h/t @danielinux, cesanta/mongoose#652

PUBLISHED_FROM=68c9a86280d63d01b6e4cb72aa6cfd766e4d4be3
2016-04-26 21:02:18 +01:00
Deomid Ryabkov dff844b40a Fix Mongoose forum link
It used to link to the SJS forum category, but should point to Mongoose
category instead.

PUBLISHED_FROM=288e1bf1969c46619360dcd8dfd039cdcbc7a59c
2016-04-26 13:30:09 +01:00
Deomid Ryabkov 54403dfcbc cesanta/iot -> cesanta/mongoose-iot
PUBLISHED_FROM=d73a6fff78a063ffe5aaafe841e89e87e37f85d7
2016-04-26 13:30:05 +01:00
Deomid Ryabkov 61672c7805 Properly handle keep-alive connections
HTTP/1.1 connections are keep-alive by default,
HTTP/1.0 are KA only if explicitly requested.

PUBLISHED_FROM=cb2070c2d4e4be6beeab4ae5914b8a01b04bc0cb
2016-04-26 13:30:03 +01:00
Deomid Ryabkov 69bb96113b Add a bit of branding to our responses
Server header and directory index footer

PUBLISHED_FROM=85ced96f70a0241a2970be7613994a3af7238ba9
2016-04-26 13:30:03 +01:00
Marko Mikulicic 51328efb22 Fix srcfs after rename of SJS to IOT
PUBLISHED_FROM=cf8cb1dd2319eafdf6b45a1299e4b12d4808a17c
2016-04-26 13:30:00 +01:00
Evelyn f159666ae3 Update README.md 2016-04-26 11:17:11 +01:00
Deomid Ryabkov 7fdb50807c Resolve *dir function decl conflict on Win32
We used to declare these functions twice: in plaform_windows.h
and cs_dirent.h. Removed decl from platform_windows.h and moved
cs_dirent.h to be privately included by mongoose.c

PUBLISHED_FROM=ab62370409e29e3c62a8b8eab0f75795b5d7ed0f
2016-04-22 16:19:18 +01:00
Marko Mikulicic 890c7b42dc Bulk rename of SJS to FW
PUBLISHED_FROM=03d2fa0b6bf762d09bf5e837cf31e2047bb6eefd
2016-04-22 16:19:17 +01:00
Deomid Ryabkov 55398684cc Ignore "non-errors" when sending
h/t @f00bard

PUBLISHED_FROM=5deab05502797bb6393e8dbbd5684aba4a72a799
2016-04-22 14:23:49 +01:00
Maxim Ignatenko c85edc38aa Switch to MySQL everywhere
PUBLISHED_FROM=1ab69ecfbd03ad3eef82ef785474744e5b5b2e4d
2016-04-22 14:23:40 +01:00
Deomid Ryabkov fa368b56ba Enable compiler optimizations on TI CCS examples
PUBLISHED_FROM=43169a199299bfe4ce349ad9d13f29d77d39ff3b
2016-04-22 12:32:43 +02:00
Deomid Ryabkov 41d7520585 Suppress a TI compiler warning
PUBLISHED_FROM=63810a48861c6e2b3e3eb8bab981927f6f85dd40
2016-04-22 12:32:32 +02:00
Alexander Alashkin 0f23618324 Disable http test
PUBLISHED_FROM=688b64acb8c87e3cd78c79ee2b7667378d697cd8
2016-04-22 12:32:22 +02:00
Deomid Ryabkov bf9a2b45ef SLFS file size hint
PUBLISHED_FROM=532200881406349585612ea5d59aaa323789a688
2016-04-19 17:44:26 +01:00
Deomid Ryabkov 063c017bb7 Update MG_sensor_demo description
PUBLISHED_FROM=7f9ce495d5de71859ad71f2b44db37fa66736835
2016-04-19 17:44:24 +01:00
Deomid Ryabkov 7519a3765b Minot tweaks to MG_sensor_demo
Fix WS connect address
Only update graphs when connected

PUBLISHED_FROM=3a3c4e2d21595f48c811b45fb391f7709dc0bcf7
2016-04-19 13:16:28 +01:00
Alexander Alashkin 56c687b39b Check for null in DNS handler
PUBLISHED_FROM=e8b719d491688032e6395b75d5859ffad7d7ea23
2016-04-19 12:27:49 +01:00
Deomid Ryabkov 083d398631 Only copy questions when creating reply
In particular, there may be additional records which should not be copied

PUBLISHED_FROM=6b348868cb62d7b3fc4df0e935ffd5a31a314a08
2016-04-19 12:27:48 +01:00
Sergey Lyubka 466183113f CC3200 Mongoose example fancy graphs
PUBLISHED_FROM=bb28c3e27228d7c1c95899445b7f450636c34949
2016-04-19 12:27:48 +01:00
Deomid Ryabkov 923c432977 Add C++ externs to common headers
Closes cesanta/mongoose#649

PUBLISHED_FROM=7d331576ba8f75a7a4ebf833e056dc22f6eda811
2016-04-18 16:06:58 +01:00
Deomid Ryabkov e433ba8d7b Clarify debug message a bit
PUBLISHED_FROM=c4f72d1b47508cdc560ec345064ecdfc3b529f5a
2016-04-18 16:06:55 +01:00
Deomid Ryabkov 848c884fff Make sure NWP is stopped before sl_Start
In SDK 1.2.0 TI decided to stop resetting NWP before sl_Start, which in
practice means that sl_start will hang on subsequent runs after the first.

See this post for details and suggested solution:

https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/p/499123/1806610#1806610

However, since they don't provide OS_debug variant of simplelink.a and
adding another project dependency will complicate our demo even more,
we just take the required bit of code.

PUBLISHED_FROM=c729c0fcbb240aa90a716edd43888de5881d6731
2016-04-16 10:32:42 +01:00
Marko Mikulicic 0769bbb7ff Fix mingw warnings
PUBLISHED_FROM=a7c1ec51999b29758d2983900add70069927b27b
2016-04-16 10:32:40 +01:00
Marko Mikulicic 7054b09584 Use invalid socket
Socket type is unsigned int on windows.

PUBLISHED_FROM=fb406d7542ea4d7a529f87b8a3a5a8ba27f5f934
2016-04-15 14:48:25 +01:00
Deomid Ryabkov 2633628ad1 Add MG_hello for CC3200; upload file form
Mg_hello is a simpler example for CC3200
File upload form is served on / if index.html does not exist
and always available on /upload

PUBLISHED_FROM=f844245b26febc4b952e7c52ee4519ddb542072d
2016-04-15 14:48:24 +01:00
Marko Mikulicic e5ae1c2ea3 Fix SJS websocket constructor
Closes cesanta/smart.js#119

PUBLISHED_FROM=b912e99d457dbf21b3f8ccc6a51d0990cc3db833
2016-04-15 14:48:17 +01:00
Marko Mikulicic d2844580a1 Fix mongoose examples krypton build
And add the build to the CI.

PUBLISHED_FROM=b9becbc113e569d7a0e6dcdfd2c34ce704a681bd
2016-04-13 19:19:31 +02:00
Sergey Lyubka 42f5a3e2f7 Use cesanta GA code
PUBLISHED_FROM=197c9c874ea950aae8f3fd475d2a3ff836d0caab
2016-04-13 19:19:27 +02:00
Deomid Ryabkov 8a62005a2d Use _stati64 on mingw64 in 32-bit mode
cesanta/mongoose#644, h/t @spuschhof

PUBLISHED_FROM=2df259156e347b941a75008ce07ea4fc2584dc2a
2016-04-13 12:33:52 +01:00
Sergey Lyubka 616f54c4a2 Better marketing teaser
PUBLISHED_FROM=68b1498bba92e6c23e8d8b2628d22b3bf0524be6
2016-04-13 12:33:50 +01:00
Deomid Ryabkov 2140e5992a Mongoose 6.4
PUBLISHED_FROM=5585ece71e9032b1357ea47fa8de626c52405650
2016-04-12 14:21:12 +01:00
Sergey Lyubka cd38c62430 Fix docs link. Better description
PUBLISHED_FROM=e8dbca39825b461ee671c85540fab1100ee5e4d1
2016-04-12 14:21:08 +01:00
Deomid Ryabkov 67ac6ae191 Fix parsing truncated DNS records
PUBLISHED_FROM=8b849b5dfd72bb3055df34113ec74e47c620af2e
2016-04-12 14:21:06 +01:00
Alexander Alashkin 7addae0fdd Unbreak master again
PUBLISHED_FROM=192978ebdb0df77c32af8675118c0067f093c0e7
2016-04-12 14:21:05 +01:00
Sergey Lyubka a3e8ba5506 Direct link to Mongoose binary
PUBLISHED_FROM=b0dc34c2ee8c9d3dbdabfaac2eb5ce28b3be9f13
2016-04-12 12:37:05 +01:00
Marko Mikulicic 6a302c38ab Fix ourci master port
It conflicted with Workspace service

PUBLISHED_FROM=bd891e246bfa4b8f47bcbc6c9f7e4401f5f6e052
2016-04-12 12:36:58 +01:00
Deomid Ryabkov 129bb6b1c3 Add MSP432 lib and example
PUBLISHED_FROM=57ff02457269938feae805f2972b96b15931d41a
2016-04-12 11:18:37 +01:00
Deomid Ryabkov c8b09c2238 Move mg_task to SimpleLink platform code
It'll be used for MSP432 as well

PUBLISHED_FROM=cb5dcda4cc5d9edc6dea71540d51ab00e252186e
2016-04-12 11:18:37 +01:00
Deomid Ryabkov 76364af243 Fix comment format in http.h
Functions decl must follow comment to be correctly documented

PUBLISHED_FROM=6ab035cda470c2c23240db4435abd8c241c71b0d
2016-04-11 10:56:06 +01:00
Alexander Alashkin 0efa8f9d3f Add UDP echo server Mongoose example
PUBLISHED_FROM=c0ea72104da23a97c81c9f671c9b91d9df2541d1
2016-04-11 09:43:08 +01:00
Deomid Ryabkov f36b452f00 MSP432 port, step 1
Doesn't actually work yet, but bits common with CC3200 (SimpleLink) are
moved out.

PUBLISHED_FROM=9d9a51cf7d8262694199c46bfd0ac514fc88889e
2016-04-11 09:43:07 +01:00
Dmitry Frank 0be132f3b5 Improve Android app
Now it can talk to backend as well to the demo device: `LCD.AddLine`,
`LED.Set`, `LED.Get`.

PUBLISHED_FROM=40f493cdabe6ad23a6f26a4563366bebb5071529
2016-04-11 09:43:04 +01:00
Deomid Ryabkov d31d8a764b Disable SL_INC_STD_BSD_API_NAMING in SimpleLink
And only define bits that we need afterwards.

PUBLISHED_FROM=b7e945dd16c7999753104428e29b5f0c1c9e666f
2016-04-08 10:56:18 +02:00
Deomid Ryabkov 68b29b683d Minor tweak to ESP8266 example
PUBLISHED_FROM=8fdac6c95ae29363fa0a8e519f926742531b9d00
2016-04-08 10:56:16 +02:00
Deomid Ryabkov eee293518c Add a README for CCS projects
PUBLISHED_FROM=3ccf4c043056677cd9c8fbd19e5e36961281af8c
2016-04-08 10:56:13 +02:00
Deomid Ryabkov c4adc86f5e Add CC3200 sensor demo CCS project
PUBLISHED_FROM=36fb960c2fe3d33ccdb8dbfbe4df6df24a9b1df9
2016-04-08 10:56:12 +02:00
Deomid Ryabkov 3ebda76def Add a CC3200 CCS Mongoose library project
PUBLISHED_FROM=27c466d4b289c1839ecd192e40a661728b546fa2
2016-04-08 10:56:11 +02:00
Deomid Ryabkov 7564623d46 Restore function of CS_DISABLE_STDIO
PUBLISHED_FROM=99c1c7a8cfcb84d283e4ed712f4da6879c41209c
2016-04-08 10:56:10 +02:00
Alexander Alashkin dc6b44571f Remove extra function from C-clubby
PUBLISHED_FROM=db9afcafce26d2048b1a5ebc90bcd1c06f555ed8
2016-04-08 10:56:07 +02:00
Deomid Ryabkov ccd0167e40 Switch to CC3200 SDK 1.2.0
PUBLISHED_FROM=857459178e3af50fa6626379d1f71a725cd3b68b
2016-04-06 08:25:50 +01:00
Alexander Alashkin 7dd1004b93 Fix mg examples
PUBLISHED_FROM=dec3ce8a13ff588637601cdb03dbe6196468ba4a
2016-04-06 08:25:50 +01:00
Deomid Ryabkov 19dd02acfd Remove epoll() support
1) It's broken; most likely in more ways than one
2) It doesn't make much sense as long as we maintain MG_EV_POLL and
   have to traverse the list of connections anyway.
3) In Mongoose, simplicity trumps performance.

PUBLISHED_FROM=61d2aeee4f74678bc186063c0977e720a8a414cb
2016-04-05 23:50:24 +01:00
Deomid Ryabkov 5e31914dc1 Fix AP configuration on CC3200
Factor out MG task for clarity and ease of reuse.

PUBLISHED_FROM=18f1aedd3c227b43a49f59a67076905917dd6cab
2016-04-05 23:50:23 +01:00
Deomid Ryabkov 8296e0f485 Do not allocate connection state for MG timers
PUBLISHED_FROM=c7cd64eea0ab7553450c452ac30bdd7a5032cbbe
2016-04-05 23:50:19 +01:00
Alexander Alashkin afa5e3f469 Enable SSL in SJ/WS
PUBLISHED_FROM=d7b3e083c7a7d5095c8e61bb6183ae7e6e068858
2016-04-05 23:50:16 +01:00
Alexander Alashkin f57fcbcb50 Implement connect_ws_opt and connect_http_opt
PUBLISHED_FROM=dcec33211d4c7933bd0a78fdb572556df93e51d2
2016-04-05 23:50:12 +01:00
Alexander Alashkin ce53e9dd2b Fix multipart handling for small files
PUBLISHED_FROM=b43cb8ca061d50ea8c0b6b20287b9382a4a6be22
2016-04-05 23:50:09 +01:00
Alexander Alashkin 55c2634416 Check listener when reusing UDP conn. Closes cesanta/dev#3139
PUBLISHED_FROM=f03f8fad30faee62f290d37b0b909ef49f301b80
2016-04-05 23:50:08 +01:00
Deomid Ryabkov fe0d340c03 Tighten Mongoose footprint defaults
Explicitly loosen them on the "big" platforms.

PUBLISHED_FROM=b4786428402c5da55738d3f7085ab12acf884e74
2016-04-05 23:50:07 +01:00
Alexander Alashkin 5a02c9dbed Fix create and close conn for UDP. Closes cesanta/dev#3162
PUBLISHED_FROM=071fb54d90750143751c1badc52757f0ba90bdb5
2016-04-05 23:50:05 +01:00
Marko Mikulicic 2c4ffcf70d Rename build dir to .build
This allows the bazel `BUILD` file to coexist on case insensitive
filesystems such as on OSX.

PUBLISHED_FROM=35def41bea62ddc623966e26814adddbf53315d5
2016-04-05 23:50:05 +01:00
Deomid Ryabkov 53c3e1338f Update SPIFFS to 0.3.4+
PUBLISHED_FROM=24a6704cdc2433f79e6995d2d83a3e1aac04a8d6
2016-04-05 23:50:04 +01:00
Evelyn 79454a9072 Update README.md 2016-04-04 14:05:44 +01:00
Evelyn 21c2c5650b Update README.md 2016-04-04 13:58:57 +01:00
Deomid Ryabkov 81ee559905 Roll CC3200 support into mongoose.{c,h}
This is less than ideal, but will do for now.

PUBLISHED_FROM=86cdc7eb8567b23520169976fb8a2103353b9416
2016-04-01 03:14:41 +01:00
Deomid Ryabkov 4a637a6e9a Refactor CC3200 example
Move data collection out of main.c

PUBLISHED_FROM=0340ebcea62a12275e915f325483603e72ff4183
2016-04-01 03:14:41 +01:00
Deomid Ryabkov aaf4802d80 Add file upload to CC3200 example
PUBLISHED_FROM=126bfdb9369f4bc2f09a21400caf797d995bef5b
2016-04-01 03:14:40 +01:00
Deomid Ryabkov 96310d761b Make CC3200 SLFS use "SL:" prefix
This is to make it compatioble with "devices" used in TI's libc.

Files without any "device" go to SPIFFS.

PUBLISHED_FROM=9adb888951389ccc43974537ee827a8240d79988
2016-04-01 03:14:39 +01:00
Deomid Ryabkov 96150bf568 Commonize file upload and make it part of Mongoose
PUBLISHED_FROM=23819ed308aeb8c1d6bdb08f5edd257df458ab38
2016-04-01 03:14:38 +01:00
Deomid Ryabkov f49df51544 Change mg_match_prefix_n to take mg_str
Part of general drive to use mg_str instead of pointer + length.
Adda unit test for mg_match_prefix.

PUBLISHED_FROM=1402506769b0941c6dbe6ae06e03e41df32d6008
2016-04-01 03:14:35 +01:00
Deomid Ryabkov 673796fb3a Improve HTTP erro reporting (send reason)
A few tweaks to TI example
Clean up mbuf_insert code a bit

PUBLISHED_FROM=00ed7aff05d6b760e10c7f14a503eccfc9a284bd
2016-04-01 03:14:32 +01:00
Deomid Ryabkov 482ab33c03 Move printing log prefix into a separate function
Reduces code size a bit and makes it cleaner

PUBLISHED_FROM=c08064102dc64f59dcdc1f80655f32e1ed94c850
2016-04-01 03:14:30 +01:00
Deomid Ryabkov fb53cd37e7 Make it possible to set log file
And use stdout for CC3200 demo because
  (1) an apparent bug which causes output sent to stderr to be
      printed v-e-r-y s-l-o-w-l-y (yes, it is really like that;
      https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/501881)
  (2) in CCS it is printed in BLOOD RED, which is annoying

PUBLISHED_FROM=36a86744bc8ea193e99e98670dadc7f3ab6ed53e
2016-04-01 03:14:29 +01:00
Sergey Lyubka c9fc7a1320 Fix JSON-RPC error formatting
PUBLISHED_FROM=9af7e0a2a90fab6e012174c154f62ee29c8b879c
2016-04-01 03:14:27 +01:00
Deomid Ryabkov 5f59b7e747 Enable SSI on CC3200 (w/o exec)
Disable CGI automatically, as it's never going to work.

PUBLISHED_FROM=37d7abc54be4637dfec5031bc3398e97a1be3090
2016-04-01 03:14:26 +01:00
Marko Mikulicic 024b24932c Redo amalgamation
Something went horribly wrong

PUBLISHED_FROM=879eac719f4a7feaa2b6ddf87cc86af72cdc1deb
2016-04-01 03:14:25 +01:00
Deomid Ryabkov 604c0b189f MG_CC3200 -> MG_SOCKET_SIMPLELINK; some cleanups
PUBLISHED_FROM=865b94073c5ed088847d05f57c1103119648fcaa
2016-04-01 03:14:25 +01:00
Alexander Alashkin 356f1f5119 Fix connection reuse in mg_if_recv_udp_cb
PUBLISHED_FROM=5d248fd465ade7f42293611bc2d60ed72439a489
2016-04-01 03:14:22 +01:00
Deomid Ryabkov 06659844b6 Making Mongoose compile with TI compiler on CC3200
Part 1

PUBLISHED_FROM=a949d11b5cc578adf050f1b1d00375a2f91dfc0b
2016-04-01 03:14:20 +01:00
Deomid Ryabkov 57cf363be9 Reamalgamate mongoose.h
PUBLISHED_FROM=2a83a296ff67e02c0ed761ae0060d1252c2be89f
2016-04-01 03:14:19 +01:00
Deomid Ryabkov 2fc1ff68cf Fix receive on UDP connections
Should only read on outgoing or listening "connections"

PUBLISHED_FROM=e84ff26b899a5f29ddef29ad6c5ba1d18e76e4ad
2016-04-01 03:14:18 +01:00
Deomid Ryabkov 6c4fecc4f7 TI compiler cannot analyze returns from branches
Thinks that mg_ws_random_mask does not return a value.
Help the poor, mentally challenged compiler.

PUBLISHED_FROM=e7c0c47dd2fcbb4e847515892939d69c7a573c2e
2016-04-01 03:14:17 +01:00
Deomid Ryabkov 0991ad7cc8 Minor cleanup
TI compiler detects "multipart" as unused

PUBLISHED_FROM=ababf8965a742418cff610df319e4d8c42e02439
2016-04-01 03:14:17 +01:00
Deomid Ryabkov d03b96b699 Reamalgamate mongoose.h
PUBLISHED_FROM=d61816815bd92a70c02ef327572b282426a001a9
2016-03-25 17:11:02 +00:00
Deomid Ryabkov a690c1442f Make CC3200 example work with XCC3200HZ
PUBLISHED_FROM=42b188c5ae85742681266fee21ec0b0472912743
2016-03-25 17:11:01 +00:00
Deomid Ryabkov d742b67878 Fix address stringification on CC3200 (SimpleLink)
PUBLISHED_FROM=b741acc999d0d2160528b4cb805f315b926ac65b
2016-03-25 17:11:01 +00:00
Deomid Ryabkov 41971a95b2 Add LED status and accelerator data feed
It is also possible to control LED by sending a command:
  {"t": 1, "v": 0/1/2}
0/1 = off/on, 2 = toggle

PUBLISHED_FROM=da176b70c4cd356c5d56eca58c2926619748d895
2016-03-25 17:10:57 +00:00
Deomid Ryabkov b6d700077a Add websocket data feed, send temperature data
PUBLISHED_FROM=e56601f99ccf80d8420b4b54b0ef7c272ec4a656
2016-03-25 17:10:56 +00:00
Deomid Ryabkov c091e6910b CC3200 build cleanup; commonized fw_meta targets
Some yak shaving along the way

PUBLISHED_FROM=09c7cfbd98dcec961970dfad3f38e67912a5b06c
2016-03-25 17:10:54 +00:00
Marko Mikulicic 35f633b533 Fix def_property owning
PUBLISHED_FROM=8e2f5f05e6bc7654217b1f5aaa8520366f9d6759
2016-03-25 17:10:51 +00:00
Evelyn 85e4ed7c25 Update README.md 2016-03-25 16:41:32 +00:00
Deomid Ryabkov 3b345a81c4 Add debug info to websocket conns
PUBLISHED_FROM=7454716e089be5c54359113cc188215e2475ea29
2016-03-22 12:51:48 +00:00
Alexander Alashkin a55c48a4ce Finally remove AVR from mongoose.h
PUBLISHED_FROM=23d528a7fcc98abcc4a95fd43a96d9c4ebabc5f7
2016-03-22 11:45:49 +00:00
Deomid Ryabkov 6f4c21c218 Do not bypass auth when handling CGI request
PUBLISHED_FROM=9faccf9fedd92d0fb54b7ff660c0cf99c1cbdb74
2016-03-22 11:45:49 +00:00
Dmitry Frank 5060640408 Docs: images are in the same dir as index.html
This simplifies writing markdown docs (no need to specify relative path
to images)

PUBLISHED_FROM=039a563b2f7e6a2fbb2a9424ac5315b2496ca184
2016-03-22 11:45:48 +00:00
Deomid Ryabkov f1cc8379e7 ESP8266_RTOS example tweaks
PUBLISHED_FROM=11096f272afc0716e0677c68d58ebf4d4e001a47
2016-03-21 22:45:54 +00:00
Deomid Ryabkov 4f9627c612 CC3200 FS refactoring and basic Mongoose example
Moved filesystem-related code out of SJS and into common.
Made it possible to have one, both or no filesystems enabled.
FailFS is now SimpleLinkFS, SLFS (ahem).

Example just serves a "Hello, world!" index page for now.

PUBLISHED_FROM=0e98ee4b8d95782c10791522c42eae5a7ba314f9
2016-03-21 22:45:53 +00:00
Deomid Ryabkov 012f241005 Fix the ESP8266_RTOS example, add it to CI
PUBLISHED_FROM=3d58ec06fe3108a81d1c35f8261783690bb12c4d
2016-03-21 22:45:53 +00:00
Marko Mikulicic ccf67dbf05 Add smart.js repo to srcfs
PUBLISHED_FROM=ebcd95607742a327cc0f453681f576982a8f027d
2016-03-21 22:45:51 +00:00
Marko Mikulicic a43709b4a8 Fix MQTT parsing of nullary commands
Closes cesanta/smart.js#619
Also http://forum.cesanta.com/index.php?p=/discussion/35/mixing-up-http-and-mqtt&#

PUBLISHED_FROM=ee040880b75048192c111c602610460071f33066
2016-03-21 13:29:39 +01:00
Alexander Alashkin e95c074965 Replace strnlen with c_strnlen
PUBLISHED_FROM=815cfaea77171761c952966e98466b87b719de06
2016-03-21 13:29:35 +01:00
Alexander Alashkin 4ca73566b6 Reamalgamate mongoose.h
PUBLISHED_FROM=441c74c182ef15f3eaeedd19add3411d7e121170
2016-03-21 13:29:34 +01:00
Dmitry Frank d0b347517c Fix comment for mg_event_handler_t
PUBLISHED_FROM=cd50a664039b4a74cb7d4d08990f415912585f7d
2016-03-21 13:29:31 +01:00
Dmitry Frank 7bed7ff482 Docs are generated for Mongoose
Comments in headers are changed a bit: removed adoc-specific stuff,
markdown is used instead

PUBLISHED_FROM=9242cce85cc52a47a197d377e7e23804721a6bb5
2016-03-21 13:29:29 +01:00
Marko Mikulicic d38b0dbf5b Add command to extract build info from metadata
This will allow to recreate the metadata after patching the FS.

PUBLISHED_FROM=dae228bbf49d71f383e4dc52316cf98aba3914f5
2016-03-21 13:29:24 +01:00
Marko Mikulicic 29d6c4ac04 Fix url path parsing
The url parser had two bugs:
- `http://example.com` -> `GET // HTTP/1.1`
- `foo://bar/baz` -> path is `"baz"` instead of `"/baz"`

Now the path returned by  `mg_http_common_url_parse` always
starts with `/`.

Closes cesanta/mongoose#631

PUBLISHED_FROM=f56ed97361ca14ee31d6ed26cf7afe5cd11e0dc5
2016-03-17 13:57:11 +01:00
Deomid Ryabkov 8148b6d037 SJ timer API cleanup; added setInterval and clear*
Timers/intervals are now implemented on top of Mongoose.
Got rid of all the platform-specific code (yay!)

Added interval support and ability to clear previously added timeouts.

PUBLISHED_FROM=93866dd80b95b0fa6e137d87f86138330e720154
2016-03-17 10:43:20 +01:00
Deomid Ryabkov 3327e0e871 Make it legal to have a conn with INVALID_SOCKET
E.g. a timer-only connection

PUBLISHED_FROM=e8d4d2b6e5e0dfa8e8f987b2ded6b973c39e2919
2016-03-17 10:43:19 +01:00
Alexander Alashkin 0456f0f59b Fix boundary problem
PUBLISHED_FROM=b78c97a337208007e1f622fde072cd59664ef76f
2016-03-17 10:43:18 +01:00
Deomid Ryabkov 72cf78de2c CC3200 fixes
Increase heap size to 44K (13K free after init)
Add File.list() support
Fix a bunch of bugs in file support
Disable sys_init.js, there just isn't enough RAM...

PUBLISHED_FROM=2121b8758f0596da39c3eafcfff36337a1b90b74
2016-03-17 10:43:17 +01:00
Deomid Ryabkov 1d0a89879c Include Winsock2 headers
Contributed by @f4bsch in https://github.com/cesanta/mongoose/pull/626
Submitting here with a minor change: MSDN says that ws2ipdef.h should
not be included directly and users should include ws2tcpip.h

PUBLISHED_FROM=1ebe7eac0cf87b0554432b94049b3d58bf7640f7
2016-03-15 13:35:07 +01:00
Deomid Ryabkov d1cc952859 Add a tool to fix header guards, apply globally
Identifiers starting with _ are reserved, fix those.
Wrote a tool to do it and applied it globally, why not.

PUBLISHED_FROM=db0fa27c90cbfb06ed06469406f9867c5a5bd3c4
2016-03-14 17:42:20 +01:00
Deomid Ryabkov f56c5b201d Do not set cipher list if PFS is disabled
Remove Krypton TODO: SSL{,_CTX}_set_cipher_list have been added
(but these ciphers are not supported).

Fixes cesanta/dev#2975

PUBLISHED_FROM=25bf330b785f0a61e18ba409069ebccbd50dcf65
2016-03-14 17:36:58 +01:00
Alexander Alashkin 077b9eb7a4 Fix var initialization
PUBLISHED_FROM=87ce6442efb2c725025942381c01ae2a2de738c7
2016-03-14 14:32:36 +01:00
Deomid Ryabkov 15c333feb0 Increase buffer size for the range header
This should cover 2^64-2^64/2^64

H/T @julee

PUBLISHED_FROM=bcc9f0193ab52375ece00a34c5758ddfe3b628c6
2016-03-14 14:32:35 +01:00
Alexander Alashkin 31c20ab32c Replace m-part&endpoints mbufs with plain structs
PUBLISHED_FROM=b30cf26077b7c6374f0d588e5ef5ba504f979bb3
2016-03-14 14:32:35 +01:00
Deomid Ryabkov 69215cf9eb Adjust poll timeout if there are timers enabled
PUBLISHED_FROM=bbdc998ab4170d55d40d067bab027ae52c9304ec
2016-03-13 15:49:08 +01:00
Marko Mikulicic f89b51eace Amalgamation fix
PUBLISHED_FROM=b92c75e2fc56d1243187b8516bec54b03a7b1043
2016-03-13 15:49:07 +01:00
Alexander Alashkin c581b5e532 Add mg/examples-wine to OurCI
PUBLISHED_FROM=2781248e982719cda495370a373f66d6e4213d83
2016-03-10 13:11:23 +01:00
Alexander Alashkin df311203dc Fix mongoose/examples compilation with mingw
PUBLISHED_FROM=46800f43ba03082cc589d70e6118d754f4cdc9d0
2016-03-10 13:11:22 +01:00
Alexander Alashkin 4927195ee4 Use mongoose event to free updater resources
PUBLISHED_FROM=3044287fe2623b591ddbf5c619398c21d6753411
2016-03-10 13:11:22 +01:00
Alexander Alashkin 63be1ebd38 Mongoose MSVC2015 warnings cleanup, part1
PUBLISHED_FROM=9e173215ed69464d1aa421d43a8fda814f36f96d
2016-03-08 08:44:23 +01:00
Alexander Alashkin 796dc18cfb Move http endpoints away from mg_conn and more
PUBLISHED_FROM=abd5bcf168194f9d38fbcbf3725eaae209e42fc4
2016-03-08 08:44:23 +01:00
Marko Mikulicic 14e116553f Add mg_connect_ws helper
PUBLISHED_FROM=0ff1c9becea2f0842dcf020d2d2ad64a8c5d95ae
2016-03-08 08:44:23 +01:00
Marko Mikulicic c82ccd6cf7 Simplify http client example
PUBLISHED_FROM=64a91c5d261338c7c224340943d63d4b753ee303
2016-03-08 08:44:21 +01:00
Evelyn 0adb080319 Update mongoose README.md
PUBLISHED_FROM=fa91aef8133ce514b799c07dcb842fe8ea999d55
2016-03-04 16:09:42 +01:00
Alexander Alashkin dbb38fffae Make (http) proto_data persistent
PUBLISHED_FROM=8210f4730a3411b3298274d792fc33da79f47b8a
2016-03-04 16:09:42 +01:00
Marko Mikulicic 672a68219a Fix a few build issues on OSX
PUBLISHED_FROM=d6e7ab0b45c960a4ca0bcb56cbc26bc05d641374
2016-03-04 16:09:41 +01:00
Alexander Alashkin 22cb0efd00 Implement FW upload via POST
PUBLISHED_FROM=6167cc57df932f6c113d03096eba0af0b456c3c3
2016-03-04 16:09:41 +01:00
Deomid Ryabkov a68d3d63b2 Make mg_mk_str take NULL, rename MG_STR MG_MK_STR
PUBLISHED_FROM=77f24c29667ca2aed3ad8a5102d7e1264f84228b
2016-03-04 16:09:39 +01:00
Evelyn cf48c7280a Update README.md 2016-03-03 10:27:45 +00:00
Evelyn 1295973028 Update README.md 2016-03-01 10:41:24 +00:00
Evelyn d5b9eda0f2 Update README.md 2016-03-01 10:40:14 +00:00
Evelyn 41c078d25c Update README.md 2016-03-01 10:36:33 +00:00
Evelyn 5614224e7d Update README.md 2016-03-01 10:04:57 +00:00
Evelyn 9ba44cb0d5 Update README.md 2016-03-01 10:04:10 +00:00
Deomid Ryabkov c18828af7b Digest auth fixes
PUBLISHED_FROM=dda24a5bdb42848a74460865dd23794941b46bd4
2016-03-01 09:53:50 +00:00
Marko Mikulicic 8a5f8439b4 Make sure iobuf is renamed to mbuf everywhere
PUBLISHED_FROM=b1049c57352286abda168df521002cfc87136fd6
2016-03-01 09:53:49 +00:00
Deomid Ryabkov 8f0374569e Increase buffer size for cnonce
PUBLISHED_FROM=0dcb2aba0c00da6803227c775e2178230c195f5f
2016-02-29 19:14:53 +00:00
Deomid Ryabkov 09dde636d2 Fix image
PUBLISHED_FROM=1dc0b60738c763dc0d9a939c255c7fbd431e96e5
2016-02-29 14:56:25 +01:00
Deomid Ryabkov d347247bf3 Add POST file upload to SJ web interface
PUBLISHED_FROM=b9575b2dd1da21b40bbfbf98d7c0cf835442c46a
2016-02-29 14:56:25 +01:00
Alexander Alashkin a6c66fb669 Implement multipart streaming in MG (edition 2)
PUBLISHED_FROM=de89316ca3b53b8eb46ea69e88b5fbd277c80dc2
2016-02-29 14:56:24 +01:00
Deomid Ryabkov b4dbc825b1 Minor fixes to Mongoose
PUBLISHED_FROM=8a8692e5cfaab63723fc9e241a50e8f229a26438
2016-02-29 14:56:23 +01:00
Deomid Ryabkov 4a0cc8223e Add SSL options to mg_{bind,connect}_opt
PUBLISHED_FROM=7e28eb43742b76c073c9c2c879c64d7b4d3e9a7e
2016-02-25 12:53:04 +00:00
Marko Mikulicic 7db10857b3 Fix build with clang
PUBLISHED_FROM=0cec0e6db4f46a76130fa7b6ec955d4151b28aae
2016-02-25 12:53:03 +00:00
Deomid Ryabkov 7e927b43ad Initial support for SSL in TCPUART 2
PUBLISHED_FROM=93cb3cf49ce9173a7361af17c1bd47858bb2602e
2016-02-25 12:53:03 +00:00
Deomid Ryabkov 9eea072f2a Add optional log of timestamp difference
PUBLISHED_FROM=046ac695f1c771ab156bdd950a8d5cbecbf65bfa
2016-02-25 12:53:02 +00:00
Deomid Ryabkov aa2ff674db Call recved when data is consumed from recv_mbuf
PUBLISHED_FROM=5fb212ed3114c57182781d441b6886cf83100a76
2016-02-25 12:53:01 +00:00
Deomid Ryabkov de24bfdf2f Include limits.h
PUBLISHED_FROM=7d50ad891fa2b24e119dd1f34037134effbc8d9f
2016-02-25 12:53:01 +00:00
Sergey Lyubka 2a084c3d98 Add GA hooks to mongoose & smartjs repos
PUBLISHED_FROM=3725cf834eb1d2bf12f8d03d7a590de8b1af63d4
2016-02-25 12:53:01 +00:00
Alexander Alashkin db8df41396 Implement mg_register_http_endpoint
PUBLISHED_FROM=357e722e80a2597aa3959756e69db03dc1057ded
2016-02-19 10:14:51 +00:00
Marko Mikulicic bda05d9372 Import frozen
PUBLISHED_FROM=9f6f38e92b5952b9571d73569c2752b6805f15c5
2016-02-15 15:48:12 +01:00
Marko Mikulicic 59bc2af4d6 Add contribution files
PUBLISHED_FROM=596d1e99df9c282aa8a0daa65346d8dfd7c583de
2016-02-15 15:48:11 +01:00
rojer 00a23ee330 Good bye osdep.h, you won't be missed
PUBLISHED_FROM=f08a8324dfde5f9e22eee0e5e4dbae0e3d45cb3f
2016-02-13 13:59:16 +00:00
Deomid Ryabkov 51ad50a641 Rewrite URI -> path mapping, Windows fixes
PUBLISHED_FROM=6088958e92af2b028646816435892828ce9f7625
2016-02-13 13:59:16 +00:00
Alexander Alashkin 148e1926e8 Fix crash in c_vsnprintf
PUBLISHED_FROM=020d1b9ea66862f71b08232b827cdd6e97528765
2016-02-13 13:59:15 +00:00
Alexander Alashkin 96c023df41 Add zx/zd/zu support to c_vsnprintf
PUBLISHED_FROM=83bf0e541a8541e484a83390108ca73d3af95c38
2016-02-13 13:59:15 +00:00
Deomid Ryabkov 44f37f49a1 Fix line numbering in amalgamated files
PUBLISHED_FROM=318aa2504072cc4a480fc92791d13847c2b10e30
2016-02-13 13:59:13 +00:00
Marko Mikulicic a8a30f6d3f Add short copyright notice in every source file
PUBLISHED_FROM=e3f3ffcd3715811d4bb7b3d0bd48184fbd371b26
2016-02-13 13:59:08 +00:00
Deomid Ryabkov ba80b1cd55 Add LICENSE file to F&C, update dates
PUBLISHED_FROM=497f03d8f49dd383e48f919715126d3d22ada7bc
2016-02-13 13:59:04 +00:00
Alexander Alashkin b56e985ccc Use mg_parse_uri in ws, add mg_mk_str function
PUBLISHED_FROM=650ce03aaf53f4c501fbb77a3ae0b584278e299a
2016-02-13 13:59:02 +00:00
Marko Mikulicic 67521fd9f6 Fix parse uri
PUBLISHED_FROM=9bc251ed259e909a8438f95a82d0a229b5a834cf
2016-02-13 13:59:02 +00:00
Marko Mikulicic 8c394f44b8 Implement mg_parse_uri
PUBLISHED_FROM=43d7e3f56cd5d45c8070ab55acdc091e61839681
2016-02-13 13:59:02 +00:00
Marko Mikulicic 77b4fff268 Fix mongoose doc formatting
PUBLISHED_FROM=b7b7dd5f9f4b86a9698add4484b948b4088a99c4
2016-02-13 13:59:01 +00:00
Dmitry Frank f56a0c6075 v7_is_true() -> v7_is_truthy()
PUBLISHED_FROM=73acce1507eb41f264f117b0775efea16db42ec1
2016-02-13 13:59:01 +00:00
Dmitry Frank 9ce8486059 Rename v7_create_ -> v7_mk_
PUBLISHED_FROM=58f7275b4b250b5bfccaf6539a2915c2c253e95c
2016-02-13 13:58:59 +00:00
Dmitry Frank 04a321150a Refactor in setting properties
PUBLISHED_FROM=d40355050f1a11ca26274c33e48f5175d7b76cb0
2016-02-13 13:58:58 +00:00
Alexander Alashkin d333c3c09e Implement fake DAV LOCK
PUBLISHED_FROM=0ea0d8623ab3f59de8996f6b18712d1b3fb120f8
2016-02-13 13:58:58 +00:00
Deomid Ryabkov 81d977c720 Introduce mg_time() and use it internally
PUBLISHED_FROM=024a2d7849a800381d58460877eacccfc93b1cdd
2016-01-11 12:24:40 +03:00
Alexander Alashkin f477898c7c Mongoose 6.1 -> 6.2
PUBLISHED_FROM=24146cf7f4cf86cfd76260fb906d50889b9d6f7e
2016-01-11 12:24:40 +03:00
Marko Mikulicic 566193a1eb Implement freezing V7 object graph
PUBLISHED_FROM=1670ce871ed2c9391edb10ff413d3d454997d1fe
2016-01-11 12:24:40 +03:00
Deomid Ryabkov 5d6eeb5d1d Add a note about Content-Type for form submissions
PUBLISHED_FROM=6079258be24fa0255f5a58e4d364be224435394b
2016-01-11 12:24:39 +03:00
Dmitry Frank d9b9d71b2d v7_apply() and friends take res as last argument
PUBLISHED_FROM=4b064f5e4554c5a016481bf8104c0ba9dd244083
2016-01-11 12:24:38 +03:00
Dmitry Frank 643ee1df14 cfunctions API refactored to return enum v7_err
PUBLISHED_FROM=f96a4ab2016c0125c1e94b3c5c9ada2c365bd39d
2016-01-11 12:24:36 +03:00
Deomid Ryabkov 6c4d37ee68 Free previous ssl context in mg_set_ssl
PUBLISHED_FROM=9f595222bce1fe8d0917649e36ce3be40eee1775
2015-12-23 17:02:52 +01:00
Sergey Lyubka 97b79cd04a Add MacOS to mongoose README
PUBLISHED_FROM=679b640e3de8b0fbd65b38263093dd6049db4cd3
2015-12-23 17:02:52 +01:00
Sergey Lyubka 56c6229dd6 Update Mongoose readme
PUBLISHED_FROM=ac117f203ef11b9c3877a6dd1919e8409d04cdb1
2015-12-22 07:42:12 +00:00
Dmitry Frank 0fe2dd9b48 Added param names to mongoose headers
PUBLISHED_FROM=07bd8163c4e1df49ab3dc7a1640efa2adff34e33
2015-12-22 07:42:11 +00:00
Sergey Lyubka 910aee7f7b Re-enable mongosoe FS support on ESP
PUBLISHED_FROM=cfa1c79bb5429feddf38c68c25195b97deef9a62
2015-12-22 07:33:06 +00:00
Sergey Lyubka 97063937ff Add vanilla forum to forum.cesanta.com
PUBLISHED_FROM=bff863108d0fb80a6139ac34be04fb999e18e62e
2015-12-22 07:33:06 +00:00
Sergey Lyubka 7e68b097d1 Close https://github.com/cesanta/mongoose/pull/603
PUBLISHED_FROM=ab934b21ed67878f47ccd569d88030e53e914bf7
2015-12-21 08:37:20 +00:00
Marko Mikulicic 4d41dff4fd Fix includes
PUBLISHED_FROM=58d764bb224968d5368b21a8eb572602055cb26b
2015-12-21 08:37:19 +00:00
Deomid Ryabkov 05082cec88 Use sub-second time for timers in MG
PUBLISHED_FROM=2b5bd1589465a5f43bc888c689842332cf7cdf98
2015-12-20 17:49:13 +00:00
Marko Mikulicic f05733da69 Fix COAP example, reduce number of ctx switches
PUBLISHED_FROM=7010fff404826c3dfc783d2cbdcbd0936a8a2b85
2015-12-15 11:36:34 +01:00
Marko Mikulicic 3c53909e82 Foolproof Smartjs publishing
PUBLISHED_FROM=8ade849890746baa95fd8a5d92baf3dda656a719
2015-12-15 11:28:39 +01:00
Deomid Ryabkov 1e53ec47a9 Peeple TLS support for updates
PUBLISHED_FROM=1abdacaece6dc63b6148c605c4c2cc41c3cc4ac6
2015-12-15 11:28:38 +01:00
Sergey Lyubka 17802735d7 Spiffy config for cc3200
PUBLISHED_FROM=34b3678cb2510adfd5f26183ae7c16aadb97e6c9
2015-12-14 00:12:12 +01:00
Marko Mikulicic d2eb67a1ae Sanitize mongoose headers
PUBLISHED_FROM=d3790d175b8d714865c7eb5f12e82d31844a863f
2015-12-14 00:12:12 +01:00
Marko Mikulicic 3f254dd3fc Simplify include paths
PUBLISHED_FROM=4e38db207dc2634e410339c81c5a2a87e8b188b0
2015-12-14 00:12:12 +01:00
Deomid Ryabkov e139bde6ae A couple SSL-related fixes for Mongoose
PUBLISHED_FROM=03297850f7a620588de851ef86be25e17a04ad28
2015-12-11 13:02:13 +00:00
Sergey Lyubka 5f62951143 Runtime DAV auth disable. Implement MOVE
PUBLISHED_FROM=aec49928891972ecd6af9999fe3e1cb5ef00f24c
2015-12-11 13:02:13 +00:00
Sergey Lyubka 2207e87c8f Fix DAV for non-existent files. Improve logging
PUBLISHED_FROM=39a2810ad9bebcf1676b982f7523aa9c2339cc4f
2015-12-11 13:02:12 +00:00
Sergey Lyubka 5bd59c7b70 Shut up spiffs. Proper DAV report
PUBLISHED_FROM=125379f6c624b4e938b5d543cb8ed5fe906de98f
2015-12-11 13:02:12 +00:00
Alexander Alashkin 02f6867a2f Implement %lld in c_vsnprintf. Closes cesanta/dev#2120
PUBLISHED_FROM=1f24878425356f625b4f5b2b0fe40ab5f17501ab
2015-12-11 13:02:11 +00:00
Deomid Ryabkov b93fa3144a First cut of TLS support for LWIP event manager
PUBLISHED_FROM=98cf23ea090ffb4e83edd4d600bee57dfd7d94d4
2015-12-11 13:02:11 +00:00
Alexander Alashkin a68e0d9a3f Add WebDAV move stub
PUBLISHED_FROM=b1f712862b81dfe8da6547338f77ff3bfefa5051
2015-12-11 13:02:10 +00:00
Alexander Alashkin cfe80ba9b7 Add WebDAV support to sjs/esp8266
PUBLISHED_FROM=a68a2f205cb2f10809183d5160709981585538b7
2015-12-11 13:02:10 +00:00
Deomid Ryabkov 35abfd44dd Fix windows build
PUBLISHED_FROM=3b3788da8c2dcc57897044701c5252ea46db0249
2015-12-08 13:38:05 +00:00
Sergey Lyubka e98b5a691e Implement Http_request.setTimeout()
PUBLISHED_FROM=7a72e485aad2be859b9452dc1687a922778959d1
2015-12-08 13:38:05 +00:00
Sergey Lyubka ed24afd172 Connect timeouts for resolving connections
PUBLISHED_FROM=068b6f75550b10913d7f13106f9a7f7dce5babec
2015-12-08 12:35:29 +00:00
Deomid Ryabkov 714556de65 Added debug line to mg_mgr_handle_ctl_sock
PUBLISHED_FROM=a4c1d105cb4f18d982bd28190691b6ea65ee37fc
2015-12-08 12:35:29 +00:00
Deomid Ryabkov 547ec85b58 Properly disable socketpair-related stuff
PUBLISHED_FROM=f3a236470281af80848c8f78163980083190c081
2015-12-08 12:35:29 +00:00
Marko Mikulicic 845d751e87 Fix C String API confusion
PUBLISHED_FROM=af34acd81d877bfbd8441c14451d8c81f18c207d
2015-12-08 12:35:29 +00:00
Alexander Alashkin 518a7f8a71 Fix MG DAV
PUBLISHED_FROM=132db6ed9c9e1eb9ec19b4f9299448b901b92231
2015-12-08 12:35:29 +00:00
Sergey Lyubka 31323b01bc Introduce MG_EV_TIMER event
PUBLISHED_FROM=2e90ee87eda8bc742e427671bb9df1ce0cd8bc25
2015-12-08 12:35:28 +00:00
Deomid Ryabkov 3a138ecc83 Move more of SSL-specific code into net_if
PUBLISHED_FROM=47dc4712c0ea2012c0774ad260f0451371cfe8b7
2015-12-08 12:35:28 +00:00
Dmitry Frank 7294674a8b Remove custom strnlen for VC 16+
PUBLISHED_FROM=9c28b64267408929f5c565b87978816f3a93f06b
2015-12-08 12:35:27 +00:00
Sergey Lyubka 423b978395 Report read-only vars to UI
PUBLISHED_FROM=2ca4b52e777a54d9bb05a177e57a8b73bb962fdb
2015-12-08 12:35:27 +00:00
Sergey Lyubka ecf20ec7b8 Add error_log_file, use extended log format
PUBLISHED_FROM=d189b44857723871159826944bde9b87089bb0bd
2015-12-08 12:35:27 +00:00
Sergey Lyubka c948a509fb Export mg_url_decode() to public
PUBLISHED_FROM=442534f52992be612a98a549e5ab2191081a9d52
2015-12-03 22:05:52 +00:00
Sergey Lyubka f5ad19d76b Fix g++ build for mongoose example
PUBLISHED_FROM=c581f33e26819d05c9b8484c9dc10c2a3615a34a
2015-12-02 17:04:44 +00:00
Deomid Ryabkov d665d9e90e Always Be Closing
PUBLISHED_FROM=29ca7cdd9024790bd75892f9f67b3f83a6bd00d1
2015-12-01 18:03:19 +00:00
Sergey Lyubka a5e10450dd Mongoose 6.0 -> 6.1
PUBLISHED_FROM=22408f9340bbbbf186bd551dd30564efe0c253e3
2015-11-30 12:27:59 +00:00
Sergey Lyubka e9d79b130d Add documentation for the mongoose binary
PUBLISHED_FROM=71a01298c9bbff9a748ea33e0d148d549e5e6437
2015-11-30 12:27:59 +00:00
Deomid Ryabkov 7951dac9d5 Put getting local/remote address behinf net_if
PUBLISHED_FROM=f88056e79b632d9eee288dacf61c2f87ff3ceca5
2015-11-30 12:27:58 +00:00
Alexander Alashkin 6c77351c58 Verify settings before apply
PUBLISHED_FROM=ca7b6a9814b88b45d893d8e1386faded27305e9c
2015-11-30 12:27:58 +00:00
Sergey Lyubka 7c4cda622f Implement port based redirect
PUBLISHED_FROM=798a8bc38cb385027d3caae9b954002c1a10d39c
2015-11-30 12:27:57 +00:00
Deomid Ryabkov d8f8c1cb99 I fail at math
PUBLISHED_FROM=c45da0cf83e9573a9fa8234f4dee1b9e4e5b977a
2015-11-30 12:27:57 +00:00
Deomid Ryabkov d2b9ad570f Add a custom linker script for 4m flash
PUBLISHED_FROM=a92b86588923fb54075b1c3ed8ca8112164c36c5
2015-11-25 12:06:28 +00:00
Deomid Ryabkov 5b36f32996 Add ESP8266 RTOS example
PUBLISHED_FROM=892d01b09f5801d3d19e6db1ce22b7916d2f83d5
2015-11-24 00:42:27 +00:00
Deomid Ryabkov 3298030b8e Changes to make Mongoose compile on ESP RTOS SDK
PUBLISHED_FROM=863a47416ee5e30f20f6523374ebd510cc022d99
2015-11-24 00:42:27 +00:00
Sergey Lyubka 6cfc696439 Add helper function mg_send_head()
PUBLISHED_FROM=5c9d11d21d34fa72974a021f0342068d87159634
2015-11-24 00:42:26 +00:00
Sergey Lyubka a93b3a06dd Change binary download link
PUBLISHED_FROM=bc1a39dc8c11bab83c20da2c6e9477da0d17f993
2015-11-20 12:07:52 +00:00
Deomid Ryabkov 79e8d77ea0 Shave the debug yak
PUBLISHED_FROM=402d26b6a2797bfe9fb70e48cbde97f3960ef5d4
2015-11-20 12:07:51 +00:00
Sergey Lyubka d68fab9ee5 Enable threads on Win by default
PUBLISHED_FROM=cc4070d618f079ccd1e02e62bba87247e75c74aa
2015-11-20 12:07:51 +00:00
Sergey Lyubka bda470245e Support for multiple listeners
PUBLISHED_FROM=ad00f31ae8732be2d7fdc7f0968fd04edfd76bb6
2015-11-20 12:07:51 +00:00
Sergey Lyubka 0c95290f93 Add extra headers support (allows CORS)
PUBLISHED_FROM=2279e31315bba4d19e2ae568cba94ea5dea3ef6a
2015-11-18 07:44:23 +00:00
Deomid Ryabkov 8989739d32 Use mg_call to invoke user handler
PUBLISHED_FROM=cefd472946dfe77ec262c1980eab983a919b6220
2015-11-18 07:44:23 +00:00
Sergey Lyubka 1112981e6e Fix mg_if_not_modified() logic
PUBLISHED_FROM=3eb1455eacc66af83904f56397c0e24b1d4f13bf
2015-11-18 07:44:23 +00:00
Sergey Lyubka 0cf82744ce Unbreak macos tests
PUBLISHED_FROM=a9521579223cfbb68e2b7bcd221335d25dacbb87
2015-11-18 07:44:22 +00:00
Deomid Ryabkov 5cdf838325 Fix error handling in async resolver
PUBLISHED_FROM=1e8558ec08f8e72d70163d34e0920f80f74372d1
2015-11-18 07:44:22 +00:00
Sergey Lyubka 6418cad39f Disable HTTP keep-alive on embedded
PUBLISHED_FROM=63bb1ca0f307a4332006d6cd13a35f0be6359174
2015-11-18 07:44:22 +00:00
Sergey Lyubka 46529fd51e Remove unused MG_F_DONT_SEND
PUBLISHED_FROM=beaec58b808fb767b7e491d8b5d6b23a6d5e4e0c
2015-11-18 07:44:21 +00:00
Marko Mikulicic c09ba40a48 Cleanup make format target
PUBLISHED_FROM=5f856af633ca9a10161769caac130fc6452f137f
2015-11-18 07:44:20 +00:00
Sergey Lyubka 47d52896a1 s/uri/url, to conform to nodejs HTTP API
PUBLISHED_FROM=32ba0c859ad9df3cf7dc3af8e379e49543e77843
2015-11-18 07:44:19 +00:00
Deomid Ryabkov d60c99b01c Make MG debug go to stderr
PUBLISHED_FROM=11618b6b2a50c62dd612d241c6b13a9aab357909
2015-11-18 07:44:19 +00:00
Sergey Lyubka b8aeba06a2 Add unit test for mg_parse_date_string
PUBLISHED_FROM=aec7d5e6c6598fbc5141c40c9638cc96d288c8dc
2015-11-18 07:44:18 +00:00
Sergey Lyubka 8a0bc2d614 Mongoose binary - GUI version fix
PUBLISHED_FROM=94c2b4c5a40c3519df6caa7561c3935bdf505575
2015-11-18 07:44:18 +00:00
Deomid Ryabkov e34747d1ad Handle case of malloc failure in mbuf_resize
PUBLISHED_FROM=0cb98ac520b8aeb8bbeb2f23b8c65c62ab256021
2015-10-30 18:38:43 +01:00
Deomid Ryabkov 1a6bc7c514 Fix mbuf_resize(0)
PUBLISHED_FROM=7cab7543db990f7f67b53edca4f65ba45b219711
2015-10-30 18:38:42 +01:00
Deomid Ryabkov ffa0ddfdbf Make mg_call usable in protocol handlers
PUBLISHED_FROM=63ad74b31750a851db090d2f2995ecf5f275538b
2015-10-30 18:38:42 +01:00
Alexander Alashkin ca55bff1cf Fix mg compilation
PUBLISHED_FROM=ce7fdfebd3ebbf88688514be501b33ad1241743c
2015-10-30 18:38:42 +01:00
Deomid Ryabkov cfee5c4fdb Mongoose TCP listener for ESP LWIP
PUBLISHED_FROM=e88b17d21ee78a4c2c1c4832db322e19b314206d
2015-10-30 18:38:42 +01:00
Marko Mikulicic e46185068b Avoid inlining of esp gcc bug workaround
PUBLISHED_FROM=f02283b42d842246c75df848061a80b754a97013
2015-10-30 18:38:42 +01:00
Marko Mikulicic 6ef2fea45e Workaround lx106 gcc bug stack frame size rounding
PUBLISHED_FROM=66906d0e5f6d97b135bd157f5f82dc13bef2fb1a
2015-10-30 18:38:41 +01:00
Deomid Ryabkov e244dd84a9 Mongoose and LWIP fixes
PUBLISHED_FROM=c63992029098108ae62234176d4334207b43dd7b
2015-10-30 18:38:41 +01:00
Deomid Ryabkov 5034937a15 Set more reasonable WS buffer size
PUBLISHED_FROM=ecfc284747f1b3eef5c40dd74b4af19f4618edcc
2015-10-30 18:38:41 +01:00
Deomid Ryabkov 060045be65 Un-static a bunch of structs to save ram when idle
PUBLISHED_FROM=1a994be80dd46ffd410f88db28816c85b2c2bf79
2015-10-30 18:38:41 +01:00
Deomid Ryabkov 9adfe8d484 espconn is out, Mongoose + LWIP is in
PUBLISHED_FROM=c67ea324058d70070f89420c40e57b9df87964b1
2015-10-30 18:38:41 +01:00
Deomid Ryabkov 799cc369e0 Reduce stack usage when parsing HTTP URL
PUBLISHED_FROM=682f59e58d8335352cc09987a91e85cc264cf0f8
2015-10-30 18:38:41 +01:00
Deomid Ryabkov b97d3fea4b strnlen should return size_t
PUBLISHED_FROM=545c7d80380c48332803ef00981763b130a1c1c6
2015-10-30 18:38:40 +01:00
Deomid Ryabkov 2a4ca9d5c3 Introduce a network interface API, refactor UDP
PUBLISHED_FROM=6e961e2760b2b64e211978ede5df8ca353ea5512
2015-10-30 18:38:40 +01:00
Deomid Ryabkov 747e40e74e Fix size_t printing on CC3200
PUBLISHED_FROM=65b068a7620e7117c0dffc762d710e08dfbad037
2015-10-30 18:38:40 +01:00
Marko Mikulicic cf279e7885 Address ignored return values of read and write
PUBLISHED_FROM=d76b6b9d91d7af0e916cd81e1213c463757bf924
2015-10-30 18:38:39 +01:00
Marko Mikulicic cbf968735a Fix MG_SEND_FUNC/MG_RECV_FUNC rename fail
PUBLISHED_FROM=da28a75111abb5fb49b122133a66ae9bdf63f474
2015-10-30 18:38:39 +01:00
Sergey Lyubka 57b35e6007 Add JS HTTP server to smartjs
PUBLISHED_FROM=13210e55d9434917549dcbf9a39a5377181f8387
2015-10-21 17:34:55 +02:00
Deomid Ryabkov 1eaabdd8e5 s/dmg/dns/g
PUBLISHED_FROM=96dc8b0b4001f2206749a401c615f043fc5f6131
2015-10-21 15:17:11 +02:00
Sergey Lyubka dcd4e660a3 Serve current dir by default in mg_serve_http()
PUBLISHED_FROM=421b4256629b2bccd20ceb127ece02be57085b40
2015-10-21 15:17:11 +02:00
Deomid Ryabkov 96409e74e5 Fix ALL the leaks!
PUBLISHED_FROM=0adf7c6c903075d6705693829f8758f8ff67d579
2015-10-21 15:17:11 +02:00
Sergey Lyubka e28ee097a1 Move mongoose binary to dev repo
PUBLISHED_FROM=224a216abc4a7cca50d80f762dca602f54470105
2015-10-21 15:17:11 +02:00
Deomid Ryabkov 2b4e544867 Move "connect done" logic from mg_read_from_socket
PUBLISHED_FROM=318cc110d8b012cf75cb02dfc68a8215faa93fe7
2015-10-21 15:17:11 +02:00
Deomid Ryabkov ee042a3481 Fix SSI parsing
PUBLISHED_FROM=c918da948354def5815dfd6b832053f170212c6f
2015-10-16 12:57:02 +01:00
Alexander Alashkin 63075f6846 Add restful_client & restful_server VC projects
PUBLISHED_FROM=5ee78f5c907401c93a04f89d6b25b99515aa809a
2015-10-16 10:31:23 +01:00
Alexander Alashkin 7f2e42a06d Fix MSVC2015 build and add VC project
PUBLISHED_FROM=d071ecd0bdcc871cdd18a65c1ebb8b546ff61941
2015-10-16 10:31:23 +01:00
Sergey Lyubka 3fbfa33b9a Minor nitpicks for big_upload
PUBLISHED_FROM=55d4270916f32ce4645965fbd7a031d7f8e1907b
2015-10-13 10:38:36 +01:00
Maxim Ignatenko 179aa75047 Add big_upload example
PUBLISHED_FROM=58dfd3cfdbc5f908e5fa10171274f0d5dd256404
2015-10-13 10:38:36 +01:00
Maxim Ignatenko 4658194d08 Properly populate mg_connection.sa field
PUBLISHED_FROM=a305c720aee1b159847e10c962b6de7fe08bc787
2015-10-12 12:48:35 +01:00
Marko Mikulicic b35657814c Factor our LWIP enabling flag
PUBLISHED_FROM=d080ccb2d0daef1103ff7487b5c3f4b65ab97b99
2015-10-12 11:05:33 +01:00
Marko Mikulicic a2322c77c6 Fix mongoose build
PUBLISHED_FROM=ec4a774dfd690876201080ff55bdbec5bd865670
2015-10-12 11:05:33 +01:00
Marko Mikulicic b50c183c19 Simplify and abstract C func arg access
PUBLISHED_FROM=c174439a2d22794497dc35fd46ceb1f6c4e553a2
2015-10-12 11:05:32 +01:00
Maxim Ignatenko a941687db0 Fix mongoose build
PUBLISHED_FROM=aec35861339d336697649fd2020766439b3814ad
2015-10-12 11:05:32 +01:00
Marko Mikulicic c2eef52b65 Add CLA to mongoose README
PUBLISHED_FROM=9987c788e55bc949c06ebf355d51d38ef2d109d6
2015-10-12 11:05:32 +01:00
Claudiu 3e6cbbde04 Fix static function prototype
PUBLISHED_FROM=d90d06593ec4531f479053243c72601ee27a3141
2015-10-05 22:27:10 +02:00
Sergey Lyubka 6400536282 Rename v7_get_global_object() -> v7_get_global()
PUBLISHED_FROM=91a306d5dbc55d65505904b1a19cca5bbe9f58cc
2015-10-05 22:27:10 +02:00
Sergey Lyubka 776103068f Add examples for mongoose blog article
PUBLISHED_FROM=54f54211919bb2276e02b4d10306ffa5540a9313
2015-10-02 13:10:47 +01:00
Maxim Ignatenko 93beff3b65 Use select() by default everywhere
PUBLISHED_FROM=474789b0d7f5076434e5c15c079306243f3a8d81
2015-09-25 16:19:50 +01:00
Marko Mikulicic 22f8d86b05 Makes sure send file releases resources on close
PUBLISHED_FROM=451d2dd0b55b9fd7dea441a9279f54d0005c97b1
2015-09-25 16:19:50 +01:00
Marko Mikulicic 3a9a9c7ad0 Enable printf format warnings for mg_printf
PUBLISHED_FROM=61a52651a2542cb89b155623781a5fcbf64779f3
2015-09-25 16:19:50 +01:00
Alexander Alashkin 13238b1ad2 Restore win build
PUBLISHED_FROM=fe072db3dcc5f92f44d91a81596e33e404887951
2015-09-25 16:19:50 +01:00
Marko Mikulicic 56f661e9c6 Make mg send_http_file work for ESP8266 RTOS
PUBLISHED_FROM=10623cfe38e143f7e107a6494baa298c788586f0
2015-09-25 16:19:49 +01:00
Marko Mikulicic 5351f46efb Mongoose send on esp8266 RTOS_SDK
PUBLISHED_FROM=1e97853ebc1c39b01754cf76d875453842e9b36d
2015-09-25 16:19:49 +01:00
Sergey Lyubka 0cd3335b78 Update mongoose download link
PUBLISHED_FROM=70a6e34c6630e3ab95d200b173d22529101b61ea
2015-09-22 10:35:55 +01:00
Marko Mikulicic 0611627448 Serve a http file on quantex
PUBLISHED_FROM=856d2e0bdaddece638d215c252fabeb9ea2d7809
2015-09-22 10:32:02 +01:00
Sergey Lyubka f014918435 Add JS support to Mongoose
PUBLISHED_FROM=5f319c5c6d965432da063ce7ab495ae24e972755
2015-09-22 10:32:01 +01:00
Sergey Lyubka 51e016089e Nitpick README update
PUBLISHED_FROM=28b3a30ad82432e8e3ca194d7e204acf9a998e94
2015-09-22 10:32:01 +01:00
Sergey Lyubka 8a66ff5278 Mongoose rebrand changes
PUBLISHED_FROM=50497043e8d0c10487804263cdcb1cbb260d5a26
2015-09-21 15:19:35 +01:00
Sergey Lyubka e1dd3f06fe Rename Mongoose constants: NS_ -> MG_, NSF_ -> MG_F_
PUBLISHED_FROM=c9cc54df1883aa17606de2b1ffb30f0cd687d037
2015-09-21 15:19:34 +01:00
Deomid Ryabkov 32ab35f61f Rename hmac_sha1 -> cs_hmac_sha1
PUBLISHED_FROM=3d4fbd8192d04add406e304b113ce5ec0b1c1165
2015-09-21 15:19:34 +01:00
Marko Mikulicic 8ab96ec74b Implement binary and incremental clubby client
PUBLISHED_FROM=ba371b8a3d9dd8afcb771144beb8e5c344c7d6c7
2015-09-21 15:19:33 +01:00
Sergey Lyubka 0730590e35 Fix SSL codepath in restful_server example
PUBLISHED_FROM=4cd52839b8d2396f50f94f1ce36fa7b4501dc204
2015-09-21 15:19:33 +01:00
Marko Mikulicic f7e0b1331c Implement incremental UBJSON serializer
PUBLISHED_FROM=fe0936cbf8c16d5b5cfdf674e8e7181f6b2771cc
2015-09-21 15:19:33 +01:00
Marko Mikulicic 17aa2a7092 Implement streaming base64 encoder
PUBLISHED_FROM=af3c6c0e8f9806c1bdc570c06cc6eea9995d6e3d
2015-09-21 15:19:33 +01:00
Alexander Alashkin 7d38d05ca7 Use updated sockets
PUBLISHED_FROM=30231da54720c709ce98cd0ab208cf9b06814eab
2015-09-21 15:19:33 +01:00
TheTypoMaster 33bad047f0 Fix typo recieve
PUBLISHED_FROM=6e2f4fffb91ff18da94d97aba763acbdde496515
2015-09-09 10:21:21 +01:00
Marko Mikulicic 5234b73c29 Add simple core dumper for ESP
PUBLISHED_FROM=ec98516ce6aa1c841344adc7aae20b044b3d349b
2015-09-09 10:21:21 +01:00
Sergey Lyubka c566e2eba5 Mongoose README
PUBLISHED_FROM=f2409461d1ef4eef81b5481914bee5e596e906f8
2015-09-08 14:42:13 +02:00
Marko Mikulicic e565977481 Merge pull request #568 from cesanta/fossamerge
Merge dev branch code named Fossa as next stable Mongoose
2015-09-08 14:39:52 +02:00
Marko Mikulicic 8927c9d22b Merge dev branch code named Fossa as next stable Mongoose 2015-09-08 14:34:30 +02:00
Marko Mikulicic 28eb251ccd Merge pull request #567 from cesanta/move
Fossa merge
2015-09-08 13:28:38 +02:00
Sergey Lyubka b99dc95b1d Fossa merge.
PUBLISHED_FROM=12ccba10358075024a1195cd0b0c1ea132aae6a3
2015-09-08 12:26:25 +01:00
Sergey Lyubka 75aadb3e79 Fix links 2015-08-26 11:23:54 +01:00
Sergey Lyubka b6ecd5fb4c Update readme 2015-08-20 10:20:02 +01:00
Sergey Lyubka 1e7f55ed84 Update readme 2015-08-20 08:56:14 +01:00
Sergey Lyubka eeadc5ecff Updated readme 2015-08-18 12:21:33 +01:00
Sergey Lyubka 568ca42988 Updated readme 2015-08-18 11:26:43 +01:00
Sergey Lyubka 7b758bfc9d Updated readme 2015-08-18 10:47:23 +01:00
Sergey Lyubka 8ef454b75f Updated readme 2015-08-18 09:50:00 +01:00
Marko Mikulicic 0a2f2fda5c Merge pull request #563 from cesanta/sdp
Tweak event handler a bit for clarity
2015-08-13 15:42:45 +02:00
rojer 6b440918ec Tweak event handler a bit for clarity
Put cases in the order we expect them to occur
2015-08-13 14:38:41 +01:00
Marko Mikulicic a73fce945c Merge pull request #562 from cesanta/sdp
Swallow responses to internal pings
2015-08-12 19:45:04 +02:00
rojer d349bb3cc7 Swallow responses to internal pings 2015-08-12 18:35:18 +01:00
Marko Mikulicic 7c4119a287 Merge pull request #561 from cesanta/sdp
Mongoose example for server data push
2015-08-12 18:52:51 +02:00
rojer 8a71ad99e6 Mongoose example for server data push 2015-08-12 17:42:05 +01:00
Sergey Lyubka 41b405d7bf Remove examples/web_server 2015-07-13 11:14:19 +01:00
Sergey Lyubka 30b80dc5ee Update example 2015-07-13 11:11:26 +01:00
Sergey Lyubka 524aa2e586 Merge pull request #556 from nesteroff/vs2013
Fix VS2013 warnings
2015-07-13 11:03:13 +01:00
Yuri Nesterov 990a1b9ae0 Fix VS2013 warnings 2015-07-12 15:43:54 +03:00
Sergey Lyubka 4cb0c6864e Merge pull request #550 from cesanta/fixpolar
Fix ssl close with polarssl
2015-07-02 17:06:30 +01:00
Marko Mikulicic 5183693951 Fix ssl close with polarssl 2015-07-02 16:26:31 +02:00
Sergey Lyubka e47506f957 Fix unauthenticated body handling 2015-06-22 12:05:31 +01:00
Sergey Lyubka 824e4dc0e4 Fix file upload iteration 2015-06-19 19:01:21 +01:00
Sergey Lyubka d033497714 Merge pull request #541 from NickCis/connection_param_fix
Possible fix in order not to loose the reference of connection_param pointer
2015-06-10 15:32:28 +01:00
Nicolas Cisco d8028df29d Quick fix in order not to loose the reference of connection_param pointer 2015-06-10 01:49:37 -03:00
Sergey Lyubka 564683d25a Fix timeout for cookie auth example 2015-06-05 18:09:27 +01:00
Sergey Lyubka 30c0a3f201 Propagate select() and socketpair() errors to the user 2015-06-04 11:27:31 +01:00
Sergey Lyubka 08fe9ac518 Fix examples 2015-05-20 10:53:10 +01:00
Sergey Lyubka 14d6f71f82 Fix unit test 2015-05-20 10:50:32 +01:00
Sergey Lyubka 29454e2296 Merge pull request #524 from NickCis/array_variables
Implementing array varibles
2015-05-20 10:05:48 +01:00
NickCis d6cbf9f77d Fixing C coding style mistakes 2015-05-19 13:54:35 -03:00
Sergey Lyubka b9fead4d6e Merge pull request #525 from NickCis/mg_vprintf
Adding mg_vprintf and mg_vprintf_data.
2015-05-19 15:54:27 +01:00
Sergey Lyubka c6a04e1719 Fix #523 2015-05-18 11:50:56 +01:00
NickCis c839a61fea Adding mg_vprintf and mg_vprintf_data in order to use va_list like functions 2015-05-15 16:20:33 -03:00
NickCis c06abbc5f7 Implementing array varibles 2015-05-15 15:49:35 -03:00
Sergey Lyubka c8e88e1710 Sync fossa struct definitions 2015-05-15 17:20:54 +01:00
Sergey Lyubka bf7a115bf2 Fix url rewrites 2015-05-11 09:13:46 +01:00
Sergey Lyubka b8dfb69cf5 Merge pull request #514 from cesanta/fix_setsize
Fix default windows FD_SETSIZE, closes #506
2015-04-17 07:10:24 +01:00
Marko Mikulicic 1cd9715095 Fix default windows FD_SETSIZE, closes #506
https://support.microsoft.com/en-us/kb/111855 describes
that the user is expected to set the FD_SETSIZE macro
before including winsock2.h
2015-04-17 02:30:22 +02:00
Sergey Lyubka 5c7aeac148 Merge pull request #509 from cesanta/Fix_mjpg_streamer_example
Fix mjpg_streamer example
2015-04-13 23:37:27 +01:00
Alexander Alashkin 09a80628e6 Fix mjpg_streamer example 2015-04-13 16:02:52 +03:00
Sergey Lyubka 2ff2c369f7 Merge pull request #505 from eugoss/master
Inspect POST buffer in mg_get_var() only if first call of get_var() returns -1
2015-04-10 18:31:15 +01:00
Marko Mikulicic eef70aaf74 Merge pull request #507 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-04-09 13:04:18 +02:00
The Gitter Badger 89ac97caba Added Gitter badge 2015-04-09 10:58:41 +00:00
Eugene Ossintsev c00b236c8d Fix spelling in docs/ReleaseNotes.md and in comments in mongoose.c 2015-04-09 00:15:40 -04:00
Eugene Ossintsev eacd3f35e0 Inspect POST buffer in mg_get_var() only if first call of get_var() returns -1
In mg_get_var() the first call of get_var() inspects the variables of
the query string. If the requested variable is found but the destination
buffer is too small to hold the variable, return -2 right away. If it's
not found, make the second call of get_var() to inspect the POST buffer.
2015-04-05 23:40:50 -04:00
Marko Mikulicic 8a2aa72571 Merge pull request #504 from himanshupsharma/check_fd-setsize
Reverting (socket < 0) checks to avoid Windows build failure.
2015-04-03 11:22:50 +02:00
p_himanshu 7da8f273d2 Reverting (socket < 0) checks to avoid Windows build failure. 2015-04-02 16:47:07 -07:00
Sergey Lyubka a90a5a2b6a Merge pull request #503 from himanshupsharma/check_fd-setsize
Adding a check to avoid undefined behavior if socket is out of the bound...
2015-04-02 18:28:23 +01:00
p_himanshu b5b819b4a3 Adding a check to avoid undefined behavior if socket is out of the bounds of FD_SETSIZE. 2015-04-01 22:24:29 -07:00
Sergey Lyubka 821e2b3a75 Merge pull request #501 from xant/upstream
safety belt : scan_directory() can return without setting arr to a valid value
2015-04-01 20:22:20 +01:00
Sergey Lyubka 773efb0745 Respect WEBSOCKET_OPCODE_CONNECTION_CLOSE coming from client 2015-04-01 18:37:13 +01:00
Andrea Guzzo ed1904a75d safety belt : scan_directory() can return without setting arr to a valid value 2015-03-31 12:52:08 +02:00
Sergey Lyubka a66663f0f6 Fix non-openssl build 2015-03-31 10:38:14 +01:00
Sergey Lyubka 1104688b02 Fix win32 build no2 2015-03-25 17:29:34 +00:00
Sergey Lyubka 36d95e230e Fix win32 build 2015-03-25 17:10:58 +00:00
Sergey Lyubka 8a27a95a2a Fix #460 2015-03-24 09:32:16 +00:00
Sergey Lyubka 2e63b5a5e5 Fix #441 2015-03-24 08:04:46 +00:00
Sergey Lyubka 4cbd113d01 Upload multiple files 2015-03-24 07:52:49 +00:00
Sergey Lyubka ba5ae74144 Merge pull request #495 from mmicko/master
OS2 and Android NDK fixes
2015-03-22 17:03:28 +00:00
Miodrag Milanovic f2b40e5fae added comment for time_t change 2015-03-22 17:56:22 +01:00
Sergey Lyubka 8ed682930b Fix #448 2015-03-21 13:17:24 +00:00
Miodrag Milanovic 86ad7922b0 OS2 and Android NDK fixes
Note that in Android NDK st_mtime is long unsigned int
2015-03-21 11:04:57 +01:00
Sergey Lyubka f7476f53c7 Merge pull request #493 from RobertDiPaolo/bugfix/Visual_Studios_Build_Issues
Correctly handle _CRT_SECURE_NO_WARNINGS already being set in project se...
2015-03-20 16:29:11 +00:00
Sergey Lyubka 5d6f7ac8ef Merge pull request #494 from RobertDiPaolo/bugfix/Memory_Leak
Fixed Memory Leak
2015-03-20 16:28:15 +00:00
Sergey Lyubka f16fa5ed55 Merge pull request #492 from RobertDiPaolo/feature/Add_PATCH_Method
Added PATCH to list of valid HTTP Methods.
2015-03-20 16:28:11 +00:00
Sergey Lyubka c0ba32f7a6 Set NS_DISABLE_THREADS ifndef MONGOOSE_ENABLE_THREADS 2015-03-20 15:33:02 +00:00
Sergey Lyubka 409c12a851 Better logic for port resolving 2015-03-18 17:25:46 +00:00
Sergey Lyubka bcdcbf20ee Release 5.6 2015-03-18 17:25:31 +00:00
Sergey Lyubka 8fc5b5a55f Add contribution section to readme 2015-03-18 15:45:52 +00:00
Robert Di Paolo 7cf28a5623 The 'char *ip' variable was being allocated and zeroed but not being used or freed. 2015-03-18 10:04:08 +00:00
Robert Di Paolo 6668c456ac Correctly handle _CRT_SECURE_NO_WARNINGS already being set in project settings. 2015-03-18 09:56:01 +00:00
Robert Di Paolo 98f2476751 Added PATCH to list of valid HTTP Methods. 2015-03-18 09:48:17 +00:00
Sergey Lyubka faeedb2930 Sync main 2015-03-18 09:37:52 +00:00
Sergey Lyubka c8e8f94ffe Sync main 2015-03-17 17:35:31 +00:00
Sergey Lyubka 22aeb6111b Update ReleaseNotes 2015-03-17 17:01:16 +00:00
Sergey Lyubka 2d1d2e6534 SIZE_MAX is not defined on MSVC6, use (size_t) ~0 2015-03-17 17:00:59 +00:00
Sergey Lyubka 05c88a98fc Introduce -dav_root option 2015-03-17 15:34:56 +00:00
Marko Mikulicic 5224afb946 Merge pull request #485 from dsrosario/fix_remove_double_dots 2015-03-17 16:07:46 +01:00
Dinis Rosário 3bd79c7cd5 Fix remove_double_dots_and_double_slashes removing all the dots leading http server to serve wrong URI
If the uri is something like '/js/...jquery.js', remove_double_dots_and_double_slashes will remove the 3 dots and the http server will serves the /js/jquery.js file.
remove_double_dots_and_double_slashes should check if a dot or double dots is followed by a slash (or backslash) and only remove this to avoid disclosure attack.
2015-03-17 16:04:59 +01:00
Sergey Lyubka c52e0744cb Squashed warnings after size_t change 2015-03-17 13:18:15 +00:00
Sergey Lyubka 6c09c303d0 Merge pull request #456 from sebgod/fix-win32-examples-using-extra
Enable building of example/Makefile on Win32
2015-03-17 11:45:36 +00:00
Sergey Lyubka b6fde06990 Merge pull request #486 from mmicko/master
Compile fix
2015-03-16 16:52:48 +00:00
Miodrag Milanovic af892c9726 compile fix for visual studio 2015-03-14 09:02:25 +01:00
Miodrag Milanovic df7ad13680 Compile fix 2015-03-13 20:15:19 +01:00
Sergey Lyubka 057c2d4b42 Merge pull request #484 from davidmilligan/master
fix compiler warnings for 64 bit compilation
2015-03-10 18:40:16 +00:00
David Milligan 6c9b43bcf5 fix compiler warnings for 64 bit compilation 2015-03-09 20:01:09 -04:00
Sergey Lyubka a91438acae Fix #477 2015-03-09 16:09:05 +00:00
Sergey Lyubka a6fa51dbc2 Merge pull request #481 from cesanta/web_server_ssl
web_server_ssl
2015-03-06 14:39:50 +00:00
Alexander Alashkin 6ceac6c84c web_server_ssl 2015-03-06 15:08:57 +02:00
Sergey Lyubka 288efe3c23 Add -DMONGOOSE_ENABLE_THREADS to other examples 2015-03-06 09:29:56 +00:00
Sergey Lyubka 5207545a8b Add -DMONGOOSE_ENABLE_THREADS to proxy server example 2015-03-06 09:28:27 +00:00
Sergey Lyubka 716d524f9b Add -DMONGOOSE_ENABLE_THREADS to Makefile 2015-03-06 09:25:30 +00:00
Sergey Lyubka a434bab767 Merge pull request #480 from cesanta/polarssl_examples_1
websocket_ssl_proxy sample for polarsll
2015-03-06 09:03:38 +00:00
Alexander Alashkin e9633a8d2d websocket_ssl_proxy 2015-03-06 09:32:08 +02:00
Sergey Lyubka c7b6a6f0ea Added mg_websocket_printf() 2015-03-05 10:54:51 +00:00
Sergey Lyubka 6cdb9f7ed3 Merge pull request #474 from mmicko/master
OS/2 patches by KO Myung-Hun
2015-03-04 17:18:16 +00:00
Sergey Lyubka 4502dd0c86 s/MONGOOSE_NO_THREADS/MONGOOSE_ENABLE_THREADS 2015-03-03 18:59:23 +00:00
Sergey Lyubka 95055f6048 Add winsock2.h include for win32 2015-03-03 18:32:14 +00:00
Sergey Lyubka 2c36532ec4 Merge pull request #465 from doug16rogers/vs9-compile-ipv6
Allow for compilation in Visual Studio with NS_ENABLE_IPV6.
2015-03-03 18:28:07 +00:00
Sergey Lyubka f2b0b9c737 Fix Win32 build in mg_websocket_write() 2015-02-24 13:32:22 +00:00
Sergey Lyubka b3866439a0 Fix mg_create_server() signature 2015-02-24 13:17:11 +00:00
Miodrag Milanovic 4f2205a667 OS/2 patches by KO Myung-Hun
Upstream patch from MAME project
2015-02-24 11:12:09 +01:00
Sergey Lyubka 6cec1d36a8 Merge pull request #463 from CurlyMoo/patch-1
Replace obsolete gethostbyname by getaddrinfo
2015-02-19 11:48:35 +00:00
CurlyMoo 4238370ae1 Check for getaddrinfo availability. 2015-02-19 12:09:34 +01:00
Sergey Lyubka b4924b715e Merge pull request #473 from mmicko/master
Fix for MINGW builds
2015-02-17 16:19:37 +00:00
Miodrag Milanovic 7a0385dcac Fix for MINGW builds 2015-02-17 11:08:23 +01:00
Sergey Lyubka 44a146faf6 SSL fixes 2015-02-16 18:34:07 +00:00
Sergey Lyubka 53a55da7bc Add type cast in ns_out() 2015-02-16 18:19:15 +00:00
Sergey Lyubka bf44277764 Define _XOPEN_SOURCE for MinGW build 2015-02-16 18:17:30 +00:00
Sergey Lyubka a2e1da6e30 Add overflow checks 2015-02-12 19:12:58 +00:00
Sergey Lyubka bef3f85ba8 Merge pull request #466 from 0-wiz-0/master
Only define _XOPEN_SOURCE on Linux.
2015-02-10 18:07:07 +00:00
Thomas Klausner eb72a63cca Only define _XOPEN_SOURCE on Linux.
Fixes the build on NetBSD.

The comment says it's only needed on Linux, and AFAIK Linux
is the only operating system that only adds symbols when it's defined;
others, like NetBSD or Solaris, also hide symbols.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2015-01-29 15:02:26 +01:00
Doug Rogers f19bbc73cc Allow for compilation in Visual Studio 9 (2008) with NS_ENABLE_IPV6. 2015-01-29 00:12:35 -05:00
Sergey Lyubka 25326b3b12 net skeleton -> fossa 2015-01-28 12:33:48 +00:00
CurlyMoo 10ee430bfd Add debug line and adapt to styling guide
Replaced tabs with spaces.
2015-01-27 22:55:13 +01:00
CurlyMoo 10d0bfdab4 Replace obsolete gethostbyname by getaddrinfo
This also protect against the latest glibc bug
2015-01-27 22:45:34 +01:00
Sergey Lyubka 6b6637c337 Adopt SSL guide to current way of setting SSL cert. 2015-01-21 17:41:45 +00:00
Sergey Lyubka 878acca213 Removed Lua docs 2015-01-21 17:30:30 +00:00
Sergey Lyubka ace9285966 Updated years 2015-01-19 18:25:14 +00:00
Sergey Lyubka cdc167b0cc Merge pull request #459 from joshcriz/patch-1
Update Makefile
2015-01-19 16:32:24 +00:00
Josh Criz a0dd396b95 Update Makefile
Fixing typo in 'clean' section
2015-01-16 17:59:08 -06:00
Sebastian Godelet 8082501b9c Enable building of example/Makefile on Win32
Adding example/.gitignore to ignore *.exe
Appending -lws2_32 at the end of CFLAGS_EXTRA if running make on
Windows to enable easy compiling under that platform.
Obsoletes pull request #454
2015-01-10 16:41:58 +08:00
Sergey Lyubka e4ad3010be Fix #416 2014-12-30 03:56:29 +00:00
Sergey Lyubka 03a82ef848 Merge pull request #452 from CurlyMoo/patch-2
Typo
2014-12-27 18:25:09 +00:00
CurlyMoo 9459d69dcc Typo 2014-12-27 18:35:09 +01:00
Sergey Lyubka b28662362d Merge pull request #449 from ursine/patch-1
64-bit length fields on ARM don't work
2014-12-21 20:54:52 +00:00
Sergey Lyubka 66450bf3d1 Merge pull request #450 from sebgod/master
mongoose.c: using application/javascript for .js
2014-12-21 16:07:12 +00:00
Sebastian Godelet 478ca05e7a mongoose.c: using application/javascript for .js
As of http://www.rfc-editor.org/rfc/rfc4329.txt, the preferred MIME type
for JavaScript is application/javascript.
2014-12-21 22:16:05 +08:00
Gary Coulbourne 8cad0a72f9 64-bit length fields on ARM don't work
ARM only allows aligned accesses.  GCC generated unaligned accesses for the copy buffer, but ARM forces alignment, causing the first two bytes to be trampled.  I changed the mechanism to create two temporaries and memcpy them in.  It now works on ARM (and x86) for large websocket chunks.
2014-12-17 19:14:30 -05:00
Sergey Lyubka 31178f4d48 Typo fixed in the comment 2014-12-15 12:03:50 +00:00
Sergey Lyubka 7a5485493e Added md5 copyright 2014-12-11 18:01:58 +00:00
Sergey Lyubka d3cbb160f5 Removed travis config file 2014-12-01 11:33:16 +00:00
Sergey Lyubka 45ff2c2c19 Removed $Date$ marker 2014-11-28 14:16:49 +00:00
Sergey Lyubka c3db7b141b Removed $Date$ from header 2014-11-28 12:21:36 +00:00
Sergey Lyubka 0a0ea36ace Fix examples/proxy_server build 2014-11-24 19:33:24 +00:00
Sergey Lyubka 72ed954721 Merge pull request #440 from zapline/patch-1
Update ReleaseNotes.md(spell mistake)
2014-11-20 07:35:24 +00:00
zapline 33e035273a Update ReleaseNotes.md
spell mistake
2014-11-20 09:58:29 +08:00
Sergey Lyubka 223f36c130 Updated Readme 2014-11-17 15:50:02 +00:00
Sergey Lyubka 4c0bc5bd03 Updated Readme 2014-11-17 15:49:37 +00:00
Sergey Lyubka 808a5f6f53 Update README.md 2014-11-13 13:48:43 +00:00
Sergey Lyubka 404e635665 Fixed Android build 2014-11-12 22:16:32 +00:00
Sergey Lyubka 9d7a60a63f Merge pull request #433 from jhnwkmn/malloc
Consistent use of NS_MALLOC, NS_FREE and NS_REALLOC
2014-11-10 10:35:07 +00:00
Johan Wikman ba9c74187b Consistent use of NS_MALLOC, NS_FREE and NS_REALLOC
malloc(), free() and realloc() were used in a number of places.
Added NS_CALLOC as well.
2014-11-10 08:29:19 +02:00
Sergey Lyubka e9d4847cbb Merge pull request #432 from jhnwkmn/o_binary
O_BINARY might be defined.
2014-11-09 10:06:16 +00:00
Sergey Lyubka ea76de07ee Merge pull request #436 from jhnwkmn/no-cgi
MONGOOSE_NO_CGI needs special handling.
2014-11-09 10:04:54 +00:00
Sergey Lyubka 5a8c468ff7 Merge pull request #435 from jhnwkmn/size-macros
Added size macros.
2014-11-09 10:01:59 +00:00
Sergey Lyubka 5b143a6237 Merge pull request #434 from jhnwkmn/no-user
Added MONGOOSE_NO_USER configuration define.
2014-11-09 09:56:31 +00:00
Sergey Lyubka d244a7fdfd Merge pull request #437 from jhnwkmn/nsf-close-immediately
If socket is about to be closed do not add to [read|write]_set.
2014-11-09 09:55:13 +00:00
Johan Wikman 300a27de99 If socket is about to be closed do not add to [read|write]_set.
If NSG_CLOSE_IMMEDIATELY is on, then the socket will be closed,
which means that (if the socket was added to either read_set or
write_set) the subsequent select will in turn be performed on a
socket that has been closed.

Standard socket implementations seem to ignore a descriptor
referring to a closed socket but LWIP
(http://savannah.nongnu.org/projects/lwip/) crashes. So better
not to add to the sets.
2014-11-07 15:48:23 +02:00
Johan Wikman 04a15a0c10 MONGOOSE_NO_CGI needs special handling.
MONGOOSE_NO_CGI is implied by both NS_DISABLE_SOCKETPAIR and
MONGOOSE_NO_FILESYSTEM. Thus, so as not to get complaints about
the same define being defined twice, some extra checks are needed.
2014-11-07 15:29:25 +02:00
Johan Wikman f0f6ae05aa Added size macros.
On very resource constraind devices you need to be able to
control the size of all buffers and structures placed on the
stack.
2014-11-07 14:31:44 +02:00
Johan Wikman 8a7d535d92 Added MONGOOSE_NO_USER configuration define.
Low-end systems, not running a proper OS, may not have the
concept of a user.
2014-11-07 14:01:13 +02:00
Sergey Lyubka e7ac6024de Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-11-07 10:05:51 +00:00
Sergey Lyubka 9981b99ac8 Extra NULL check in iter2(). Fix #430 2014-11-07 10:05:42 +00:00
Johan Wikman 87a36c0c30 O_BINARY might be defined.
Some unix environments defines O_BINARY.
2014-11-07 12:02:11 +02:00
Sergey Lyubka f2b13761c0 Merge pull request #431 from jhnwkmn/reduce-includes
Conditionally include dirent.h and dlfcn.h
2014-11-07 09:51:30 +00:00
Johan Wikman 9786478a31 Conditionally include dirent.h and dlfcn.h
If you do not have a filesystem or do not support dav or
dynamic loading, the corresponding header files need not
be included (some environments might not have them).
2014-11-07 11:05:51 +02:00
Sergey Lyubka 7d236d7f33 Merge pull request #429 from AlexAltea/master
Added #define's for deprecated POSIX names
2014-11-01 20:39:34 +00:00
Alexandro Sánchez Bach e098a7292d Added #define's for deprecated POSIX names 2014-10-30 23:07:48 +01:00
Sergey Lyubka 632b3a38a9 5.5 -> 5.6 2014-10-28 11:43:51 +00:00
Sergey Lyubka 23141c2fef Added 5.5 release notes 2014-10-28 11:42:47 +00:00
Sergey Lyubka c8ba652f1c 5.4 -> 5.5 2014-10-28 11:20:44 +00:00
Sergey Lyubka 6ac2fa2ae6 Updated listening_port for SSL option 2014-10-28 11:20:10 +00:00
Sergey Lyubka 0322ec5647 Include query_string when proxying requests 2014-10-22 12:14:21 +01:00
Sergey Lyubka a5223a9850 Squashed ARM warnings 2014-10-21 15:51:42 +01:00
Sergey Lyubka 016968ada1 Removed net_skeleton dependency from examples/proxy_server 2014-10-17 20:29:39 +01:00
Sergey Lyubka 710b888122 Added -pthread to test/Makefile::CFLAGS 2014-10-17 20:12:29 +01:00
Sergey Lyubka cf53959f34 Fix broken push (type cast) 2014-10-17 20:03:15 +01:00
Sergey Lyubka 30d29fb77f Merge pull request #425 from mpromonet/master
make compile with g++ (fix invalid cast from ‘void*’)
2014-10-17 19:49:59 +01:00
MPR c05b51bbfc make compile with g++ (fix invalid conversion from ‘void*’ to ‘ns_connection*’) 2014-10-16 23:57:14 +02:00
Sergey Lyubka 1ab704ac92 Fixed -DMONGOOSE_NO_DIRECTORY_LISTING build 2014-10-16 10:46:33 +01:00
Sergey Lyubka 2bc77e065c Fixed build 2014-10-15 14:29:22 +01:00
Sergey Lyubka 790daabf7d Enhanced RESTful API example 2014-10-15 11:58:47 +01:00
Sergey Lyubka a6598a1278 Added #define close(x) _close(x) for WIN32 to squash warning 4996 that VS2013 gives 2014-10-15 08:30:49 +01:00
Sergey Lyubka 0af5502b74 Removed redundant #defines for -D_WIN32 case 2014-10-15 08:28:17 +01:00
Sergey Lyubka f059e41cac Removed mg_set_listening_socket() and mg_get_listening_socket(), added mg_copy_listeners() 2014-10-14 15:25:56 +01:00
Sergey Lyubka 2cce91de9a Refactored code for multiple listeners 2014-10-14 14:22:26 +01:00
Sergey Lyubka 0ff5b5b044 Added support for multiple listeners 2014-10-14 13:59:22 +01:00
Sergey Lyubka 0c5d9a98c2 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-10-14 11:10:47 +01:00
Sergey Lyubka c9fbdfc1b5 mg_open() accepts 3rd param: mode 2014-10-14 11:10:42 +01:00
Sergey Lyubka 6193b5171c Merge pull request #421 from mpromonet/master
transmit http answer code using http_client
2014-10-14 11:10:03 +01:00
Sergey Lyubka 911115ccc0 Added -pthread to CFLAGS for linux 2014-10-14 10:05:12 +00:00
Sergey Lyubka 2f3ddeccc5 Properly trim whitespaces from the hashbang CGI interpreter path 2014-10-13 15:57:34 +01:00
MPR ca3f5a3257 follow Google style 2014-10-12 13:58:06 +02:00
MPR df206bc05a transmit http answer code using http_client 2014-10-11 17:56:35 +02:00
Sergey Lyubka 531fec34fd Added missing files 2014-10-10 14:35:39 +01:00
Sergey Lyubka 4c10d1f356 mongoose_server -> web_server 2014-10-10 13:58:45 +01:00
Sergey Lyubka 94dccdd6f4 c# -> csharp 2014-10-10 10:02:58 +01:00
Sergey Lyubka 544352b7d3 moved jni to android_build 2014-10-10 09:51:57 +01:00
Sergey Lyubka 29c2ae4886 moved multi_threaded to separate dir 2014-10-10 09:51:02 +01:00
Sergey Lyubka 1a2e2ec2fd moved proxy to separate dir 2014-10-10 09:48:43 +01:00
Sergey Lyubka 3e780d21fc moved form.c example to separate dir 2014-10-10 09:44:45 +01:00
Sergey Lyubka 63fcea0159 moved form_submit to separate dir 2014-10-10 09:40:07 +01:00
Sergey Lyubka e5d21225be moved big_upload to separate dir 2014-10-10 09:39:12 +01:00
Sergey Lyubka 0c9caf3120 Moved server.c to separate dir 2014-10-10 09:37:18 +01:00
Sergey Lyubka 54ba36c1c9 check_login_form_submission() factored in separate function 2014-10-09 11:44:12 +01:00
Sergey Lyubka 5077350589 Added cookie based auth example 2014-10-09 11:29:39 +01:00
Sergey Lyubka 2d880c4f5c Moved auth.c to separate dir 2014-10-09 09:42:07 +01:00
Sergey Lyubka 4ca4c862a5 Updated net_skeleton, added extra_headers param to mg_send_file() 2014-10-09 09:26:45 +01:00
Sergey Lyubka 0918df1566 Removed reference to chat.c 2014-10-05 17:29:33 +01:00
Sergey Lyubka aa2583cc26 Added enable_proxy 2014-10-03 11:54:00 +01:00
Sergey Lyubka e1b1d39635 Removed conflicting MIT-related comment block 2014-10-01 12:11:04 +01:00
Sergey Lyubka 3bf82dd541 Merge pull request #419 from grodansparadis/master
connection_data -> user_data
2014-09-22 15:03:19 +01:00
Sergey Lyubka 2896965c97 Fixed link to examples 2014-09-20 08:32:29 +01:00
Ake Hedman 53b784b143 connection_data -> user_data 2014-09-19 08:20:37 +02:00
Sergey Lyubka 8e91e3a305 Timeout only non-listening connections 2014-09-16 07:47:40 +01:00
Sergey Lyubka dbc07c8b00 Moved mjpg_streamer to a separate dir 2014-09-15 19:05:30 +01:00
Sergey Lyubka ce953575e2 Not closing listening connections 2014-09-15 13:48:55 +01:00
Sergey Lyubka 80db048578 Added more dependencies in test/Makefile 2014-09-15 01:28:03 +01:00
Sergey Lyubka 382d165574 Added MONGOOSE_NO_MMAP conditional 2014-09-15 01:18:38 +01:00
Sergey Lyubka 0fb2f38cb7 Fixed mg_connect() call 2014-09-14 15:06:09 +01:00
Sergey Lyubka aa007f1285 Updated travis config 2014-09-11 15:55:18 +01:00
Sergey Lyubka 8752910330 Better UDP support 2014-09-11 15:52:42 +01:00
Sergey Lyubka 2a5a8eec49 removed chat_server dir in examples 2014-09-10 00:59:31 +01:00
Sergey Lyubka ceca52de30 Moved file send_file example to separate dir 2014-09-09 23:23:29 +01:00
Sergey Lyubka 8a3691055c Moved file upload example to separate dir 2014-09-09 23:20:23 +01:00
Sergey Lyubka 56d12c89da Typo in hello_world.c fixed 2014-09-09 22:47:07 +01:00
Sergey Lyubka 2cfce4d8b2 Added copyright 2014-09-09 22:46:24 +01:00
Sergey Lyubka f372faf614 Moved hello.c example to its own dir 2014-09-09 22:44:57 +01:00
Sergey Lyubka 882f3b3ac3 removed hello.lp 2014-09-09 18:26:03 +01:00
Sergey Lyubka fac0e9b0ac Moved unit test to dedicated dir 2014-09-09 18:23:48 +01:00
Sergey Lyubka a3cf67c380 Moved examples/mkdata.pl -> scripts/embed_binary_files.pl 2014-09-09 18:11:57 +01:00
Sergey Lyubka 2987cbdb5c ws_ssl -> websocket_ssl_proxy 2014-09-09 18:09:33 +01:00
Sergey Lyubka 6083b9c5c5 Updated to the recent skeleton. SSL address format changed 2014-09-09 18:07:55 +01:00
Sergey Lyubka 83237a02d9 Made local copies of dependencies 2014-09-09 17:03:50 +01:00
Sergey Lyubka 965188bac9 removed chat.c 2014-09-09 17:01:06 +01:00
Sergey Lyubka 66da41d401 Adopted to the recent net_skeleton 2014-09-09 17:00:49 +01:00
Sergey Lyubka cfd334ac6c Moved websocket echo server example 2014-09-09 09:27:35 +01:00
Sergey Lyubka b5f6254c1e Added date marker 2014-09-08 23:30:52 +01:00
Sergey Lyubka dcbd1cbbd1 Moved pubsub example to websocket_chat 2014-09-08 23:29:34 +01:00
Sergey Lyubka a3b568f460 removed lua_ddl.c 2014-09-08 23:22:46 +01:00
Sergey Lyubka 75770aec80 Merge pull request #415 from mmicko/master
Added mg_mmap and mg_munmap utility functions for memory mapping files
2014-09-07 11:55:27 +01:00
Sergey Lyubka 3a8ae7ac17 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-09-06 10:11:43 +01:00
Sergey Lyubka b116b2fa82 mg_poll_server doc corrected 2014-09-06 10:10:22 +01:00
m.milanovic@levi9.com 7806609773 Added mg_mmap and mg_munmap utility functions for memory mapping files 2014-09-04 15:05:42 +02:00
Sergey Lyubka 72f45aa7e2 Merge pull request #414 from mmicko/master
Fixed compile on varois MINGW versions
2014-09-02 12:34:58 +01:00
m.milanovic@levi9.com 5e3e6a6dce Fixed compile on MINGW so it is confirmed working on versions 4.6.x till 4.9.x 2014-09-02 12:11:21 +02:00
Sergey Lyubka 1388bb1db4 Fixed line endings 2014-09-01 21:02:16 +01:00
Sergey Lyubka 3cc0d16f65 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-09-01 20:55:37 +01:00
Sergey Lyubka b50095fa61 Added $Date$ markers 2014-09-01 20:54:12 +01:00
Sergey Lyubka 7ad85219d8 Merge pull request #413 from mcallegari/master
Fixed build warning of signed/unsigned conditional expression
2014-08-30 12:42:09 +01:00
Massimo Callegari 347a249d10 Fixed build warning of signed/unsigned conditional expression 2014-08-30 13:04:11 +02:00
Sergey Lyubka 07d982129a Passing NS events together with the NC pointer 2014-08-29 23:28:34 +01:00
Sergey Lyubka 73f2602ba0 Updated due to ssl_wrapper.h refactoring 2014-08-26 14:42:24 +01:00
Sergey Lyubka 44561d163a updated travis config 2014-08-22 22:39:48 +01:00
Sergey Lyubka c941a1a39a Proper struct mg_connection cleanup in close_local_endpoint() 2014-08-22 16:26:30 +01:00
Sergey Lyubka bee22312bc removed dead code 2014-08-21 04:13:33 +01:00
Sergey Lyubka bdb16c624c Added MG_RECV event and mg_send_file_data() func 2014-08-21 04:09:06 +01:00
Sergey Lyubka e389e70d05 squashed warn in mg_terminate_ssl() 2014-08-20 21:54:09 +01:00
Sergey Lyubka 695559f691 Updated to the latest SSL wrapper 2014-08-13 09:17:20 +01:00
Sergey Lyubka 13be74b4c6 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-08-11 16:20:25 +01:00
Sergey Lyubka 02a1032fd4 updated ssl_wrapper 2014-08-11 16:19:25 +01:00
Sergey Lyubka 788f35b19c Merge pull request #411 from mmicko/master
Make mongoose compile on mingw environment
2014-08-11 15:01:33 +01:00
Miodrag Milanovic 3721efe1e9 Make mongoose compile on mingw environment 2014-08-11 15:27:23 +02:00
Sergey Lyubka e0822ffb78 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-08-08 14:25:58 +01:00
Sergey Lyubka ae7d5a8f94 Bumping up default timeout from 30 to 300 sec 2014-08-08 14:25:44 +01:00
Sergey Lyubka ced7a2e0b5 Merge pull request #410 from zinosat/avoid_largefile_redefinition
Avoid unconditional definition of _LARGEFILE_SOURCE
2014-08-07 22:13:09 +01:00
Davide Viti 5ed6708468 Avoid unconditional definition of _LARGEFILE_SOURCE
On some build systems (i.e. Buildroot), _LARGEFILE_SOURCE is defined
at "higher level" as default CFLAG definition.
This fix avoids the following compilation warning:

mongoose-5.4/mongoose.c:52:0: warning: "_LARGEFILE_SOURCE" redefined [enabled by default]
 #define _LARGEFILE_SOURCE       // Enable fseeko() and ftello() functions
 ^
<command-line>:0:0: note: this is the location of the previous definition
2014-08-07 22:08:12 +02:00
Sergey Lyubka 9fe53f307b Added http client example 2014-08-05 17:14:41 +01:00
Sergey Lyubka c64d30e1f6 removed make_settings.mak 2014-08-05 16:41:14 +01:00
Sergey Lyubka b4c25fc7ba Added ALL_PROGS 2014-08-05 16:40:51 +01:00
Sergey Lyubka b67b618811 Added guard for MONGOOSE_NO_FILESYSTEM 2014-08-04 22:32:24 +01:00
Sergey Lyubka 5a19438f70 Added guard for MONGOOSE_NO_FILESYSTEM 2014-08-04 22:31:59 +01:00
Sergey Lyubka 860addf1e3 MONGOOSE_NO_SOCKETPAIR -> NS_DISABLE_SOCKETPAIR 2014-08-03 18:56:19 +01:00
Sergey Lyubka 03d571a119 Merge pull request #407 from kuiash/master
Populate HTTP warning codes
2014-08-03 18:29:15 +01:00
Sergey Lyubka 0d9ecffc53 Do not dealloc conn->request in mg_forward() 2014-08-03 12:41:15 +01:00
Daniel O'Connell d4c8384b85 ws_ssl example 2014-08-03 12:40:10 +01:00
Sergey Lyubka bd40145301 moved hex dumping to skeleton 2014-08-01 17:35:59 +01:00
Sergey Lyubka 9b42494316 Added general example makefile settings 2014-08-01 13:30:05 +01:00
Sergey Lyubka 2daff6959f Added #define matrix 2014-08-01 09:11:00 +01:00
Sergey Lyubka e9c434a6a1 updated net skeleton 2014-08-01 09:05:50 +01:00
Sergey Lyubka d6fba7e45d Added travis file 2014-08-01 08:08:54 +01:00
Sergey Lyubka 0a0130b90c removed 2014-08-01 07:53:51 +01:00
Sergey Lyubka facf2af66e Clearing off HTTP headers in close_local_endpoint() 2014-07-31 20:05:25 +01:00
Sergey Lyubka cc54195f59 Added mg_forward() 2014-07-31 20:04:59 +01:00
Sergey Lyubka e2fb707d9f Added SSL_CTX_set_mode() 2014-07-30 11:27:37 +01:00
kuiash 7dfff935d6 Populate HTTP warning codes
Includes changing 201 "Server Error" to "Internal Server Error"
List mostly borrowed from here http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
418 and 451 also added
Local testing showed a problem with 202 reported as "Server Error" instead of "Accepted"
2014-07-29 12:48:22 +01:00
Sergey Lyubka 5727a5c0ed Removed lua examples 2014-07-29 07:39:20 +01:00
Sergey Lyubka 268d2e9cbe better explanation for websocket2.c example 2014-07-28 12:19:00 +01:00
Sergey Lyubka 1e7da874a4 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-07-28 12:15:23 +01:00
Sergey Lyubka 7875a8c2bd release notes for 5.4 2014-07-28 12:15:13 +01:00
Sergey Lyubka b0355d45ae Merge pull request #403 from pavel-pimenov/fix-cache-call-stat
stat - function result cache
2014-07-27 11:13:26 +01:00
Sergey Lyubka 91136d7731 Merge pull request #406 from Cykey/master
Set the correct json content-type
2014-07-27 11:12:52 +01:00
Pavel Pimenov 01a058d29b Remove file_stat_t st_cgi; 2014-07-27 13:10:49 +04:00
Pavel Pimenov e6eca1738f 80 characters limit + remove tabs 2014-07-27 12:53:37 +04:00
Pavel Pimenov 2108ec5a0c Fix style for pointer 2014-07-27 12:44:08 +04:00
David M. bc4e47630a Set the correct json content-type
Chance text/json to application/json to comply with the RFC.

See http://www.ietf.org/rfc/rfc4627.txt for more information.
2014-07-26 20:55:59 -04:00
Pavel Pimenov f41c9a2a1f stat - function result cache 2014-07-23 11:26:20 +04:00
Sergey Lyubka 6c77208236 release notes dates 2014-07-21 21:38:45 +01:00
Sergey Lyubka 386d2e5cd4 fix leak in handle_propfind() 2014-07-18 13:00:43 +01:00
Sergey Lyubka b738fdbffa updated net skeleton 2014-07-08 11:28:03 +01:00
Sergey Lyubka b5704850db Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-07-08 11:10:17 +01:00
Sergey Lyubka 9c67e8960e updated certs 2014-07-08 11:10:08 +01:00
Sergey Lyubka d3dff4e1d5 Merge pull request #391 from pavel-pimenov/pvs-studio-fix-zu
Change printf mask %zu -> %lu
2014-07-07 08:58:23 +01:00
Pavel Pimenov 82872e86fd Change printf mask %zu -> %lu
for MS VC++ compatibility http://stackoverflow.com/questions/15610053/correct-printf-format-specifier-for-size-t-zu-or-iu
2014-07-07 09:24:48 +04:00
Sergey Lyubka ac229b6606 Merge pull request #387 from Z-Wave-Me/master
Disallow WebDAV MKCOL/PUT/DELETE requests to protected files
2014-06-28 21:40:11 +01:00
Alex Skalozub a6bf2bcbf4 Should also disallow PROPFIND as well 2014-06-29 00:03:52 +04:00
Alex Skalozub b0cf8304cb Disallow WebDAV MKCOL/PUT/DELETE requests to protected files (like .htpasswd) 2014-06-28 23:14:21 +04:00
Sergey Lyubka 0d9fe39dbb ns_read_from_socket(): calling recv() in a loop until failure 2014-06-25 11:43:07 +01:00
Sergey Lyubka 708af6d9c5 more comments in big_upload.c 2014-06-24 17:09:00 +01:00
Sergey Lyubka e4c71425c9 Added big_upload.c 2014-06-24 17:04:26 +01:00
Sergey Lyubka 6e07215c1c Using Multiple inputs for upload example 2014-06-24 16:35:59 +01:00
Sergey Lyubka ca9603301e removed trailing newline 2014-06-24 16:35:26 +01:00
Sergey Lyubka d6c388042c QNX SSL upload fix 2014-06-23 13:52:07 +01:00
Sergey Lyubka 6f66d794e8 Refactor NS_POLL case in mg_ev_handler 2014-06-20 11:41:13 +01:00
Sergey Lyubka 1389eec784 Added comment for mg_terminate_ssl() call 2014-06-19 09:55:10 +01:00
Sergey Lyubka 6ef795e082 manual mitm for oracle.com 2014-06-19 09:53:38 +01:00
Sergey Lyubka 1e5d258e9e Wording for licensing clarified 2014-06-18 11:30:57 +01:00
Sergey Lyubka 70eb4c4bbc exported mg_terminate_ssl 2014-06-18 10:59:29 +01:00
Sergey Lyubka a639e10a4d squash QNX warning about execle() call 2014-06-17 13:28:45 +01:00
Sergey Lyubka 48750e67f6 ENABLE_PROXY is visible with MONGOOSE_NO_FILESYSTEM 2014-06-17 10:50:47 +01:00
Sergey Lyubka ce60379af6 sending 405 for proxy request if connect is not allowed 2014-06-16 11:27:17 +01:00
Sergey Lyubka e0b9e4abfd Added enable_proxy 2014-06-16 11:06:57 +01:00
Sergey Lyubka 665f205527 squash warning under mingw 2014-06-16 10:46:50 +01:00
Sergey Lyubka 030daaf5d5 squash warning under mingw 2014-06-16 10:44:56 +01:00
Sergey Lyubka 760511ec49 squashed warning around NS_STACK_SIZE 2014-06-16 10:21:31 +01:00
Sergey Lyubka 203688a34b Added comment for Win32 SO_RESUSEADDR 2014-06-13 10:19:46 +01:00
Sergey Lyubka 29f4703e4f Adding zero-length chunk for long-running requests 2014-06-13 07:57:27 +01:00
Sergey Lyubka 3cec6f6745 keeping alive long-lived connections 2014-06-12 10:58:49 +01:00
Sergey Lyubka abcea07641 Fix #373 2014-06-11 20:37:35 +01:00
Sergey Lyubka 6a54704b29 mg_set_option(): always set correct actual listening port 2014-06-11 20:12:23 +01:00
Sergey Lyubka 8a2fbac4c0 Calling event handler in MITM mode before making connection to the target host 2014-06-11 09:56:34 +01:00
Sergey Lyubka 96ce6bac69 ns_server_poll(): setting current_time to now after select() 2014-06-11 09:44:18 +01:00
Sergey Lyubka 50c0b958ff Added -root cmd line flag to proxy example 2014-06-10 12:22:50 +01:00
Sergey Lyubka 44416902d6 Changed debug in do_proxy() 2014-06-10 12:22:30 +01:00
Sergey Lyubka 25e646c1a1 Squashed warnings for MONGOOSE_NO_FILESYSTEM 2014-06-10 10:26:58 +01:00
Sergey Lyubka bd723bdc38 Removed dead code in websocket2.c 2014-06-09 17:33:26 +01:00
Sergey Lyubka 5e57031724 Added pubsub example 2014-06-09 17:26:22 +01:00
Sergey Lyubka c583913290 Added pubsub example 2014-06-09 17:25:08 +01:00
Sergey Lyubka 870ca615de Added mg_next() 2014-06-09 17:24:51 +01:00
Sergey Lyubka 64b51699f8 Added MG_WS_CONNECT 2014-06-09 16:32:56 +01:00
Sergey Lyubka 50a889dac0 Inlined parse_url() 2014-06-04 12:32:47 +01:00
Sergey Lyubka 0ff0788458 Formatting change for mg_send_file() 2014-06-04 12:32:31 +01:00
Sergey Lyubka fec6009edb mg_send_file() doc changed 2014-06-03 18:49:17 +01:00
Sergey Lyubka c4f172a120 Documented mg_send_file() 2014-06-03 18:45:37 +01:00
Sergey Lyubka 464c77314d Amended file sending example 2014-06-03 18:03:13 +01:00
Sergey Lyubka f51ca8d5d1 Added mg_send_file(). Changed sending function to return send_iobuf length. 2014-06-03 18:02:55 +01:00
Sergey Lyubka 7b37e0cb8b Added simplistic flow control in transfer_file_data() 2014-06-03 17:00:52 +01:00
Sergey Lyubka c7925353e7 Added parens around expression to squash warning under QNX SDP 6.6.0 2014-06-03 14:25:54 +01:00
Sergey Lyubka bd23ec4323 Removed a bit of dead code. Added more comments in proxy_event_handler() 2014-05-29 17:40:06 +01:00
Daniel O'Connell 3671b2632d proxy unit test reference implementation 2014-05-29 17:04:28 +01:00
Daniel O'Connell 25115a694c proxy support changes 2014-05-29 17:04:13 +01:00
Sergey Lyubka 2436f9d6c3 squashed win32 warnings 2014-05-22 07:31:19 +01:00
Sergey Lyubka 2238951c18 Integrated Dans net skeleton changes 2014-05-21 16:18:21 +01:00
Daniel O'Connell f266dd2c94 Removed noisy debug messages 2014-05-20 16:40:47 +01:00
Daniel O'Connell b03358cb03 Fixes for the proxy code 2014-05-19 19:08:02 +01:00
Sergey Lyubka 1bede7e28b Added test for parse_url() 2014-05-19 12:56:07 +01:00
Sergey Lyubka 3536670b82 re-worded FAQ section 2014-05-18 16:13:04 +01:00
Daniel O'Connell 3235c05fd6 Added proxy functionality 2014-05-18 13:22:33 +01:00
Daniel O'Connell 63db54e7b5 Added AV faq 2014-05-18 10:53:54 +01:00
Daniel O'Connell 1db51eb788 Moved sse.html to proxy_web_root/index.html 2014-05-13 14:51:16 +01:00
Daniel O'Connell 0e640ae885 Made setopt() wrapper around mg_set_option() 2014-05-13 13:02:08 +01:00
Daniel O'Connell 1bff6df2a7 Enabled SSL for proxy example 2014-05-13 12:33:27 +01:00
Daniel O'Connell d0e66de225 Re-added ssl_ca_certificate option 2014-05-13 12:30:30 +01:00
Daniel O'Connell f537670ce2 Synced net skeleton 2014-05-13 12:28:39 +01:00
Daniel O'Connell 4cb3341a15 Added proxy example, with SSE html page 2014-05-13 11:22:31 +01:00
Daniel O'Connell d52d9a4a6f Added pem files 2014-05-13 11:08:18 +01:00
Daniel O'Connell 4a076c7ea4 Added proxy to the clean target 2014-05-13 10:56:32 +01:00
Sergey Lyubka db6e883c22 Added mg_wakeup_server_ex(), removed mg_wakeup_server() and mg_iterate_over_connections() 2014-05-13 09:33:10 +01:00
Sergey Lyubka 804da054b5 Removed extra line in the comment 2014-05-12 23:24:03 +01:00
Sergey Lyubka fb4e701545 Added mg_wakeup_server_ex() for pushing data 2014-05-12 23:22:57 +01:00
Sergey Lyubka ccff4abf13 Added proxy target 2014-05-12 10:47:08 +01:00
Sergey Lyubka 24a7936907 Squashed warning for non-ssl case in ns_set_ssl_ca_cert() 2014-05-11 16:05:07 +01:00
Sergey Lyubka 0993994139 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-05-11 13:43:10 +01:00
Sergey Lyubka 8b740536de Added ssl_ca_certificate option 2014-05-11 13:42:59 +01:00
Sergey Lyubka e851aac853 Merge pull request #371 from cry-inc/master
Fixed wrong behavior of mg_set_option() with option "listening_port" caused by SO_REUSEADDR when using Windows
2014-05-07 17:00:36 +01:00
cry-inc a39861b7bf Fixed wrong behavior of mg_set_option() with option "listening_port" caused by SO_REUSEADDR when using Windows 2014-05-07 16:38:23 +02:00
Sergey Lyubka 63490249ba Merge pull request #368 from cry-inc/master
Fixed wrong MIME type for .rar files
2014-04-30 10:45:09 +01:00
cry-inc 704f057384 Fixed wrong MIME type for .rar files 2014-04-30 10:30:35 +02:00
Sergey Lyubka 40968bc496 Moved other products in a different section 2014-04-30 09:18:55 +01:00
Sergey Lyubka 6873f3c5f6 Removed idle_timeout_ms 2014-04-29 18:01:25 +01:00
Sergey Lyubka ba5cd7267a Added MONGOOSE_SEND_NS_EVENTS to the embedding doc 2014-04-28 15:04:39 +01:00
Sergey Lyubka 1bb98e5e8e Exported mg_websocket_printf(), mg_url_encode(). Added unit test for mg_url_encode() 2014-04-25 18:04:24 +01:00
Sergey Lyubka a7774d0f1a Added mg_websocket_printf(). added MONGOOSE_SEND_NS_EVENTS 2014-04-24 14:09:54 +01:00
Sergey Lyubka f52c756fbb Calling SSL_free() in ns_close_conn() 2014-04-16 16:45:31 +01:00
Sergey Lyubka cc586c6ba2 php->basic 2014-04-15 14:13:38 +01:00
Sergey Lyubka 606eab7f4f Passing PUT content to the event handler 2014-04-14 16:14:13 +01:00
Sergey Lyubka 872b85b5f2 more on -access_control_list 2014-04-14 13:03:47 +01:00
Sergey Lyubka 35bd2b6032 Added form.c 2014-04-10 22:18:01 +01:00
Sergey Lyubka c5287b9044 iobuf_append() refactored: allocating exactly as many bytes as needed 2014-04-09 23:52:16 +01:00
Sergey Lyubka 223f6d960e README message changed 2014-04-09 18:10:49 +01:00
Sergey Lyubka 464b895116 Added enum for websocket opcodes 2014-04-09 15:16:03 +01:00
Sergey Lyubka 05d7b7c8bc Added MG_WS_HANDSHAKE 2014-04-09 11:55:36 +01:00
Sergey Lyubka d8b4db37a0 Squashed warnings 2014-04-09 11:37:08 +01:00
Sergey Lyubka 6bb49c780c Updated net skeleton code 2014-04-09 11:32:23 +01:00
Sergey Lyubka 3a60c5764d Unit test target corrected 2014-04-07 19:07:41 +01:00
Sergey Lyubka a8b38e4ab9 mg_set_option() sets NULL if value is empty 2014-03-31 15:02:20 +01:00
Sergey Lyubka 8750f8af1f Added cast in try_parse() 2014-03-31 09:51:47 +01:00
Sergey Lyubka e94a02dc12 Added more in 5.4 release notes 2014-03-31 09:49:42 +01:00
Sergey Lyubka 5680b0fcc5 Removed redundant cast in try_parse() 2014-03-31 09:34:31 +01:00
Sergey Lyubka 33c56b0edc Init local_ip and local_port properly in mg_connection 2014-03-30 22:50:10 +01:00
Sergey Lyubka e62e48397d Keeping absolute path for config file 2014-03-30 16:00:03 +01:00
Sergey Lyubka 8be30350be mg_set_option(): allow NULL as value. Fast success if old_value == new_value. 2014-03-30 15:59:39 +01:00
Sergey Lyubka 2609a2ab72 Fixed comment for mg_template() 2014-03-30 12:47:27 +01:00
Sergey Lyubka 5a04ab2c56 Added mg_template() function 2014-03-30 12:45:48 +01:00
Sergey Lyubka 4739de6c28 Removed DLL interface and Lua conditional 2014-03-30 12:34:32 +01:00
Sergey Lyubka 639d7a2fd8 Fixing MinGW compilation: pid_t -> process_id_t 2014-03-28 09:18:38 +00:00
Sergey Lyubka 8115ce1d82 Handling SSL_write() error 2014-03-27 11:18:20 +00:00
Sergey Lyubka 3558b587b7 Fixed linking problem for -DMONGOOSE_NO_FILESYSTEM 2014-03-27 10:13:34 +00:00
Sergey Lyubka e21ec58ea8 dav fixes: using auth if auth file is set 2014-03-26 23:13:14 +00:00
Sergey Lyubka 74135bca7d link fixed 2014-03-26 18:58:58 +00:00
Sergey Lyubka d369f31608 return 404 for non-existent propfind URIs 2014-03-26 16:34:55 +00:00
Sergey Lyubka d4b14ca3c1 Better API documentation 2014-03-26 14:13:30 +00:00
Sergey Lyubka f0994896d5 FileSharing doc nitpick 2014-03-26 12:27:44 +00:00
Sergey Lyubka cfdd430b98 Added hexdump_file option 2014-03-26 12:20:02 +00:00
Sergey Lyubka a6c05a9e83 changed handle_propfind() to report only dir entry when listing dir 2014-03-24 20:39:32 +00:00
Sergey Lyubka 94f63787bb Restored void * parameter for iterate_over_connections() 2014-03-24 16:01:45 +00:00
Sergey Lyubka 367f5df328 match_prefix -> mg_match_prefix 2014-03-24 16:00:17 +00:00
Sergey Lyubka f096138d6e Added release note 2014-03-23 20:02:41 +00:00
Sergey Lyubka 0d00cd51e6 Fix #356 2014-03-23 19:59:03 +00:00
Sergey Lyubka b216210a13 Moving lua server side to server.c 2014-03-23 15:33:39 +00:00
Sergey Lyubka 166833f330 Added release notes 2014-03-21 11:47:52 +00:00
Sergey Lyubka 4d6bedfd4e Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-03-20 15:01:18 +00:00
Sergey Lyubka ace8c1736c Added mg_load_dll() 2014-03-20 15:01:05 +00:00
Sergey Lyubka c658a54d18 changed set_absolute_path() signature 2014-03-20 14:58:37 +00:00
Sergey Lyubka 781a1dc25e Merge pull request #352 from ranzhengyuan/some-idea
I think that when the socket invalid, the return value should be -1.
2014-03-20 10:34:18 +00:00
冉正源 3ea3b8dfa4 I think that the socket is invalid, the return should be -1. 2014-03-19 22:32:41 +08:00
Sergey Lyubka a514e143ff updated faw and tutorials 2014-03-19 11:41:01 +00:00
Sergey Lyubka e1486a79e3 Merge pull request #350 from solomonhuang/nodav
Remove MONGOOSE_NO_DAV on DAV_AUTH_FILE options
2014-03-19 11:25:15 +00:00
Sergey Lyubka ee615248e3 Merge pull request #351 from da4089/master
Tyop fix.
2014-03-19 09:33:58 +00:00
David Arnold 687e0e2ee8 Tyop fix. 2014-03-19 04:49:47 +00:00
Solomon Huang 19aefcb7dd Remove MONGOOSE_NO_DAV on DAV_AUTH_FILE options
Building with -DMONGOOSE_NO_DAV will fail.
2014-03-19 01:53:02 +08:00
Sergey Lyubka 6a46244a21 embedding guide for MG_POLL fixed 2014-03-14 08:19:54 +00:00
Sergey Lyubka 60674c11c9 API docs regarding MG_POLL changed 2014-03-13 12:23:53 +00:00
Sergey Lyubka 91c9ab807b Forwarding POST data to the CGI process 2014-03-12 22:43:04 +00:00
Sergey Lyubka 9231c7346c match_prefix -> mg_match_prefix 2014-03-12 18:35:36 +00:00
Sergey Lyubka 20cb3a823a Added ecos & qnx 2014-03-12 14:19:36 +00:00
Sergey Lyubka cbd8d69e6d Added hello world for Lua 2014-03-12 12:47:41 +00:00
Sergey Lyubka f7fcfa6a42 Fixed C# example to work with 5.3 2014-03-12 12:31:53 +00:00
Sergey Lyubka 293c5e5852 Moved screenshots down 2014-03-11 16:59:17 +00:00
Sergey Lyubka ceb866b4ee Using img tags for screenshots 2014-03-11 16:57:38 +00:00
Sergey Lyubka 2f9166e96e Added screenshots for mongoose 2014-03-11 16:51:54 +00:00
Sergey Lyubka fe0e0e69e5 File sharing tutorial wording 2014-03-11 15:36:23 +00:00
Sergey Lyubka db96641c10 Added logo 2014-03-11 06:13:59 +00:00
Sergey Lyubka fe83928ca4 Added logo 2014-03-11 06:11:56 +00:00
Sergey Lyubka 014414f17f Docs links made separate 2014-03-11 06:07:06 +00:00
Sergey Lyubka 6ffe2d7f7a Typo fixed in readme 2014-03-11 06:04:44 +00:00
Sergey Lyubka 30c82d7efe Wording in README changed 2014-03-11 06:03:20 +00:00
Sergey Lyubka 999c4ad26c 5.3 -> 5.4 2014-03-10 17:02:00 +00:00
Sergey Lyubka 30a7965135 added lsp link 2014-03-10 11:21:52 +00:00
Sergey Lyubka a8a017a048 docs updated 2014-03-10 09:23:06 +00:00
Sergey Lyubka eac8ffabc4 docs updated 2014-03-10 09:19:01 +00:00
Sergey Lyubka a7a17711ec Resetting endpoint_type in open_local_endpoint() 2014-03-10 08:35:41 +00:00
Sergey Lyubka 18e28ef879 Added lua includes 2014-03-09 20:22:51 +00:00
Sergey Lyubka ce7515fca9 Merge pull request #349 from jhorneman/master
Exposing Lua support functions
2014-03-09 20:18:49 +00:00
Jurie Horneman d5a78fb664 Fixed bug. 2014-03-09 21:12:34 +01:00
Jurie Horneman 1b3a1b74ac Exposed Lua support functions. 2014-03-09 21:11:06 +01:00
Sergey Lyubka 8dd76e6ef4 Using ns_start_thread() 2014-03-09 19:50:34 +00:00
Sergey Lyubka 976b5f37c1 Added Lua callback 2014-03-09 19:30:41 +00:00
Sergey Lyubka 31489ab7b1 Lua fixes 2014-03-09 19:26:58 +00:00
Sergey Lyubka 1eb59940a4 Re-init rewrites var in convert_uri_to_file_name() 2014-03-09 13:27:39 +00:00
Sergey Lyubka 576d769b56 Corrected links in tutorials 2014-03-09 13:13:25 +00:00
Sergey Lyubka afaba7ee17 Lua calls, birth_time fixed 2014-03-09 13:13:13 +00:00
Sergey Lyubka 40f257ef2b lua build instructions fixed 2014-03-09 13:12:49 +00:00
Sergey Lyubka 5840dc8153 Links updated 2014-03-07 17:08:23 +00:00
Sergey Lyubka 5ed3dafb56 Added warning about PHP 5.5 2014-03-07 14:46:24 +00:00
Sergey Lyubka b99bf306ec fixed image links 2014-03-07 14:40:34 +00:00
Sergey Lyubka 89fae72aa7 added 2014-03-07 14:24:37 +00:00
Sergey Lyubka ab147e8f19 Added MONGOOSE_NO_SSI to MONGOOSE_NO_FILESYSTEM 2014-03-06 13:37:23 +00:00
Sergey Lyubka 81a78f9c8b Added query string to access log 2014-03-05 11:22:23 +00:00
Sergey Lyubka 370aeefdde Added error pages and vhosts to readme 2014-03-05 11:19:18 +00:00
Sergey Lyubka c5407a75f4 #define EV_HANDLER NULL in server.c 2014-03-05 10:12:43 +00:00
Sergey Lyubka 7217aa22f1 Embedded guide 2014-03-05 02:53:19 +00:00
Sergey Lyubka 69bd5f7aa2 SSL_accept logic fix 2014-03-05 02:19:05 +00:00
Sergey Lyubka 41b3c1b23e warning squashed in convert_uri_to_file_name() 2014-03-05 01:59:58 +00:00
Sergey Lyubka f639409533 warning squashed in convert_uri_to_file_name() 2014-03-05 01:59:32 +00:00
Sergey Lyubka 67c44799c8 SSL_accept() error handling fix 2014-03-05 01:57:09 +00:00
Sergey Lyubka 4646e2ad55 Added mjpg example 2014-03-04 20:23:37 +00:00
Sergey Lyubka b77532ea3f Added mjpg example 2014-03-04 20:22:46 +00:00
Sergey Lyubka ed8168e8a1 Added virtual hosts support via url_rewrites 2014-03-04 16:15:02 +00:00
Sergey Lyubka 39e2d2ad55 Appending query_string to the URI when redirecting on HTTP error 2014-03-04 15:01:05 +00:00
Sergey Lyubka 27c6656398 SSL_accept fixes 2014-03-04 13:23:40 +00:00
Sergey Lyubka ffe83051fe build fixed 2014-03-04 13:15:56 +00:00
Sergey Lyubka 93cd77ffad Changed links 2014-03-03 21:18:57 +00:00
Sergey Lyubka 279c06c64c Cleaned up cruft from mongoose.h 2014-03-03 10:56:17 +00:00
Sergey Lyubka 570c8213b6 Cleaned unit test 2014-03-03 10:54:35 +00:00
Sergey Lyubka f521999ea6 Calling EP_CLIENT on close 2014-03-03 10:27:56 +00:00
Sergey Lyubka e41df3cf9c MG_REQ_BEGIN -> MG_REQUEST, killed MG_REQ_END, add MG_REPLY. Restored server test 2014-03-03 10:26:27 +00:00
Sergey Lyubka 65f484291f got rid of multiline comment 2014-03-03 09:45:00 +00:00
Sergey Lyubka 77db89961b mg_stat() fix for paths like X:\ 2014-03-03 01:00:38 +00:00
Sergey Lyubka ad50310bb6 Added index.shtml to index files 2014-03-02 19:49:15 +00:00
Sergey Lyubka 66ec3d1f1e Added defines for popen and pclose, for SSI under Win32 2014-03-02 18:50:02 +00:00
Sergey Lyubka a9da86d05c Mentioned SSI 2014-03-02 18:28:40 +00:00
Sergey Lyubka 5f25a88821 Restored SSI functionality 2014-03-02 18:27:51 +00:00
Sergey Lyubka fd7dc33645 unbroke unit test 2014-03-02 17:20:24 +00:00
Sergey Lyubka 9c22771a43 Merge pull request #345 from nielsegberts/master
Also clean up multi_threaded and websocket_html.c on make clean
2014-03-02 15:48:25 +00:00
Niels Egberts 11640cc3c6 Also clean up multi_threaded and websocket_html.c on make clean 2014-03-02 14:55:34 +00:00
Sergey Lyubka 2264520a2f Example changed to evented API 2014-03-02 13:05:00 +00:00
Sergey Lyubka 2f0b411ddd Added -pthread flag to unix compilation example 2014-03-02 13:00:44 +00:00
Sergey Lyubka e0aceb4f3a Fixed windows build for examples 2014-03-02 12:23:53 +00:00
Sergey Lyubka ea9a60a59a Updated examples to conform to the evented API 2014-03-02 12:16:09 +00:00
Sergey Lyubka 458320cffb Fixed #343 in conn2() for Lua 2014-03-02 10:12:12 +00:00
Sergey Lyubka e0214af422 Using private ns_avprintf() in mg_printf_data() 2014-03-02 10:07:30 +00:00
Sergey Lyubka df5e997ea7 ns_server_poll() waking up by ns_server_wakeup() 2014-03-01 01:55:40 +00:00
Sergey Lyubka 0a3cb63c73 Added mg_wakeup_server() 2014-03-01 01:47:01 +00:00
Sergey Lyubka 37f7f3fb12 Merge pull request #339 from nenioscio/master
Fix issue #338
2014-03-01 01:19:31 +00:00
Sergey Lyubka 2ac970fa16 Moving to event-based API, temporary breaking tests 2014-03-01 01:17:39 +00:00
Sergey Lyubka de35a353d4 pphp -> php 2014-02-27 22:02:18 +00:00
Klaus Wagner dbbda02f70 Fix issue #338 2014-02-27 22:12:46 +01:00
Sergey Lyubka 725c30446c more docs 2014-02-25 20:39:34 +00:00
Sergey Lyubka 60473ae41a more docs 2014-02-25 20:39:00 +00:00
Sergey Lyubka 951d20f904 Added coniditional to use net_skeleton separately 2014-02-25 18:52:23 +00:00
Sergey Lyubka 85a6abd58b Clearing flags in close_local_endpoint() 2014-02-25 12:02:45 +00:00
Sergey Lyubka 2fbe09ad7c Restored jni build dir for Android 2014-02-25 08:12:42 +00:00
Sergey Lyubka 23325efab2 Added time.h 2014-02-25 08:10:19 +00:00
Sergey Lyubka 107902bae4 add_to_set(): fix around non-negative SOCKET on Windows 2014-02-24 08:22:40 +00:00
Sergey Lyubka 9bbf4c8384 Fixed problem with mg_printf_data() 2014-02-22 16:11:47 +00:00
Sergey Lyubka c39a712540 Win32 build fix 2014-02-21 14:13:06 +00:00
Sergey Lyubka e9f6111ba1 re-added signal.h 2014-02-20 17:47:07 +00:00
Sergey Lyubka ba267a32fd squashed warning in read_from_socket 2014-02-20 17:44:47 +00:00
Sergey Lyubka f64ebbe0b1 Guarded on_cgi_data() call by ifdef, thanks to Pavel Pimenov 2014-02-20 12:33:46 +00:00
Sergey Lyubka 8865dd5e84 Moved unit_test.c to examples 2014-02-20 12:13:59 +00:00
Sergey Lyubka ce57f47de0 Added missing signal.h 2014-02-20 09:49:42 +00:00
Sergey Lyubka 48be2dbc2a Added conditional for handling idle websocket conns 2014-02-20 07:32:33 +00:00
Sergey Lyubka 8905522a94 Setting last_io_time in ns_add_sock() 2014-02-20 06:26:44 +00:00
Sergey Lyubka eea1680cf9 open_cgi_endpoint() strrchr fix 2014-02-19 16:44:01 +00:00
Sergey Lyubka d5004cb7eb PF_INET -> AF_INET, unbreaks FreeBSD 2014-02-19 16:39:30 +00:00
Sergey Lyubka 1d1a05bf39 Embedded net_skeleton 2014-02-19 16:38:53 +00:00
Sergey Lyubka 2009069037 merge 2014-02-19 16:36:27 +00:00
Sergey Lyubka 8f7703c2a9 moved to net_skeleton 2014-02-19 16:34:51 +00:00
Sergey Lyubka 8e87c4f013 Merge pull request #329 from abimaelmartell/fix/freebsd-compilation
fix compilation under FreeBSD
2014-02-14 23:46:07 +00:00
Abimael Martell 639a6dc2a8 fix compilation under FreeBSD 2014-02-14 13:21:14 -08:00
Sergey Lyubka cead9a04ca Typo fixed 2014-02-11 15:21:54 +00:00
Sergey Lyubka e528093027 Formatted example 2014-02-11 15:20:19 +00:00
Sergey Lyubka c432b783fb Formatted example 2014-02-11 15:19:18 +00:00
Sergey Lyubka e06976836f Typo fixed 2014-02-11 15:18:20 +00:00
Sergey Lyubka c9f7407573 More comments in example 2014-02-11 15:16:55 +00:00
Sergey Lyubka a40e59dbe6 URL corrected 2014-02-11 09:56:10 +00:00
Sergey Lyubka 61ee3d36d0 Merge pull request #324 from eichin/patch-1
doc typos
2014-02-11 09:55:47 +00:00
Mark Eichin 94dbf21ffb doc typos
just saw them while reading...
2014-02-11 03:41:09 -05:00
Sergey Lyubka 998425b14b Styling changes for hexdump 2014-02-10 10:21:57 +00:00
Sergey Lyubka 6900dd733a Merge pull request #322 from pavel-pimenov/master
Fix copy-paste for MONGOOSE_HEXDUMP feature
2014-02-10 09:48:26 +00:00
Pavel Pimenov 9e4cd054c8 Fix copy-paste for MONGOOSE_HEXDUMP feature 2014-02-10 12:00:51 +04:00
Sergey Lyubka 5dc317fcb0 Added -DMONGOOSE_HEXDUMP feature 2014-02-09 20:57:11 +00:00
Sergey Lyubka fbd5d77ce8 Added note about CGI env vars 2014-02-07 20:23:37 +00:00
Sergey Lyubka 6f8751b479 chat server is going to be in its own dir 2014-02-07 13:04:02 +00:00
Sergey Lyubka 877c4dc698 websocket example responses: 15 times -> 3 times 2014-02-07 13:03:28 +00:00
Sergey Lyubka 2dfc79129a better lua build 2014-02-07 13:03:11 +00:00
Sergey Lyubka 416f4bf10f Merge pull request #321 from pavel-pimenov/master
Add #ifndef MONGOOSE_NO_FILESYSTEM
2014-02-07 07:45:20 +00:00
Pavel Pimenov f9a99530ff Add #ifndef MONGOOSE_NO_FILESYSTEM 2014-02-07 11:02:12 +04:00
Sergey Lyubka 940b65e4db Merge pull request #320 from xant/upstream
added a new handler callback to be used when the http connection is being closed
2014-02-06 21:00:17 +00:00
Andrea Guzzo b22f7d3a49 added a new handler callback to be used when the http connection is being closed
so that in case of connections closed prematurely, the user can clear resources
eventually bound to the connection using the 'connection_param' member of the
mg_connection structure
2014-02-06 11:22:13 +01:00
Sergey Lyubka eaa0e26a85 Starting to rebuild chat example on Lua 2014-02-06 10:18:30 +00:00
Sergey Lyubka a3a63f7e56 Using mg_connection::callback_param for mg_iterate_over_connection() 2014-02-06 10:00:20 +00:00
Sergey Lyubka c9036f3ac0 Added workaround for non-compliant runtimes in alloc_vprintf() 2014-02-05 12:33:36 +00:00
Sergey Lyubka 60858d7fe5 NO_WEBSOCKET -> MONGOOSE_NO_WEBSOCKET 2014-02-04 19:57:00 +00:00
Sergey Lyubka 1c914bde1d Merge pull request #316 from To1ne/master
use `mg_set_request_handler`
2014-02-04 11:55:52 -08:00
Toon Claes a487332aa0 use mg_set_request_handler 2014-02-04 20:48:38 +01:00
Sergey Lyubka 3987d4d560 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-02-04 18:13:10 +00:00
Sergey Lyubka 8d3181e0bf examples/html -> examples/chat_html_root 2014-02-04 18:13:02 +00:00
Sergey Lyubka 0f1a59aeb4 Increased env buf size 4096 -> 8192. Passing TMPDIR to CGI. 2014-02-04 18:11:56 +00:00
Sergey Lyubka 2cdf259940 Merge pull request #315 from To1ne/patch-1
Correct return values: PROCESSED or CALL_AGAIN
2014-02-04 06:51:41 -08:00
Toon Claes 0187fe943a Correct return values: PROCESSED or CALL_AGAIN 2014-02-04 15:24:32 +01:00
Sergey Lyubka a34d1ec00a Better handling of MONGOOSE_NO_SOCKETPAIR 2014-02-04 14:04:54 +00:00
Sergey Lyubka e70d98b7b0 Added fixes for eCos 2014-02-04 09:59:53 +00:00
Sergey Lyubka bea012a3c1 Removed redundant addenv call 2014-02-04 08:06:49 +00:00
Sergey Lyubka eb2d470f65 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-02-03 17:54:46 +00:00
Sergey Lyubka 652c352394 Passing SERVER_NAME, TMP and TEMP env vars to CGI. 2014-02-03 17:54:31 +00:00
Sergey Lyubka f1b37b3101 Merge pull request #313 from xant/upstream
bugfix: set the correct status if we still have pending data
2014-02-03 04:52:10 -08:00
Sergey Lyubka 81b9876af8 5.2 -> 5.3 2014-02-01 16:53:09 +00:00
Sergey Lyubka 7010addadb NO_AUTH -> MONGOOSE_NO_AUTH 2014-02-01 15:17:13 +00:00
xant 9e118c8a31 bugfix: set the correct status if we still have pending data 2014-01-31 19:09:12 +01:00
Sergey Lyubka 2fc654ac35 page.lp -> dirscan.lp 2014-01-30 17:49:37 +00:00
Sergey Lyubka 45861c7890 Disabling options if functionality is not enabled 2014-01-30 14:54:02 +00:00
Sergey Lyubka 1957879e10 Casting to int in mg_sprintf() call in handle_cgi 2014-01-29 12:34:51 +00:00
Sergey Lyubka ddbe690698 CGI directory logic fixed 2014-01-29 11:42:14 +00:00
Sergey Lyubka 9ba1596c46 Closing connection after mg_send_digest_auth() 2014-01-29 01:24:21 +00:00
Sergey Lyubka de509ae952 Fix around pid_t for mingw, thanks to Jay 2014-01-28 20:09:12 +00:00
Sergey Lyubka 77817cd019 Squashed the warnings 2014-01-28 13:42:26 +00:00
Sergey Lyubka 7083bea56b mg_parse_header(): allowing no spaces for comma-separated list 2014-01-28 13:01:28 +00:00
Sergey Lyubka 3dffd7604a Removed warnings 2014-01-28 12:55:20 +00:00
Sergey Lyubka 5a67af0c73 Using 1 ms in mg_poll_server 2014-01-28 12:51:27 +00:00
Sergey Lyubka 14526a2109 mg_add_uri_handler -> mg_set_request_handler() 2014-01-28 12:42:13 +00:00
Sergey Lyubka a6cfbd2536 docs URL changed 2014-01-28 10:48:27 +00:00
Sergey Lyubka 0d28f99275 wrapped pid_t and S_ISDIR definitions into ifndef for mingw build 2014-01-27 11:12:43 +00:00
Sergey Lyubka a281e99661 calling auth handler wrapped in MONGOOSE_NO_AUTH 2014-01-27 11:10:46 +00:00
Sergey Lyubka 170df7b676 local and remote port made unsigned short 2014-01-27 11:08:32 +00:00
Sergey Lyubka 3fa5c69f98 Fixed handle_delete() stat call 2014-01-27 11:06:05 +00:00
Sergey Lyubka e31f3058fa Added test for rewrites 2014-01-27 11:03:44 +00:00
Sergey Lyubka 83a9a726d3 Checking path existence 2014-01-26 11:24:24 +00:00
Sergey Lyubka 8ae0400b0d Added ability to set "0" as listening port. Exported local_ip and local_port to the client. 2014-01-25 13:50:57 +00:00
Sergey Lyubka 037fdbcccb Ignoring chdir() return value. Resetting mg_conn in close_local_endpoint() 2014-01-25 09:45:47 +00:00
Sergey Lyubka 5d2ac4e0a6 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-01-24 20:50:21 +00:00
Sergey Lyubka f977757a9d Added mg_set_auth_handler() 2014-01-24 20:49:57 +00:00
Sergey Lyubka 1db13aeed5 Merge pull request #304 from xant/master
allow to define a default mime-type
2014-01-24 09:51:51 -08:00
Andrea Guzzo 956788d7de changed mg_get_mime_type to expect the default type as argument
instead of using a configuration option
2014-01-24 15:56:21 +01:00
Andrea Guzzo 45f6612096 allow to define a default mime-type to use when lookup in the internal table fails
instead of always returning 'text/plain'

To allow setting a different default mime-type the mg_get_mime_type() api has been
extended to require an mg_server parameter.

Note that using a static global as default mime type wouldn't have allowed us to
control it via a configuration option because there is not global initialization phase
and configuration options are provided (and specific) to each server instance.
This means that different servers can be configured to use a different default mime-type
(which is also a desired behaviour in many scenarios) when lookup fails.
2014-01-24 14:45:19 +01:00
Sergey Lyubka 2392156fd4 Not exiting on a wrong option, best effort to recover 2014-01-23 20:57:27 +00:00
Sergey Lyubka cf1811f8c3 Added build instruction for windows 2014-01-23 12:00:40 +00:00
Sergey Lyubka 93c5335d80 USE_POST_SIZE_LIMIT -> MONGOOSE_USE_POST_SIZE_LIMIT, and unit test added 2014-01-23 11:24:00 +00:00
Sergey Lyubka 192205b10b Added 2014-01-23 10:36:08 +00:00
Sergey Lyubka 0377eea9c5 Added enum for callback return codes 2014-01-22 18:25:05 +00:00
Sergey Lyubka ad89868564 Moved must_hide_file to under #ifndef MONGOOSE_NO_FILESYSTEM 2014-01-22 18:24:28 +00:00
Sergey Lyubka 976f286134 Made mg_connection::content_len int -> size_t, which is 64-bit on 64-bit systems 2014-01-20 20:57:21 +00:00
Sergey Lyubka 503a1a749d Added unit test for MONGOOSE_USE_SSL 2014-01-20 20:50:30 +00:00
Sergey Lyubka 45a4266172 more examples added 2014-01-20 11:21:35 +00:00
Sergey Lyubka 2ea17e8c6d Adjusted docs and makefile to use correct preproc flags 2014-01-20 11:17:09 +00:00
Sergey Lyubka 67b7d79710 Removed comment about MONGOOSE_USE_STACK_SIZE 2014-01-20 11:10:30 +00:00
Sergey Lyubka 2e35e25935 ENABLE_DBG -> MONGOOSE_ENABLE_DEBUG, USE_STACK_SIZE -> MONGOOSE_USE_STACK_SIZE 2014-01-20 11:04:12 +00:00
Sergey Lyubka d86d409d3c Preprocessor definitions prefixed by MONGOOSE_ 2014-01-20 10:54:15 +00:00
Sergey Lyubka 1109d3aa3c Guarded #define EINPROGRESS 2014-01-20 09:02:57 +00:00
Sergey Lyubka 8208d9e250 Fixed -DUSE_SSL build 2014-01-20 09:01:16 +00:00
Sergey Lyubka fdd086b11c moved discard_leading_iobuf_bytes() out from conditional 2014-01-20 08:55:34 +00:00
Sergey Lyubka 5825e3ea74 Adding use_ssl to mg_connect() 2014-01-20 08:55:03 +00:00
Sergey Lyubka 061ba99124 Using vnotify() for die() 2014-01-20 08:54:06 +00:00
Sergey Lyubka ead098f726 Setting server_name 2014-01-19 17:01:43 +00:00
Sergey Lyubka 7a129c17ba Added http client with unit tests 2014-01-19 16:32:43 +00:00
Sergey Lyubka 400084ea8a read_from_client -> read_from_socket 2014-01-17 16:58:19 +00:00
Sergey Lyubka 82ad9a073a Calling long running connections regardless of select() status 2014-01-17 16:37:35 +00:00
Sergey Lyubka 22aea8acac Better comment for websocket example 2014-01-17 16:37:05 +00:00
Sergey Lyubka 40e5c744da Calling long-running URI handlers on each poll iteration 2014-01-17 15:49:16 +00:00
Sergey Lyubka e648681f1d Moved mg_connect() 2014-01-17 15:42:35 +00:00
Sergey Lyubka 02f19fc05a Using mg_handler_t for iterate_over_connections() 2014-01-17 11:45:57 +00:00
Sergey Lyubka 7690f9e34b Fixed websocket example, and websocket callback calling logic. 2014-01-17 10:17:15 +00:00
Sergey Lyubka 65c1278975 win32 build of server.c fixed 2014-01-16 14:40:26 +00:00
Sergey Lyubka 05e1135940 Added stand-alone console executable 2014-01-16 13:53:18 +00:00
Sergey Lyubka 7b6e8fb93c Moved idle_timeout_ms into compile-time option 2014-01-16 13:23:23 +00:00
Sergey Lyubka 9f1679e900 Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-01-15 18:05:43 +00:00
Sergey Lyubka c0af018e20 removed build dir 2014-01-15 18:02:55 +00:00
Sergey Lyubka d553ae992a Unit test moved to top 2014-01-15 17:55:39 +00:00
Sergey Lyubka 89ef8f2f30 Removed method checks for CGI 2014-01-15 11:46:05 +00:00
Sergey Lyubka 9115a99f47 Fixed scanf format in parse_port_string() 2014-01-15 11:06:37 +00:00
Sergey Lyubka bbc65c7987 put_deleve_auth_file -> dav_auth_file. added placeholders for user 2014-01-15 07:57:59 +00:00
Sergey Lyubka bac0f75dd6 int sock -> sock_t sock 2014-01-15 07:10:09 +00:00
Sergey Lyubka 6440c358c1 C++ friendliness fix 2014-01-14 23:20:23 +00:00
Sergey Lyubka 6f84c8bbfb Using unicode API for service creation 2014-01-14 21:05:35 +00:00
Sergey Lyubka 0adbfcba96 Moved send_options out of NO_DAV conditional 2014-01-14 19:28:29 +00:00
Sergey Lyubka 136c3e8200 Eat prior POST data in close_local_endpoint() 2014-01-14 13:57:55 +00:00
Sergey Lyubka 7d699ea73c Added URI handler return value 2014-01-14 13:27:00 +00:00
Sergey Lyubka fc37b08139 URI handler status code drives streaming behavior 2014-01-14 13:16:58 +00:00
Sergey Lyubka 3aaf47d4e4 Return 1 from the URI handler 2014-01-14 12:50:13 +00:00
Sergey Lyubka 346179d1f1 keep-alive for all EP_USER requests 2014-01-14 00:44:27 +00:00
Sergey Lyubka 0148bc804a Added NO_THREADS wrapper 2014-01-13 21:35:45 +00:00
Sergey Lyubka 472e198d4a Fixed mg_parse_header to allow NULL strings 2014-01-13 21:31:18 +00:00
Sergey Lyubka bf6fc3262f Added test for static config opts 2014-01-13 21:08:03 +00:00
Sergey Lyubka 53311e8d6b removed ssi tests 2014-01-13 20:39:22 +00:00
Sergey Lyubka cc636197bc Added auth example 2014-01-13 17:58:14 +00:00
Sergey Lyubka 6b4f7e785d Added upload example 2014-01-13 17:01:11 +00:00
Sergey Lyubka 73ed83c5e3 Added mg_parse_multipart 2014-01-13 16:29:12 +00:00
Sergey Lyubka 56f128514e Implemented mg_set_http_error_handler() 2014-01-13 12:17:47 +00:00
Sergey Lyubka f0571f9fd6 Using mg.request_info.content 2014-01-13 10:58:14 +00:00
Sergey Lyubka a3663da90e Exposed mg_send_digest_auth_request(). Exported conn->content to Lua 2014-01-13 10:50:26 +00:00
Sergey Lyubka f74a1e1dc2 Fixed start_process on windows to use correct interpreter 2014-01-12 07:20:53 +00:00
Sergey Lyubka 74511b42f5 Using unicode winapi to load config file 2014-01-12 07:20:12 +00:00
Sergey Lyubka 04862eec85 Added wp target 2014-01-12 07:18:29 +00:00
Sergey Lyubka 4d105386ca Better handling of non-ascii chars for windows CGIs 2014-01-11 23:17:17 +00:00
Sergey Lyubka 44a35bb5bf Removed debug statement 2014-01-11 23:15:02 +00:00
Sergey Lyubka 022c9f0d47 Handling non-ascii chars in the binary 2014-01-11 21:32:05 +00:00
Sergey Lyubka e38061970e Exposed mg_authorize_digest() 2014-01-11 16:44:37 +00:00
Sergey Lyubka a4e8dc3069 Sending status 200 to CGI by default 2014-01-11 16:18:59 +00:00
Sergey Lyubka fa4179ee53 Made clean silent 2014-01-11 16:18:29 +00:00
Sergey Lyubka a8c8cfb665 fix non-initialized comparison 2014-01-11 10:09:26 +00:00
Sergey Lyubka e0b6109214 Added -DNO_FILESYSTEM 2014-01-11 09:48:27 +00:00
Sergey Lyubka d29f849602 Fixed optional build test 2014-01-11 09:48:13 +00:00
Sergey Lyubka 848c5d753e Fixed logic for get_url_to_me 2014-01-11 03:19:46 +00:00
Sergey Lyubka 4eef5b14fb Added comment to https://github.com/cesanta/mongoose/pull/287 2014-01-10 22:48:47 +00:00
Sergey Lyubka 283af71bbf Merge pull request #287 from oli-obk/fix/last_send_data_before_shutdown
mg_printf_data was ignored if mg_destroy_server was called directly afte...
2014-01-10 14:47:00 -08:00
Sergey Lyubka ff85b802c3 Using case-insensitive string comparison for connection: keep-alive 2014-01-10 22:46:03 +00:00
Sergey Lyubka e2b42e4117 Using case-insensitive string comparison for connection: keep-alive 2014-01-10 22:43:52 +00:00
Sergey Lyubka 63909b59c5 Added __cdecl to SSL decls to make sure correct linkage with OpenSSL which is cdecl 2014-01-10 22:41:36 +00:00
Sergey Lyubka 7380c65265 5.1 -> 5.2 2014-01-10 22:37:26 +00:00
Sergey Lyubka e9316a4feb CGI fixes 2014-01-10 21:59:37 +00:00
Oliver Schneider 2ac231cb7e mg_printf_data was ignored if mg_destroy_server was called directly after 2014-01-10 18:38:18 +01:00
Sergey Lyubka a741d53028 Fixed leak for server creation/destroy 2014-01-10 11:23:29 +00:00
Sergey Lyubka 9ea7b6f8ae Removed unnecessary buffer initializer 2014-01-10 11:11:26 +00:00
Sergey Lyubka 580d3da3c7 Using unicode winapi for stat(), fopen(), open() 2014-01-10 11:03:38 +00:00
Sergey Lyubka aa59dda966 wrapped read_from_cgi() into NO_CGI 2014-01-09 17:50:57 +00:00
Sergey Lyubka 47b92e4145 Added string defs for 301 and 302 codes in status_code_to_str() 2014-01-09 17:24:20 +00:00
Sergey Lyubka fa351959a0 5.0 -> 5.1 2014-01-09 14:08:50 +00:00
Sergey Lyubka 1414e2a236 Documented rewrites for HTTP errors 2014-01-09 12:47:29 +00:00
Sergey Lyubka 5fb275e146 Added URL rewrites for HTTP errors, to allow for error pages. 2014-01-09 12:36:25 +00:00
Sergey Lyubka 9390c66b48 Moved next_option() to the rest of string functions 2014-01-09 12:34:50 +00:00
Sergey Lyubka 2f69ca37d3 Better CGI error diagnostic for UNIX 2014-01-09 10:53:25 +00:00
Sergey Lyubka 4cd11de400 Ping only websocket connections 2014-01-09 10:37:17 +00:00
Sergey Lyubka 15a2639355 Added better diagnostic to send_http_error() 2014-01-09 10:35:43 +00:00
Sergey Lyubka c20f26dbb9 removed mg_fmt() 2014-01-09 09:58:19 +00:00
Sergey Lyubka cae797cf04 Merge branch 'master' of https://github.com/cesanta/mongoose 2014-01-09 09:37:35 +00:00
Sergey Lyubka 0d885add0e Fixed put_dir() 2014-01-09 09:36:58 +00:00
Sergey Lyubka 842231cc5c GetFullPathNameA -> GetFullPathName 2014-01-08 18:20:13 +00:00
Sergey Lyubka dc55a3ae40 Added #undef UNICODE in mongoose.c to force ANSI Win32 functions 2014-01-08 18:10:15 +00:00
Sergey Lyubka 4d85cc6c76 Removed -Wno-empty-translation-unit from unix CFLAGS :-) 2014-01-08 09:27:16 +00:00
Sergey Lyubka 8ac1b40c11 Added -Wno-empty-translation-unit to the unix CFLAGS 2014-01-08 09:19:56 +00:00
Sergey Lyubka 238b43af84 Squashed warnings for gcc 4.6.3 2014-01-08 09:16:36 +00:00
Sergey Lyubka 12c8e99bd5 Removed error_log_file from tests config 2014-01-07 14:57:08 +00:00
EC2 Default User 5f2f359bd6 Squashed warning under gcc 4.6.3 2014-01-07 14:53:48 +00:00
Sergey Lyubka ccf0ce4a1f Using chunked API in post.c example 2014-01-07 09:28:20 +00:00
Sergey Lyubka 134a5b7b9e Using chunked API in multi-threaded example 2014-01-07 09:24:48 +00:00
Sergey Lyubka d39daab29e Updated docs 2014-01-07 09:12:17 +00:00
Sergey Lyubka a798b1a937 Updated docs 2014-01-07 09:10:58 +00:00
Sergey Lyubka 04de3bb2f9 Updated docs 2014-01-07 09:05:34 +00:00
Sergey Lyubka 86da250e2c Using fat mongoose for php bundle 2014-01-06 14:58:21 +00:00
Sergey Lyubka 347a8c2f70 Fix source IP in logging 2014-01-06 14:53:41 +00:00
Sergey Lyubka 9624200663 SSL build 2014-01-06 13:31:46 +00:00
Sergey Lyubka 18b1e95350 LSP functionality 2014-01-06 13:08:39 +00:00
Sergey Lyubka 407877a4d5 added mongoose-lua.exe target 2014-01-06 12:40:41 +00:00
Sergey Lyubka 7541c6339a Removed error_log_file 2014-01-06 11:52:09 +00:00
Sergey Lyubka 31f1efd4f5 Removed index.shtml from the index files 2014-01-06 11:34:32 +00:00
Sergey Lyubka 2477f80a43 Wrapped run_as_user into conditional 2014-01-06 11:32:15 +00:00
Sergey Lyubka cf94fb3642 Added BIG_SOURCES 2014-01-06 11:29:36 +00:00
Sergey Lyubka 2210043b87 removed mutex calls. wrapped ssl_certificate option in a conditional 2014-01-06 11:22:11 +00:00
Sergey Lyubka 10872b3227 Inlined openssl definitions instead of including a header - preparing for ssl amalgamation 2014-01-05 23:52:43 +00:00
Sergey Lyubka cb324cfb9a test/page.mg.lua -> test/page.lp 2014-01-05 01:50:47 +00:00
Sergey Lyubka 4ee5849a04 Fixed spelling in readme 2014-01-05 00:01:31 +00:00
Sergey Lyubka fa216849e5 Resetting connection flags in close_local_endpoint() 2014-01-04 22:17:16 +00:00
Sergey Lyubka df6e35e330 dav_auth_file moved 2014-01-04 20:49:54 +00:00
Sergey Lyubka 96bb9aac36 Docs updated 2014-01-04 20:12:07 +00:00
Sergey Lyubka 7cec2fe280 Sorted options list 2014-01-04 20:11:55 +00:00
Sergey Lyubka 02937f8852 API doc synced 2014-01-04 14:28:20 +00:00
Sergey Lyubka 51f0cc2b67 Embed doc synced 2014-01-04 14:25:37 +00:00
Sergey Lyubka 253927008c Options doc synced 2014-01-04 14:20:47 +00:00
Sergey Lyubka 9778a4ccfc Options doc synced 2014-01-04 14:18:14 +00:00
Sergey Lyubka d0e2741832 Added new response creation interface 2014-01-04 11:31:55 +00:00
Sergey Lyubka 3a5e2fba88 5.0 lua example 2014-01-04 02:16:52 +00:00
Sergey Lyubka 85940c8045 Moved <netdb.h> to under unix includes 2014-01-04 02:05:18 +00:00
Sergey Lyubka a0b599b308 Removed protection from mg_write(). Refactored mg_iterate_over_connections() 2014-01-04 00:51:07 +00:00
Sergey Lyubka d43ccda9a7 Unbroke link to page.lp 2014-01-03 22:18:38 +00:00
Sergey Lyubka 675b83a3ef Let mongoose binary change CWD to document_root 2014-01-03 21:45:13 +00:00
Sergey Lyubka dfdfcc060d Merge branch 'master' of ssh://github.com/valenok/mongoose 2014-01-03 20:26:52 +00:00
Sergey Lyubka 143fb4f423 Fixed macos build 2014-01-03 20:26:41 +00:00
Sergey Lyubka b7eb12017c Update README.md 2014-01-03 03:29:42 +00:00
Sergey Lyubka bd1c6c1506 Update README.md 2014-01-03 03:29:09 +00:00
Sergey Lyubka efb7f4f05d Added frozen 2014-01-03 03:06:50 +00:00
Sergey Lyubka 5475fe661d Implemented USE_POST_SIZE_LIMIT 2013-12-31 13:57:51 +00:00
Sergey Lyubka 8f62822a33 Using mg_printf() 2013-12-31 13:57:19 +00:00
Sergey Lyubka 0aa1a9e324 Documented USE_POST_SIZE_LIMIT, USE_EXTRA_HTTP_HEADERS 2013-12-31 13:56:59 +00:00
Sergey Lyubka 7a77bb1c4a More descriptive comment in multithreaded example 2013-12-31 09:06:21 +00:00
Sergey Lyubka 4576b69e30 Initializing remote_ip and remote_port properly 2013-12-31 09:02:24 +00:00
Sergey Lyubka 4fd6eb597d Squashed C++ warning 2013-12-30 12:10:35 +00:00
Sergey Lyubka 257dacd7bb Squashed warning about dangerous optimization 2013-12-30 11:43:07 +00:00
Sergey Lyubka c88b7b19b3 Squashed warning on Windows, using INVALID_SOCKET 2013-12-30 11:35:33 +00:00
Sergey Lyubka 4fbfb5d0d0 Expanded hello example a little 2013-12-27 19:50:14 +00:00
Sergey Lyubka 67c678270e Minor wording changes for feeatures 2013-12-27 18:32:24 +00:00
Sergey Lyubka 049db9015b Mentioned async core 2013-12-26 12:55:50 +00:00
Sergey Lyubka 9dde225b5e Squashed C++ warning in read_from_cgi() 2013-12-26 11:45:44 +00:00
Sergey Lyubka 3a0a22f4cc Add an ability to pass listening socket to mongoose binary 2013-12-26 11:37:52 +00:00
Sergey Lyubka b4a4b15835 Removed old cruft 2013-12-26 11:33:19 +00:00
Sergey Lyubka dca2eab152 removed stdio.h 2013-12-26 10:21:09 +00:00
Sergey Lyubka f9f212442c Added comment 2013-12-26 10:20:02 +00:00
Sergey Lyubka 83793aadde Removed num_threads 2013-12-26 10:14:13 +00:00
Sergey Lyubka f7a705c40a Added multi-threaded example 2013-12-26 10:13:04 +00:00
Sergey Lyubka f5f6edcf5a Added mg_printf() back 2013-12-26 10:12:18 +00:00
Sergey Lyubka 9cb1048c66 Added lightweight feature 2013-12-26 09:33:26 +00:00
Sergey Lyubka 522a7eb554 Added socket functionality 2013-12-24 11:33:56 +00:00
Sergey Lyubka 072833acd5 Squashed win32 warnings 2013-12-23 10:01:11 +00:00
Sergey Lyubka a5aa08e408 Restored post.c in windows example build 2013-12-23 08:09:59 +00:00
Sergey Lyubka 12d98a1732 Restores post.c example 2013-12-23 08:06:35 +00:00
Sergey Lyubka a6c2c2a10b Comparing URI prefix when looking for URI handler 2013-12-23 08:06:10 +00:00
Sergey Lyubka fbe1914226 Copy -> Download and copy 2013-12-23 07:22:05 +00:00
Sergey Lyubka 64a744055f Added notes on buffering POST data and websocket data 2013-12-22 08:27:23 +00:00
Sergey Lyubka 0007e47c07 Build command re-worded 2013-12-22 08:27:02 +00:00
Sergey Lyubka 4708cce8bd mg_poll_server() returns currect time. add mg_set_listening_socket() and mg_get_listening_socket() 2013-12-21 20:52:54 +00:00
Sergey Lyubka 3eb9156e60 calling iterate_over_connections() from the IO thread 2013-12-21 20:26:55 +00:00
Sergey Lyubka 2990f9328a struct linked_list_link -> struct ll 2013-12-21 20:10:08 +00:00
Sergey Lyubka a0befd65a0 Nitpick wording 2013-12-21 16:06:00 +00:00
Sergey Lyubka 872ad8badf Added NO_* and USE_* flag descriptions 2013-12-21 16:04:22 +00:00
Sergey Lyubka 0970e080d9 Added OpenSSL support 2013-12-21 15:50:11 +00:00
Sergey Lyubka 52fe1461d5 Removed SSI 2013-12-21 14:44:29 +00:00
Sergey Lyubka d5b33adb88 Properly crafting HTTP reply line by parsing CGI reply headers 2013-12-21 10:53:20 +00:00
Sergey Lyubka ec84a148f0 Creating server ctl socket in a loop to protect from interrupt 2013-12-21 10:19:12 +00:00
Sergey Lyubka 77d5d4c921 Added sldr reference 2013-12-21 08:34:02 +00:00
Sergey Lyubka 58dab48156 Using unsigned char in deliver_websocket_frame() arithmetic 2013-12-20 17:59:07 +00:00
Sergey Lyubka 7abb406d0f put_delete_auth_file -> dav_auth_file 2013-12-20 17:57:13 +00:00
Sergey Lyubka b941dcd5c5 Removed throttle option 2013-12-20 13:34:09 +00:00
Sergey Lyubka b7adf9b52a Passing server_param to the URI callback 2013-12-20 09:44:51 +00:00
Sergey Lyubka 28f7d83a74 Commented out chat example, as it is broken atm 2013-12-19 10:46:12 +00:00
Sergey Lyubka 34ee1ef3d6 Commented out chat example, as it is broken atm 2013-12-19 10:45:41 +00:00
Sergey Lyubka e518517456 Commented out chat example, as it is broken atm 2013-12-19 10:42:39 +00:00
Sergey Lyubka 7d0662f1bc Make WEBSOCKET_PING_INTERVAL_SECONDS overridable from the command line 2013-12-18 10:13:31 +00:00
Sergey Lyubka e3751d29d5 Made mongoose send websocket PINGs automatically 2013-12-18 09:35:36 +00:00
Sergey Lyubka 04b9ccca22 Testing server PINGs 2013-12-18 09:35:19 +00:00
Sergey Lyubka 1a17165227 Sending messages every 10 seconds, to allow mongoose send PINGs 2013-12-18 09:34:36 +00:00
Sergey Lyubka b6d968f00c Added qcomm example to the build 2013-12-18 09:33:59 +00:00
Sergey Lyubka a69987a711 Updated internals manual 2013-12-16 13:45:13 +00:00
Sergey Lyubka 492328474d Only hello example left, adopted to the new API 2013-12-16 13:33:50 +00:00
Sergey Lyubka 673a2c581f Removed http client, and examples references 2013-12-16 13:32:54 +00:00
Sergey Lyubka 9ef42621e0 Fixed wrong memset() in scan_directory() 2013-12-15 10:12:19 +00:00
Sergey Lyubka f5865886b2 Respecting -run_as_user 2013-12-12 20:31:43 +00:00
Sergey Lyubka 473e2a1cb2 Added <signal.h> for linux, and squashed warning in transfer_file_data() 2013-12-12 13:51:14 +00:00
Sergey Lyubka 146cf1d1c0 Calling mg_socketpair() in a loop until success. Ignoring SIGPIPE. Squashed waring in mg_start_thread() 2013-12-12 13:43:59 +00:00
Sergey Lyubka ab73055ef3 Added side-effect note for mg_create_server() 2013-12-12 13:41:33 +00:00
Sergey Lyubka 3b83543592 Commented out irrelevant design description 2013-12-10 23:49:37 +00:00
Sergey Lyubka d4ac96c24d Some wording/spelling changes 2013-12-10 23:42:44 +00:00
Sergey Lyubka 0612129a88 Async API 2013-12-10 23:34:08 +00:00
Sergey Lyubka 9bd5903f1d API.md is split to API.md and Embed.md 2013-12-10 11:16:25 +00:00
Sergey Lyubka d4eae0e251 Added minimalistic example 2013-12-10 00:40:32 +00:00
Sergey Lyubka 4d7ea04dd8 Added cast for c++ friendliness 2013-12-10 00:19:33 +00:00
Sergey Lyubka 653fab6b41 Added skeleton lua support 2013-12-09 15:53:35 +00:00
Sergey Lyubka f4c30b746e Switched to async, non-blocking core 2013-12-09 14:18:49 +00:00
Sergey Lyubka 923e5004e8 Added CFLAGS_EXTRA to windows compilation flags 2013-12-09 11:53:55 +00:00
Sergey Lyubka b14a1e25f0 Not generating mongoose.c 2013-12-08 18:39:03 +00:00
Sergey Lyubka 5a3b1123f6 tests moved under build 2013-12-07 17:47:14 +00:00
Sergey Lyubka 6a9494b683 Added mg_get_var() to core, with unit test 2013-12-07 17:46:56 +00:00
Sergey Lyubka 63c5658a2b Fixed lua compilation under linux 2013-12-07 17:45:59 +00:00
Sergey Lyubka fe087cdce9 Fixed lsp_sock_send(), return value 2013-12-07 17:45:34 +00:00
Sergey Lyubka af7efd980c Adjusting unit test for core 2013-12-06 22:14:55 +00:00
Sergey Lyubka 2cb325c981 Added DAV to core 2013-12-06 16:01:41 +00:00
Sergey Lyubka 66435a7158 Removed speed limit feature 2013-12-06 13:02:44 +00:00
Sergey Lyubka 48417ba911 Formatting change in overview 2013-12-06 13:00:33 +00:00
Sergey Lyubka f39c4c8909 Added directory listing support to core 2013-12-06 12:55:28 +00:00
Sergey Lyubka 2a7e720f12 app code moved to qcomm.c 2013-12-06 08:53:30 +00:00
Sergey Lyubka ec22250d9b Added mg_iterate_over_connections(), mg_websocket_write() 2013-12-06 08:52:42 +00:00
Sergey Lyubka a7889756a9 Made qcomm example compile 2013-12-06 08:23:26 +00:00
Sergey Lyubka 9ac67770eb mongoose5 example 2013-12-05 23:16:12 +00:00
Sergey Lyubka 3330bca4be Using mg_handler_t 2013-12-05 16:21:53 +00:00
Sergey Lyubka 31f0409bf9 Added CGI endpoint 2013-12-05 15:03:38 +00:00
Sergey Lyubka ebf9ee089b Do not send 500 when timing out getreq() 2013-12-05 11:12:07 +00:00
Sergey Lyubka 88cf329490 Closing connection on 5xx errors 2013-12-05 10:47:03 +00:00
Sergey Lyubka bba29d32ce Using socketpair for inter-thread communication 2013-12-05 10:01:11 +00:00
Sergey Lyubka 2f1f408882 Added qc test 2013-12-05 04:14:58 +00:00
Sergey Lyubka 46a9e42b8f Async websockets work 2013-12-05 04:14:10 +00:00
Sergey Lyubka 58d3abe165 Fixed iterate_callback() 2013-12-05 00:52:42 +00:00
Sergey Lyubka 03e737829a Made URI handler work 2013-12-05 00:22:21 +00:00
Sergey Lyubka 95d8881454 Fixed spool() to properly resize, commented out non-implemented API 2013-12-04 10:19:55 +00:00
Sergey Lyubka a50a52ca91 Fixed #259 2013-12-04 10:11:12 +00:00
Sergey Lyubka 50371ef309 Introduced file_stat_t to use 64 bit file support on Windows 2013-12-03 12:08:45 +00:00
Sergey Lyubka 6192d1b53a Added send_http_error() 2013-12-03 11:12:43 +00:00
Sergey Lyubka daa9175139 Added caching support (304 response) 2013-12-03 11:01:43 +00:00
Sergey Lyubka 8a65611a8c Using core.h and modified API 2013-12-02 22:22:22 +00:00
Sergey Lyubka 6c8a0aa768 denying directory accesses 2013-12-01 10:49:25 +00:00
Sergey Lyubka 787b15551d builtin mime types defs moved to top 2013-12-01 10:28:00 +00:00
Sergey Lyubka 2c896e7e5c Added proper static file handling, but range support is still broken 2013-12-01 10:25:31 +00:00
Sergey Lyubka 0e49214c7e Added mutex protection for write calls 2013-12-01 09:46:05 +00:00
Sergey Lyubka 914606a046 fmtspool() -> mg_write() 2013-12-01 07:44:38 +00:00
Sergey Lyubka b30417e908 Made core c++ friendly 2013-12-01 00:42:04 +00:00
Sergey Lyubka 5b8d4cdf68 main(argc,argv) -> main(void) 2013-12-01 00:35:22 +00:00
Sergey Lyubka ba06d135c3 Added call_user() 2013-12-01 00:33:26 +00:00
Sergey Lyubka f0d3d7e81d Cleaning up ctl sockets 2013-11-30 23:59:53 +00:00
Sergey Lyubka d1bd15291e request pipelining done 2013-11-30 23:23:38 +00:00
Sergey Lyubka d00b7f4300 Serving files 2013-11-28 20:44:11 +00:00
Sergey Lyubka ebc909b61b Added copyright 2013-11-27 14:10:51 +00:00
Sergey Lyubka 537fb39b21 Async, non-blocking experiment 2013-11-27 14:09:34 +00:00
Sergey Lyubka e106151072 Showing port number on mongoose icon context menu 2013-11-26 22:17:29 +00:00
Sergey Lyubka 257de0709f Better wording for put_delete_auth_file option 2013-11-25 17:06:24 +00:00
Sergey Lyubka 774a819e76 Better description for put_delete_auth_file option 2013-11-25 17:05:12 +00:00
Sergey Lyubka ff1412f29d Better description for put_delete_auth_file option 2013-11-25 17:04:41 +00:00
Sergey Lyubka c6606c714f Removed symbian-specific #defines. Nokia and Symbian got killed by Microsoft. 2013-11-25 14:32:33 +00:00
Sergey Lyubka de3d4e3019 Formatted hyperlinks 2013-11-25 13:45:48 +00:00
Sergey Lyubka 2f49e63d5b Moved docstrings to API.md 2013-11-25 13:43:12 +00:00
Sergey Lyubka 988b40f70d Moved webdav functions into webdav.c 2013-11-24 17:33:05 +00:00
Sergey Lyubka b5fdd48d76 Moved websocket functions into websocket.c 2013-11-24 17:29:21 +00:00
Sergey Lyubka f4f73a8dfa Init vars in handle_cgi_request() 2013-11-23 15:04:35 +00:00
Sergey Lyubka 74711c686f Added directory scanning example, and enabled posix routines in Lua for unix environment 2013-11-23 13:58:27 +00:00
Sergey Lyubka 78c994f7cc Added /I. for CL flags 2013-11-23 13:58:01 +00:00
Sergey Lyubka 2d5d668863 Squashed warning 2013-11-23 13:48:55 +00:00
Sergey Lyubka 87279f3518 Throttling functionality removed 2013-11-23 13:47:07 +00:00
Sergey Lyubka bd10a03da0 Throttling functionality removed 2013-11-23 13:46:45 +00:00
Sergey Lyubka d138119d24 Made separate target for mongoose-lua-sqlite 2013-11-23 13:44:33 +00:00
Sergey Lyubka 73019665fa moved mg_upload() into upload.c 2013-11-23 10:49:13 +00:00
Sergey Lyubka 66824e7757 moved CGI and IO into separate files 2013-11-23 10:47:35 +00:00
Sergey Lyubka 7fe6b29218 mg_get_cookie() moved to string.c 2013-11-23 10:32:43 +00:00
Sergey Lyubka ebdf973af9 log_access() moved to log.c 2013-11-23 10:31:24 +00:00
Sergey Lyubka 71dd7a96c7 mg_url_decode() moved to string.c 2013-11-23 10:26:28 +00:00
Sergey Lyubka 886dcb3f5d get_request_len() moved to string.c 2013-11-23 10:25:20 +00:00
Sergey Lyubka 37751a2875 directory ops moved to directory.c 2013-11-23 10:24:25 +00:00
Sergey Lyubka 45347bd44c Moved mime-type functions to mime.c 2013-11-23 07:48:46 +00:00
Sergey Lyubka 8c4521af03 moved remove_double_dots_and_double_slashes() to string.c 2013-11-23 07:46:11 +00:00
Sergey Lyubka 0d2a8db626 Added #define for WSAPoll 2013-11-22 13:39:57 +00:00
Sergey Lyubka e791a795b4 typo fixed 2013-11-22 08:45:04 +00:00
Sergey Lyubka 03d846529d Update README.md 2013-11-13 03:04:31 +00:00
Sergey Lyubka 607651a3ff Squashed warning for MG_REQUEST_END 2013-11-11 17:18:48 +00:00
Sergey Lyubka 0714e0dd8f Updated Android build 2013-11-04 21:15:01 +00:00
Sergey Lyubka 224d18589f Fixed -DNO_SSL build 2013-11-02 10:24:30 +00:00
Sergey Lyubka 2fd7191836 Squashed C++ void * casting warning 2013-10-30 23:04:35 +00:00
Sergey Lyubka 853d162b55 removed double def for ssl_sw 2013-10-30 23:02:36 +00:00
Sergey Lyubka 762a68a0cf Moved some docs to markdown 2013-10-30 23:02:15 +00:00
Sergey Lyubka 1da098671e Moved docstrings to API.md 2013-10-19 14:07:46 -07:00
Sergey Lyubka f852a4db0f Moved docstrings to API.md 2013-10-19 13:14:16 -07:00
Sergey Lyubka ddea940690 Docs added 2013-10-18 08:57:59 -07:00
Sergey Lyubka 292e43b41b Removed unit test dependency 2013-10-15 13:11:47 -07:00
Sergey Lyubka 915e923e35 Firing MG_HTTP_ERROR 2013-10-10 07:46:19 -07:00
Sergey Lyubka e6ac3af454 Removed debug message 2013-10-07 17:29:53 +01:00
Sergey Lyubka 3adaf8dba9 Reaping zombies properly 2013-10-07 17:29:07 +01:00
Sergey Lyubka 1777cc6e86 Squashed warning 2013-10-07 17:28:53 +01:00
Sergey Lyubka f9f623bd60 c# example synced to the current version, and tested 2013-10-06 12:16:46 +01:00
Sergey Lyubka fe95707b4e Rewording 2013-10-06 07:24:34 +01:00
Sergey Lyubka a631ee1e1e Service code refactored 2013-10-05 07:45:05 +01:00
Sergey Lyubka 493666dac6 Wording and links corrected 2013-10-03 19:34:27 +01:00
Sergey Lyubka 46ef4e33c8 Wording and links corrected 2013-10-03 19:34:00 +01:00
Sergey Lyubka cafaecfc56 Moved HTTP client, ssl and some util code into separate files 2013-10-03 19:09:35 +01:00
Sergey Lyubka 47606a71ee Moved unix and win32 code to different files 2013-10-02 23:21:13 +01:00
Sergey Lyubka eedfedd13b Added reference to a relevant pull request in getreq() comment 2013-10-01 19:09:29 +01:00
Sergey Lyubka 87d841d81b Set content_len to 0 for GET requests without Content-Length header. 2013-10-01 18:49:44 +01:00
Sergey Lyubka 5153eebc9b mg_read() does not block on content_len=0. mg_read() reads until socket is closed if content-length is not provided 2013-10-01 17:47:32 +01:00
Sergey Lyubka 70154f6c23 Moved mod_lua.c to src/lua.c 2013-10-01 15:16:09 +01:00
Sergey Lyubka d3577b7877 Moved auth code to separate file 2013-10-01 14:54:26 +01:00
Sergey Lyubka 199e0a330f Moved options handling to src/options.c 2013-09-30 19:57:33 +01:00
Sergey Lyubka a8da1b3334 Moved date parsing in build/src/parse_date.c 2013-09-30 19:51:16 +01:00
Sergey Lyubka 63c19b4631 Moved to unix file format 2013-09-30 13:11:24 +01:00
Sergey Lyubka 1f471e1cf3 Moved string functions to src/string.c 2013-09-30 13:09:16 +01:00
Sergey Lyubka ef28c37529 Removed mg_get_request_info() 2013-09-30 13:02:36 +01:00
Sergey Lyubka cd7e1b9eb7 Moved more ssl defs to internal.h 2013-09-30 12:59:43 +01:00
Sergey Lyubka 226d476856 Moved more defines to internal.h. Squashed some warnings in win32 2013-09-29 23:58:32 +01:00
Sergey Lyubka 21965e0e03 Splitting monolithic mongoose.c to separate files. Amalgamating into mongoose.c for release. 2013-09-29 23:56:59 +01:00
Sergey Lyubka 40ab4a8d3d Fixed websocket example logic when freeing the message, again! 2013-09-29 22:43:58 +01:00
Sergey Lyubka e84d0574fa Fixed websocket example logic when freeing the message 2013-09-29 22:01:31 +01:00
Sergey Lyubka 1a64d37fc7 Fixed mg_websocket_read() 2013-09-29 09:25:47 +01:00
Sergey Lyubka 9cca843a9b Typo fixed 2013-09-29 08:01:14 +01:00
Sergey Lyubka ecbf79135f Refactored API, returned back to event-based handlers. Upload and Websocket API simplified 2013-09-28 11:00:54 +01:00
Sergey Lyubka 96eb48902b Always invoking test 2013-09-28 00:15:24 +01:00
Sergey Lyubka 079c99c47f Started to restore single callback function 2013-09-26 13:25:51 +01:00
Sergey Lyubka 6d2a76b609 Added c# example 2013-09-26 12:50:11 +01:00
Sergey Lyubka 24e0950ca2 Using stdcall for mongoose.dll 2013-09-26 12:49:41 +01:00
Sergey Lyubka 98214ce1a4 Removed init_lua() and open_file() callbacks 2013-09-26 09:35:07 +01:00
Sergey Lyubka 7eed7eab36 Added mongoose.dll target 2013-09-26 09:34:36 +01:00
Sergey Lyubka f0fb5c01a2 Added unit_test.c dependency for unix_unit_test 2013-09-25 22:58:36 +01:00
Sergey Lyubka a92aa3bf49 Added unix_unit_test as a dependancy for mongoose 2013-09-25 18:37:17 +01:00
Sergey Lyubka b12cc9fd49 Refactored handle_options_request() to use mg_write() with less copying 2013-09-25 18:30:51 +01:00
Sergey Lyubka a61c3a2636 Added handle_delete_request(). Refactored convert_uri_to_file_name() 2013-09-25 18:24:36 +01:00
Sergey Lyubka 9fd435059f Setting user_data for fake connection 2013-09-25 14:28:09 +01:00
Sergey Lyubka 3156ac9791 read_websocket(): check for WEBSOCKET_OPCODE_CLOSE corrected 2013-09-25 14:25:14 +01:00
Sergey Lyubka b946f33189 Moved more docs to the web site 2013-09-24 11:24:10 +01:00
Sergey Lyubka 1e0b7054e6 Added mongoose.h to the mongoose.c dependancy 2013-09-24 11:23:51 +01:00
Sergey Lyubka 46e04e857c Added test for dir with non-ascii char 2013-09-24 10:08:39 +01:00
Sergey Lyubka 4abdeaddbf Docs reference moved to downloads section 2013-09-20 13:30:20 +01:00
Sergey Lyubka 029af1c376 Docs moved to Cesanta site 2013-09-20 13:27:48 +01:00
Sergey Lyubka c02f2ff4bb Update instruction to clone Git repo rather then using tarball 2013-09-18 09:52:06 +01:00
Sergey Lyubka f74fec8a7e Split docs by sections 2013-09-18 09:44:12 +01:00
Sergey Lyubka 50f8e8891b Removed references to usermanual.md 2013-09-18 09:44:00 +01:00
Sergey Lyubka d67b1dbd53 Added CommonProgramFiles(x86) to the CGI environment under Win32, to make Win32::OLE work under CGI 2013-09-18 08:11:37 +01:00
Sergey Lyubka b0eeb7d67b Renamed retina icons to @2x.png 2013-09-18 08:07:44 +01:00
Sergey Lyubka 2c6c75cbad Added icns icon file 2013-09-18 08:07:24 +01:00
Sergey Lyubka 241388b8a0 Using icns as bundle icon file 2013-09-18 08:07:06 +01:00
Sergey Lyubka 820b497f42 Installing icns file in DMG 2013-09-18 08:06:48 +01:00
Sergey Lyubka 88d8435a02 mongoose_22x22.png -> mongoose_22x22, let OS get Retina icon automatically 2013-09-18 08:06:08 +01:00
Sergey Lyubka f3f177f3ed Removed analytics tracking 2013-09-17 16:47:27 +01:00
Sergey Lyubka bfa171cd97 Squashed warning: added #include <direct.h> for windows getcwd() 2013-09-17 16:14:50 +01:00
Sergey Lyubka 19c94ce218 Fix for the issue 109 2013-09-17 16:09:00 +01:00
Sergey Lyubka 5e5033a0f3 Fix for the issue 156 2013-09-16 23:25:30 +01:00
Sergey Lyubka 411a269991 valenok -> cesanta 2013-09-16 22:45:19 +01:00
Sergey Lyubka bca6aab5a5 Moved UserManual to docs/ 2013-09-16 22:42:29 +01:00
Sergey Lyubka 330e2ff74e Fixed macos build target 2013-09-16 22:42:18 +01:00
Sergey Lyubka eb5848478c Added credits section mentioning those great who contributed 2013-09-12 17:30:03 +01:00
Sergey Lyubka 5bb361b1d2 Squashed warnings 2013-09-12 10:03:04 +01:00
Sergey Lyubka 0d40364089 Removed unused stuff, lua & ssl sources, reorganized targets. 2013-09-12 10:02:50 +01:00
Sergey Lyubka 16c4fe1f37 4.1 -> 4.2 2013-09-07 22:05:39 +01:00
Sergey Lyubka 3070e8572d removed file locking on windows, to fix the crash introduced by 52e3be5c58 2013-09-07 22:04:59 +01:00
Sergey Lyubka baf4d8af27 Mongoose_$V.dmg -> Mongoose-$V.dmg 2013-09-07 22:04:09 +01:00
Sergey Lyubka d5acf2e2a7 4.0 -> 4.1 2013-09-07 20:21:27 +01:00
1731 changed files with 700451 additions and 179645 deletions

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
BasedOnStyle: Google
AllowShortFunctionsOnASingleLine: false
SpaceAfterCStyleCast: true
PointerBindsToType: false
DerivePointerBinding: false
IncludeBlocks: Preserve
+13
View File
@@ -0,0 +1,13 @@
- My goal is: _describe_
- My actions were: _describe_
- My expectation was: _describe_
- The result I saw: _provide logs or description_
- My question is: _your question_
# Environment
- mongoose version: _X.Y_
- Compiler/IDE and SDK: ZZZ version _X.Y_
- Target hardware/board: _?_
- Connectivity chip/module: _?_
- Target RTOS/OS (if applicable): _?_
+35
View File
@@ -0,0 +1,35 @@
name: CIFuzz
on:
pull_request:
paths:
- "mongoose.c"
- "mongoose.h"
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src/' ; then echo GO=1 >> $GITHUB_ENV ; fi
- name: Build Fuzzers
id: build
if: ${{ env.GO == 1 }}
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'mongoose'
dry-run: false
language: c++
- name: Run Fuzzers
if: ${{ env.GO == 1 }}
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'mongoose'
fuzz-seconds: 600
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@v1
if: env.GO == 1 && failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
+281
View File
@@ -0,0 +1,281 @@
name: build
on:
push:
paths:
- "**Makefile"
- "**.c"
- "**.h"
env:
IPV6: 0
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cc: [gcc, clang, g++, clang++]
target: [test, mip_test]
ssl: [MBEDTLS, OPENSSL]
name: linux ${{ matrix.target }} CC=${{ matrix.cc }} SSL=${{ matrix.ssl }}
env:
CC: ${{ matrix.cc }}
SSL: ${{ matrix.ssl }}
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: ./test/setup_ga_network.sh && sudo apt -y update ; sudo apt -y install libmbedtls-dev && make ${{ matrix.target }}
s390:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make s390
armhf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make armhf
linux2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install libmbedtls-dev valgrind
- if: ${{ env.GO == 1 }}
run: make unamalgamated && make valgrind && make mg_prefix
macos:
runs-on: macos-latest
env: { HOMEBREW_NO_AUTO_UPDATE: 1 }
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: brew install jq mbedtls openssl
- if: ${{ env.GO == 1 }}
run: make test upload-coverage TFLAGS=-DNO_SNTP_CHECK SSL=OPENSSL ASAN_OPTIONS= OPENSSL=`echo /usr/local/Cellar/openssl*/*`
- if: ${{ env.GO == 1 }}
run: make test SSL=MBEDTLS TFLAGS=-DNO_SNTP_CHECK ASAN_OPTIONS= MBEDTLS=`echo /usr/local/Cellar/mbedtls*/*`
- if: ${{ env.GO == 1 }}
run: make mg_prefix
windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make vc98 vc17 vc22 mingw mingw++
arduino-xiao:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^examples/arduino|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make arduino-xiao
arm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make arm
riscv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make riscv
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt -y install libmbedtls-dev libpcap-dev
- run: make clean examples
- run: make clean test MG_ENABLE_POLL=1
examples_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
# - uses: egor-tensin/setup-mingw@v2
# with:
# platform: x64
- name: test they build
run: make examples_win
shell: cmd
- name: test they clean
run: make clean_examples_win
shell: cmd
examples_mac:
runs-on: macos-latest
env: { HOMEBREW_NO_AUTO_UPDATE: 1 }
steps:
- uses: actions/checkout@v3
- run: make examples_mac
- run: make clean_examples_mac
test_f7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/stm32/nucleo-f7" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f746zg-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f746zg-freertos test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f746zg-freertos-tcp test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_f4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/stm32/nucleo-f4" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f429zi-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f429zi-freertos test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_h7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 3 }
- run: if ./test/match_changed_files.sh "^src|examples/stm32/nucleo-h7" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-h743zi-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_tm4c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/ti/ek-tm4c" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- run: echo GO=0 > $GITHUB_ENV ; if ./test/match_changed_files.sh "^src|examples/ti/ek-tm4c1294xl-baremetal" ; then echo GO=1 > $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make -C examples/ti/ek-tm4c1294xl-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- run: echo GO=0 > $GITHUB_ENV ; if ./test/match_changed_files.sh "^src|examples/ti/ek-tm4c1294xl-freertos" ; then echo GO=1 > $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make -C examples/ti/ek-tm4c1294xl-freertos test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_pico_w5500:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/rp2040/pico-w5500" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/rp2040/pico-w5500 test VCON_API_KEY=${{secrets.VCON_API_KEY}}
matrix_examples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- path: esp32/device-dashboard
- path: esp32/uart-bridge
- path: esp8266/http-client-server
- path: stm32/nucleo-h743zi-baremetal
- path: stm32/stm32-nucleo-f746z
- path: stm32/stm32-nucleo-f746zg
- path: stm32/stm32-nucleo-f429z
- path: stm32/stm32-nucleo-h743z
- path: stm32/nucleo-f429zi-baremetal
- path: stm32/nucleo-f429zi-freertos
- path: stm32/nucleo-f429zi-rndis
- path: stm32/nucleo-f746zg-baremetal
- path: stm32/nucleo-f746zg-freertos
- path: stm32/nucleo-f746zg-freertos-tcp
- path: stm32/nucleo-f746zg-rndis
- path: nxp/nxp-mimxrt1020-azurertos
- path: nxp/nxp-frdmk66f-freertos
- path: nxp/nxp-lpcxpresso54s018m-freertos
- path: nxp/nxp-mimxrt1020-freertos
- path: nxp/nxp-evkbimxrt1050-lwip-freertos
- path: nxp/nxp-evkmimxrt1020-lwip-freertos
- path: nxp/nxp-evkmimxrt1024-lwip-freertos
- path: nxp/nxp-evkmimxrt1060-lwip-freertos
- path: nxp/nxp-evkmimxrt1064-lwip-freertos
- path: nxp/nxp-evkmimxrt1160-cm7-lwip-freertos
- path: nxp/nxp-evkmimxrt1170-cm7-lwip-freertos
- path: nxp/nxp-frdmk64f-lwip-freertos
- path: nxp/nxp-frdmk66f-lwip-freertos
- path: nxp/nxp-lpcxpresso54018-lwip-freertos
- path: nxp/nxp-lpcxpresso54608-lwip-freertos
- path: nxp/nxp-lpcxpresso54618-lwip-freertos
- path: nxp/nxp-lpcxpresso54628-lwip-freertos
- path: nxp/nxp-twrk65f180m-lwip-freertos
- path: nxp/nxp-twrkv58f220m-lwip-freertos
- path: infineon/infineon-xmc4700_4800-lwip-rtx-rtos
- path: ti/ti-ek-tm4c1294xl-http-server
- path: ti/ek-tm4c1294xl-baremetal
- path: ti/ek-tm4c1294xl-freertos
- path: rp2040/pico-rmii
- path: rp2040/pico-rndis-dashboard
- path: rp2040/pico-w
- path: rp2040/pico-w5500
name: ${{ matrix.example.path }}
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|^examples/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/${{ matrix.example.path }} build
cube_examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|examples/stm32/nucleo-*-cube-*'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: cd test/cube && make
zephyr_examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src/.*.[ch]|^examples/zephyr'; then sudo apt -y update ; sudo apt -y install gcc-arm-none-eabi ; fi
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr init
- name: minify manifest
if: ${{ env.GO == 1 }}
uses: mikefarah/yq@master
with:
cmd: yq -i eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $i ireduce({};setpath($i | path; $i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' examples/zephyr/zephyrproject/zephyr/west.yml
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr update
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/device-dashboard build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/http-client build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/http-server build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/mqtt-aws-client build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/websocket-server build
+6 -6
View File
@@ -1,16 +1,16 @@
Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com> Copyright (c) 2004-2013 Sergey Lyubka
Copyright (c) 2013 Cesanta Software Limited Copyright (c) 2013-2023 Cesanta Software Limited
All rights reserved All rights reserved
This code is dual-licensed: you can redistribute it and/or modify This software is dual-licensed: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation. For the terms of this published by the Free Software Foundation. For the terms of this
license, see <http://www.gnu.org/licenses/>. license, see <http://www.gnu.org/licenses/>.
You are free to use this code under the terms of the GNU General You are free to use this software under the terms of the GNU General
Public License, but WITHOUT ANY WARRANTY; without even the implied Public License, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
Alternatively, you can license this code under a commercial Alternatively, you can license this software under a commercial
license, as set out in <http://cesanta.com/products.html>. license, as set out in <https://mongoose.ws/licensing/>.
+206
View File
@@ -0,0 +1,206 @@
SRCS = mongoose.c test/unit_test.c test/packed_fs.c
HDRS = $(wildcard src/*.h) $(wildcard src/tcpip/*.h)
DEFS ?= -DMG_MAX_HTTP_HEADERS=7 -DMG_ENABLE_LINES -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_SSI=1 -DMG_ENABLE_ASSERT=1
WARN ?= -pedantic -W -Wall -Werror -Wshadow -Wdouble-promotion -fno-common -Wconversion -Wundef
OPTS ?= -O3 -g3
INCS ?= -Isrc -I.
SSL ?=
CWD ?= $(realpath $(CURDIR))
ENV ?= -e Tmp=. -e WINEDEBUG=-all
DOCKER ?= docker run --platform linux/amd64 --rm $(ENV) -v $(CWD):$(CWD) -w $(CWD)
VCFLAGS = /nologo /W3 /O2 /MD /I. $(DEFS) $(TFLAGS)
IPV6 ?= 1
ASAN ?= -fsanitize=address,undefined,alignment -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-common
ASAN_OPTIONS ?= detect_leaks=1
EXAMPLES := $(dir $(wildcard examples/*/Makefile))
EXAMPLES_MAC := $(filter-out examples/mip-pcap/ examples/mip-tap/, $(EXAMPLES))
EXAMPLES_WIN := $(dir $(wildcard examples/device-dashboard/Makefile) $(wildcard examples/file-*/Makefile) $(wildcard examples/http-*/Makefile) $(wildcard examples/mqtt-*/Makefile) $(wildcard examples/websocket-*/Makefile) $(wildcard examples/webui-*/Makefile))
EXAMPLES_EMBEDDED := $(filter-out $(wildcard examples/zephyr/*/), $(dir $(wildcard examples/*/*/Makefile)))
PREFIX ?= /usr/local
VERSION ?= $(shell cut -d'"' -f2 src/version.h)
COMMON_CFLAGS ?= $(C_WARN) $(WARN) $(INCS) $(DEFS) -DMG_ENABLE_IPV6=$(IPV6) $(TFLAGS) -pthread
CFLAGS ?= $(OPTS) $(ASAN) $(COMMON_CFLAGS)
VALGRIND_CFLAGS ?= $(OPTS) $(COMMON_CFLAGS)
VALGRIND_RUN ?= valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --show-leak-kinds=all --leak-resolution=high --track-origins=yes --error-exitcode=1 --exit-on-first-error=yes --fair-sched=yes
.PHONY: clean_examples examples mip_test test valgrind
ifeq "$(findstring ++,$(CC))" ""
# $(CC) does not end with ++, i.e. we're using C. Apply C flags
C_WARN ?= -Wmissing-prototypes -Wstrict-prototypes
else
# $(CC) ends with ++, i.e. we're using C++. Apply C++ flags
C_WARN ?= -Wno-deprecated
endif
ifeq "$(SSL)" "MBEDTLS"
MBEDTLS ?= /usr/local
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include
LDFLAGS ?= -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
endif
ifeq "$(SSL)" "OPENSSL"
OPENSSL ?= /usr/local
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include
LDFLAGS ?= -L$(OPENSSL)/lib -lssl -lcrypto
endif
all:
$(MAKE) -C examples/http-server
tall: mg_prefix unamalgamated test mip_test arm examples vc98 vc17 vc22 mingw mingw++ fuzz
mip_test: test/mip_test.c mongoose.c mongoose.h Makefile mip_tap_test
$(CC) test/mip_test.c $(INCS) $(WARN) $(OPTS) $(C_WARN) $(ASAN) -o $@
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./$@
mip_tap_test: test/mip_tap_test.c mongoose.c mongoose.h Makefile
$(CC) test/mip_tap_test.c $(INCS) $(WARN) $(OPTS) $(C_WARN) $(ASAN) -o $@
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./$@
examples:
@for X in $(EXAMPLES); do test -f $$X/Makefile || continue; $(MAKE) -C $$X example || exit 1; done
clean_examples:
for X in $(EXAMPLES); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done
examples_mac:
for X in $(EXAMPLES_MAC); do test -f $$X/Makefile || continue; $(MAKE) -C $$X example || exit 1; done
clean_examples_mac:
for X in $(EXAMPLES_MAC); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done
examples_win:
$(foreach X, $(EXAMPLES_WIN), $(MAKE) -C $(X) example &)
clean_examples_win:
$(foreach X, $(EXAMPLES_WIN), $(MAKE) -C $(X) clean &)
test/packed_fs.c: Makefile src/ssi.h test/fuzz.c test/data/a.txt
$(CC) $(CFLAGS) test/pack.c -o pack
$(RUN) ./pack Makefile src/ssi.h test/fuzz.c test/data/a.txt test/data/range.txt > $@
DIR ?= test/data
OUT ?= packed_fs.c
mkfs:
$(CC) $(CFLAGS) test/pack.c -o pack
$(RUN) ./pack -s $(DIR) `find $(DIR) -type f` > $(OUT)
# find $(DIR) -type f | sed -e s,^$(DIR),,g -e s,^/,,g
# Check that all external (exported) symbols have "mg_" prefix
mg_prefix: mongoose.c mongoose.h
$(CC) mongoose.c $(CFLAGS) -c -o /tmp/x.o && nm /tmp/x.o | grep ' T ' | grep -v 'mg_' ; test $$? = 1
musl: test
musl: ASAN =
musl: WARN += -Wno-sign-conversion
musl: CC = $(DOCKER) mdashnet/cc1 gcc
musl: RUN = $(DOCKER) mdashnet/cc1
# Make sure we can build from an unamalgamated sources
unamalgamated: $(HDRS) Makefile test/packed_fs.c
$(CC) src/*.c test/packed_fs.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test
fuzz: ASAN = -fsanitize=fuzzer,signed-integer-overflow,address,undefined
fuzz: mongoose.c mongoose.h Makefile test/fuzz.c
$(CC) test/fuzz.c $(OPTS) $(WARN) $(INCS) $(TFLAGS) $(ASAN) -o fuzzer
$(RUN) ./fuzzer
FUZZDATA ?= /tmp/fuzzdata
fuzz2: mongoose.c mongoose.h Makefile test/fuzz.c
$(CC) test/fuzz.c -DMAIN $(OPTS) $(WARN) $(ASAN) $(INCS) -o fuzzer
$(RUN) ./fuzzer $(FUZZDATA)
test: Makefile mongoose.h $(SRCS)
$(CC) $(SRCS) $(CFLAGS) $(LDFLAGS) -o unit_test
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./unit_test
coverage: CFLAGS += -coverage
coverage: test
gcov -l -n *.gcno | sed '/^$$/d' | sed 'N;s/\n/ /'
gcov -t mongoose.c > mongoose.gcov
upload-coverage: coverage
curl -s https://codecov.io/bash | /bin/bash
valgrind: Makefile mongoose.h mongoose.c
$(CC) $(SRCS) $(VALGRIND_CFLAGS) $(LDFLAGS) -g -o unit_test
$(VALGRIND_RUN) ./unit_test
armhf: ASAN=
armhf: IPV6=0
armhf: CC = $(DOCKER) mdashnet/armhf cc
armhf: RUN = $(DOCKER) mdashnet/armhf
armhf: test
s390: ASAN=
s390: IPV6=0
s390: CC = $(DOCKER) mdashnet/s390 cc
s390: RUN = $(DOCKER) mdashnet/s390
s390: test
arm: DEFS += -DMG_ENABLE_FILE=0 -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB
arm: mongoose.h $(SRCS)
$(DOCKER) mdashnet/armgcc arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb $(SRCS) $(OPTS) $(WARN) $(INCS) $(DEFS) $(TFLAGS) -o unit_test -nostartfiles --specs nosys.specs -e 0
riscv: DEFS += -DMG_ENABLE_FILE=0 -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB
riscv: mongoose.h $(SRCS)
$(DOCKER) mdashnet/riscv riscv-none-elf-gcc -march=rv32imc -mabi=ilp32 $(SRCS) $(OPTS) $(WARN) $(INCS) $(DEFS) $(TFLAGS) -o unit_test
vc98: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/vc98 wine cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe
$(DOCKER) mdashnet/vc98 wine $@.exe
vc17: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/vc17 wine64 cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe
$(DOCKER) mdashnet/vc17 wine64 $@.exe
vc22: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/vc22 wine64 cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe
$(DOCKER) mdashnet/vc22 wine64 $@.exe
mingw: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/mingw x86_64-w64-mingw32-gcc $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe
$(DOCKER) mdashnet/mingw wine64 $@.exe
arduino: ENV = -v $(CWD)/arduino:/root
arduino:
curl -sL http://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz | unxz | tar -xf -
mv arduino-* $@
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "boardsmanager.additional.urls=https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json" --save-prefs
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "compiler.warning_level=all" --save-prefs
$(DOCKER) mdashnet/cc2 ./arduino/arduino --install-boards Seeeduino:samd
arduino-xiao: ENV = -v $(CWD)/arduino:/root
arduino-xiao: arduino
rm -rf tmp; mkdir tmp
cp examples/arduino/w5500/w5500.ino tmp/tmp.ino
cp mongoose.c mongoose.h examples/arduino/w5500/mongoose_custom.h tmp/
$(DOCKER) mdashnet/cc2 ./arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 tmp/tmp.ino
mingw++: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/mingw x86_64-w64-mingw32-g++ $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe
linux-libs: CFLAGS += -fPIC
linux-libs: mongoose.o
$(CC) mongoose.o $(LDFLAGS) -shared -o libmongoose.so.$(VERSION)
$(AR) rcs libmongoose.a mongoose.o
install: linux-libs
install -Dm644 libmongoose.a libmongoose.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib
ln -s libmongoose.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libmongoose.so
install -Dm644 mongoose.h $(DESTDIR)$(PREFIX)/include/mongoose.h
uninstall:
rm -rf $(DESTDIR)$(PREFIX)/lib/libmongoose.a $(DESTDIR)$(PREFIX)/lib/libmongoose.so.$(VERSION) $(DESTDIR)$(PREFIX)/include/mongoose.h $(DESTDIR)$(PREFIX)/lib/libmongoose.so
mongoose.c: Makefile $(wildcard src/*.c) $(wildcard src/tcpip/*.c)
(cat src/license.h; echo; echo '#include "mongoose.h"' ; (for F in src/*.c src/tcpip/*.c ; do echo; echo '#ifdef MG_ENABLE_LINES'; echo "#line 1 \"$$F\""; echo '#endif'; cat $$F | sed -e 's,#include ".*,,'; done))> $@
mongoose.h: $(HDRS) Makefile
(cat src/license.h; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/arch.h src/arch_*.h src/net_*.h src/config.h src/str.h src/queue.h src/fmt.h src/printf.h src/log.h src/timer.h src/fs.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/tls_mbed.h src/tls_openssl.h src/ws.h src/sntp.h src/mqtt.h src/dns.h src/json.h src/rpc.h src/tcpip/tcpip.h src/tcpip/driver_*.h | sed -e '/keep/! s,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@
clean: clean_examples clean_embedded
rm -rf $(PROG) *.exe *.o *.dSYM *_test* ut fuzzer *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb slow-unit* _CL_* infer-out data.txt crash-* test/packed_fs.c pack arduino tmp
#find examples -maxdepth 3 -name zephyr -prune -o -name Makefile -print | xargs dirname | xargs -n1 make clean -C
clean_embedded:
for X in $(EXAMPLES_EMBEDDED); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done
+75 -50
View File
@@ -1,57 +1,82 @@
# Project Mission # Mongoose - Embedded Web Server / Embedded Networking Library
Project mission is to provide easy to use, powerful, embeddable web server. [![License: GPLv2/Commercial](https://img.shields.io/badge/License-GPLv2%20or%20Commercial-green.svg)](https://opensource.org/licenses/gpl-2.0.php)
[![Build Status]( https://github.com/cesanta/mongoose/workflows/build/badge.svg)](https://github.com/cesanta/mongoose/actions)
[![Code Coverage](https://codecov.io/gh/cesanta/mongoose/branch/master/graph/badge.svg)](https://codecov.io/gh/cesanta/mongoose)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/mongoose.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:mongoose)
# Downloads Mongoose is a network library for C/C++.
It implements event-driven
non-blocking APIs for TCP, UDP, HTTP, WebSocket, MQTT. It is designed for
connecting devices and bringing them online. On the market since 2004, used by
vast number of open source and commercial products - it even runs on the
International Space Station! Mongoose makes embedded network programming fast,
robust, and easy. Features include:
Sources, binaries and bundles are available for download at - Cross-platform:
[mongoose downloads](http://cesanta.com/downloads.html). - works on Linux/UNIX, MacOS, Windows, Android
- works on STM32, NXP, ESP32, NRF52, TI, Microchip, and other
# Overview - write code once - and it'll work everywhere
- ideal for the unification of the network infrastructure code across company
Mongoose keeps the balance between functionality and - Built-in protocols: plain TCP/UDP, HTTP, MQTT, Websocket
simplicity by carefully selected list of features: - SSL/TLS support: mbedTLS, OpenSSL or custom (via API)
- Asynchronous DNS resolver
- Works on Windows, Mac, UNIX, iPhone, Android, and many other platforms - Tiny static and run-time footprint
- Scripting and database support (Lua Server Pages + Sqlite, see - Source code is both ISO C and ISO C++ compliant
[page.lp](https://github.com/valenok/mongoose/blob/master/test/page.lp) ), - Very easy to integrate: just copy `mongoose.c` and `mongoose.h` files to your source tree. See
which provides ready to go, powerful web development platform in [exact steps](https://mongoose.ws/documentation/#2-minute-integration-guide)
one single-click executable with **no dependencies**: forget LAMP! - Works with any network stack with socket API, like LwIP or FreeRTOS-Plus-TCP
- Support for CGI, SSL, SSI, Digest (MD5) authorization, Websocket, WEbDAV - Provides a built-in TCP/IP stack with drivers for bare metal or RTOS systems
- Resumed download, URL rewrite, file blacklist, IP-based ACL, Windows service - A complete Web device dashboard
- Download speed limit based on client subnet or URI pattern [bare metal example on Nucleo-F429ZI](examples/stm32/nucleo-f429zi-baremetal)
- Simple and clean embedding API, is only 6 files
[mongoose.h](https://github.com/valenok/mongoose/blob/master/mongoose.h). - For comparison, a CubeIDE generated HTTP example is 400+ files
The source is in single - Detailed [user guide, API reference and tons of tutorials](https://mongoose.ws/documentation/) available
[mongoose.c](https://github.com/valenok/mongoose/blob/master/mongoose.c) file
to make things easy. Embedding examples:
[hello.c](https://github.com/valenok/mongoose/blob/master/examples/hello.c),
[post.c](https://github.com/valenok/mongoose/blob/master/examples/post.c),
[upload.c](https://github.com/valenok/mongoose/blob/master/examples/upload.c),
[websocket.c](https://github.com/valenok/mongoose/blob/master/examples/websocket.c)
- HTTP client capable of sending arbitrary HTTP/HTTPS requests
- [User Manual](https://github.com/valenok/mongoose/blob/master/UserManual.md)
Note that Windows and MacOS binaries have following 3rd party software
compiled in:
<a href="http://wolfssl.com">WolfSSL lightweight SSL library</a>,
<a href="http://sqlite.org">SQLite embedded database</a>,
<a href="http://lua.org">Lua embedded scripting engine</a>.
Questions can be asked at
[mongoose-users@googlegroups.com](http://groups.google.com/group/mongoose-users)
mailing list.
[![&nbsp;](https://cruel-carlota.pagodabox.com/2a613890c1f4b60e5919a9c1dd3caca2 "githalytics.com")](http://githalytics.com/valenok/mongoose)
# License # Commercial use
- Mongoose is used by hundreds of businesses, from Fortune500 giants like
Siemens, Schneider Electric, Broadcom, Bosch, Google, Samsung, Qualcomm, Caterpillar to the small businesses
- Used to solve a wide range of business needs, like implementing Web UI
interface on devices, RESTful API services, telemetry data exchange, remote
control for a product, remote software updates, remote monitoring, and others
- Deployed to hundreds of millions devices in production environment worldwide
- See [Case Studies](https://mongoose.ws/case-studies/) from our respected
customers like [Schneider Electric](https://mongoose.ws/case-studies/schneider-electric/) (industrial automation), [Broadcom](https://mongoose.ws/case-studies/broadcom/) (semiconductors), [Pilz](https://mongoose.ws/case-studies/pilz/) (industrial automation), and others
- See [Testimonials](https://mongoose.ws/testimonials/) from engineers that integrated Mongoose in their commercial products
- We provide [Evaluation and Commercial licensing](https://mongoose.ws/licensing/), [support](https://mongoose.ws/support/), consultancy and integration
assistance - don't hesitate to [contact us](https://mongoose.ws/contact/)
Mongoose is dual-licensed. It is available under the terms of
[GNU GPL v.2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) license
license for free, or under the terms of standard commercial license provided
by [Cesanta Software](http://cesanta.com).
[Super Light Regular Expression library](https://github.com/cesanta/slre) is # Security
another project by Cesanta Software, developed with the same philosophy
of functionality and simplicity. We take security seriously:
1. Mongoose repository runs a
[continuous integration test powered by GitHub](https://github.com/cesanta/mongoose/actions),
which runs through hundreds of unit tests on every commit to the repository.
Our [unit tests](https://github.com/cesanta/mongoose/tree/master/test)
are built with modern address sanitizer technologies, which help to find
security vulnerabilities early
2. Mongoose repository is integrated into Google's
[oss-fuzz continuous fuzzer](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:mongoose)
which scans for potential vulnerabilities continuously
3. We receive periodic vulnerability reports from the independent security
groups like
[Cisco Talos](https://www.cisco.com/c/en/us/products/security/talos.html),
[Microsoft Security Response Center](https://www.microsoft.com/en-us/msrc),
[MITRE Corporation](https://www.mitre.org/),
[Compass Security](https://www.compass-security.com/en/) and others.
In case of the vulnerability found, we act according to the industry best
practice: hold on to the publication, fix the software and notify all our
customers that have an appropriate subscription
4. Some of our customers (for example NASA)
have specific security requirements and run independent security audits,
of which we get notified and in case of any issue, act similar to (3).
# Contributions
Contributions are welcome! Please follow the guidelines below:
- Sign [Cesanta CLA](https://cesanta.com/cla.html) and send GitHub pull request
- Make sure that PRs have only one commit, and deal with one issue only
-547
View File
@@ -1,547 +0,0 @@
# Overview
Mongoose is small and easy to use web server. It is self-contained, and does
not require any external software to run.
On Windows, mongoose iconifies itself to the system tray icon when started.
Right-click on the icon pops up a menu, where it is possible to stop
mongoose, or configure it, or install it as Windows service. The easiest way
to share a folder on Windows is to copy `mongoose.exe` to a folder,
double-click the exe, and launch a browser at
[http://localhost:8080](http://localhost:8080). Note that 'localhost' should
be changed to a machine's name if a folder is accessed from other computer.
On UNIX and Mac, mongoose is a command line utility. Running `mongoose` in
terminal, optionally followed by configuration parameters
(`mongoose [OPTIONS]`) or configuration file name
(`mongoose [config_file_name]`) starts the
web server. Mongoose does not detach from terminal. Pressing `Ctrl-C` keys
would stop the server.
When started, mongoose first searches for the configuration file.
If configuration file is specified explicitly in the command line, i.e.
`mongoose path_to_config_file`, then specified configuration file is used.
Otherwise, mongoose would search for file `mongoose.conf` in the same directory
where binary is located, and use it. Configuration file can be absent.
Configuration file is a sequence of lines, each line containing
command line argument name and it's value. Empty lines, and lines beginning
with `#`, are ignored. Here is the example of `mongoose.conf` file:
document_root c:\www
listening_ports 8080,8043s
ssl_certificate c:\mongoose\ssl_cert.pem
When configuration file is processed, mongoose process command line arguments,
if they are specified. Command line arguments therefore can override
configuration file settings. Command line arguments must start with `-`.
For example, if `mongoose.conf` has line
`document_root /var/www`, and mongoose has been started as
`mongoose -document_root /etc`, then `/etc` directory will be served as
document root, because command line options take priority over
configuration file. Configuration options section below provide a good
overview of Mongoose features.
Note that configuration options on the command line must start with `-`,
but their names are the same as in the config file. All option names are
listed in the next section. Thus, the following two setups are equivalent:
# Using command line arguments
$ mongoose -listening_ports 1234 -document_root /var/www
# Using config file
$ cat mongoose.conf
listening_ports 1234
document_root /var/www
$ mongoose
Mongoose can also be used to modify `.htpasswd` passwords file:
mongoose -A <htpasswd_file> <realm> <user> <passwd>
Unlike other web servers, mongoose does not require CGI scripts be located in
a special directory. CGI scripts can be anywhere. CGI (and SSI) files are
recognized by the file name pattern. Mongoose uses shell-like glob
patterns. Pattern match starts at the beginning of the string, so essentially
patterns are prefix patterns. Syntax is as follows:
** Matches everything
* Matches everything but slash character, '/'
? Matches any character
$ Matches the end of the string
| Matches if pattern on the left side or the right side matches.
All other characters in the pattern match themselves. Examples:
**.cgi$ Any string that ends with .cgi
/foo Any string that begins with /foo
**a$|**b$ Any string that ends with a or b
# Configuration Options
Below is a list of configuration options Mongoose understands. Every option
is followed by it's default value. If default value is not present, then
it is empty.
### cgi_pattern `**.cgi$|**.pl$|**.php$`
All files that match `cgi_pattern` are treated as CGI files. Default pattern
allows CGI files be anywhere. To restrict CGIs to a certain directory,
use `/path/to/cgi-bin/**.cgi` as pattern. Note that full file path is
matched against the pattern, not the URI.
### cgi_environment
Extra environment variables to be passed to the CGI script in
addition to standard ones. The list must be comma-separated list
of name=value pairs, like this: `VARIABLE1=VALUE1,VARIABLE2=VALUE2`.
### put\_delete\_auth\_file
Passwords file for PUT and DELETE requests. Without it, PUT and DELETE requests
will fail.
### cgi_interpreter
Path to an executable to use as CGI interpreter for __all__ CGI scripts
regardless script extension. If this option is not set (which is a default),
Mongoose looks at first line of a CGI script,
[shebang line](http://en.wikipedia.org/wiki/Shebang_(Unix\)), for an interpreter.
For example, if both PHP and perl CGIs are used, then
`#!/path/to/php-cgi.exe` and `#!/path/to/perl.exe` must be first lines of the
respective CGI scripts. Note that paths should be either full file paths,
or file paths relative to the current working directory of mongoose server.
If mongoose is started by mouse double-click on Windows, current working
directory is a directory where mongoose executable is located.
If all CGIs use the same interpreter, for example they are all PHP, then
`cgi_interpreter` can be set to the path to `php-cgi.exe` executable and
shebang line in the CGI scripts can be omitted.
Note that PHP scripts must use `php-cgi.exe` executable, not `php.exe`.
### protect_uri
Comma separated list of URI=PATH pairs, specifying that given
URIs must be protected with respected password files. Paths must be full
file paths.
### authentication_domain `mydomain.com`
Authorization realm used in `.htpasswd` authorization.
### ssi_pattern `**.shtml$|**.shtm$`
All files that match `ssi_pattern` are treated as SSI.
Server Side Includes (SSI) is a simple interpreted server-side scripting
language which is most commonly used to include the contents of a file into
a web page. It can be useful when it is desirable to include a common piece
of code throughout a website, for example, headers and footers.
In order for a webpage to recognize an SSI-enabled HTML file, the filename
should end with a special extension, by default the extension should be
either `.shtml` or `.shtm`.
Unknown SSI directives are silently ignored by mongoose. Currently, two SSI
directives are supported, `<!--#include ...>` and
`<!--#exec "command">`. Note that `<!--#include ...>` directive supports
three path specifications:
<!--#include virtual="path"> Path is relative to web server root
<!--#include abspath="path"> Path is absolute or relative to
web server working dir
<!--#include file="path">, Path is relative to current document
<!--#include "path">
The `include` directive may be used to include the contents of a file or the
result of running a CGI script. The `exec` directive is used to execute a
command on a server, and show command's output. Example:
<!--#exec "ls -l" -->
For more information on Server Side Includes, take a look at the Wikipedia:
[Server Side Includes](http://en.wikipedia.org/wiki/Server_Side_Includes)
### throttle
Limit download speed for clients. `throttle` is a comma-separated
list of key=value pairs, where key could be:
* limit speed for all connections
x.x.x.x/mask limit speed for specified subnet
uri_prefix_pattern limit speed for given URIs
The value is a floating-point number of bytes per second, optionally
followed by a `k` or `m` character, meaning kilobytes and
megabytes respectively. A limit of 0 means unlimited rate. The
last matching rule wins. Examples:
*=1k,10.0.0.0/8=0 limit all accesses to 1 kilobyte per second,
but give connections from 10.0.0.0/8 subnet
unlimited speed
/downloads/=5k limit accesses to all URIs in `/downloads/` to
5 kilobytes per secods. All other accesses are unlimited
### access\_log\_file
Path to a file for access logs. Either full path, or relative to current
working directory. If absent (default), then accesses are not logged.
### error\_log\_file
Path to a file for error logs. Either full path, or relative to current
working directory. If absent (default), then errors are not logged.
### enable\_directory\_listing `yes`
Enable directory listing, either `yes` or `no`.
### enable\_keep\_alive `no`
Enable connection keep alive, either `yes` or `no`.
Experimental feature. Allows clients to reuse TCP connection for
subsequent HTTP requests, which improves performance.
For this to work when using request handlers it's important to add the correct
Content-Length HTTP header for each request. If this is forgotten the client
will time out.
### global\_auth\_file
Path to a global passwords file, either full path or relative to the current
working directory. If set, per-directory `.htpasswd` files are ignored,
and all requests are authorised against that file.
The file has to include the realm set through `authentication_domain` and the password in digest format:
user:realm:digest
test:test.com:ce0220efc2dd2fad6185e1f1af5a4327
(e.g. use [this generator](http://www.askapache.com/online-tools/htpasswd-generator))
### index_files `index.html,index.htm,index.cgi,index.shtml,index.php`
Comma-separated list of files to be treated as directory index
files.
### access\_control\_list
An Access Control List (ACL) allows restrictions to be put on the list of IP
addresses which have access to the web server. In the case of the Mongoose
web server, the ACL is a comma separated list of IP subnets, where each
subnet is prepended by either a `-` or a `+` sign. A plus sign means allow,
where a minus sign means deny. If a subnet mask is omitted, such as `-1.2.3.4`,
this means to deny only that single IP address.
Subnet masks may vary from 0 to 32, inclusive. The default setting is to allow
all accesses. On each request the full list is traversed, and
the last match wins. Examples:
-0.0.0.0/0,+192.168/16 deny all acccesses, only allow 192.168/16 subnet
To learn more about subnet masks, see the
[Wikipedia page on Subnetwork](http://en.wikipedia.org/wiki/Subnetwork)
### extra\_mime\_types
Extra mime types to recognize, in form `extension1=type1,exten-
sion2=type2,...`. Extension must include dot. Example:
`.cpp=plain/text,.java=plain/text`
### listening_ports `8080`
Comma-separated list of ports to listen on. If the port is SSL, a
letter `s` must be appeneded, for example, `80,443s` will open
port 80 and port 443, and connections on port 443 will be SSL-ed.
For non-SSL ports, it is allowed to append letter `r`, meaning 'redirect'.
Redirect ports will redirect all their traffic to the first configured
SSL port. For example, if `listening_ports` is `80r,443s`, then all
HTTP traffic coming at port 80 will be redirected to HTTPS port 443.
It is possible to specify an IP address to bind to. In this case,
an IP address and a colon must be prepended to the port number.
For example, to bind to a loopback interface on port 80 and to
all interfaces on HTTPS port 443, use `127.0.0.1:80,443s`.
### document_root `.`
A directory to serve. By default, currect directory is served. Current
directory is commonly referenced as dot (`.`).
### ssl_certificate
Path to SSL certificate file. This option is only required when at least one
of the `listening_ports` is SSL. The file must be in PEM format,
and it must have both private key and certificate, see for example
[ssl_cert.pem](https://github.com/valenok/mongoose/blob/master/build/ssl_cert.pem)
### num_threads `50`
Number of worker threads. Mongoose handles each incoming connection in a
separate thread. Therefore, the value of this option is effectively a number
of concurrent HTTP connections Mongoose can handle.
### run\_as\_user
Switch to given user credentials after startup. Usually, this option is
required when mongoose needs to bind on privileged port on UNIX. To do
that, mongoose needs to be started as root. But running as root is a bad idea,
therefore this option can be used to drop privileges. Example:
mongoose -listening_ports 80 -run_as_user nobody
### request\_timeout\_ms `30000`
Timeout for network read and network write operations, in milliseconds.
If client intends to keep long-running connection, either increase this value
or use keep-alive messages.
### url\_rewrite\_patterns
Comma-separated list of URL rewrites in the form of
`uri_pattern=file_or_directory_path`. When Mongoose receives the request,
it constructs the file name to show by combining `document_root` and the URI.
However, if the rewrite option is used and `uri_pattern` matches the
requested URI, then `document_root` is ignored. Insted,
`file_or_directory_path` is used, which should be a full path name or
a path relative to the web server's current working directory. Note that
`uri_pattern`, as all mongoose patterns, is a prefix pattern.
This makes it possible to serve many directories outside from `document_root`,
redirect all requests to scripts, and do other tricky things. For example,
to redirect all accesses to `.doc` files to a special script, do:
mongoose -url_rewrite_patterns **.doc$=/path/to/cgi-bin/handle_doc.cgi
Or, to imitate user home directories support, do:
mongoose -url_rewrite_patterns /~joe/=/home/joe/,/~bill=/home/bill/
### hide\_files\_patterns
A pattern for the files to hide. Files that match the pattern will not
show up in directory listing and return `404 Not Found` if requested. Pattern
must be for a file name only, not including directory name. Example:
mongoose -hide_files_patterns secret.txt|even_more_secret.txt
# Lua Server Pages
Pre-built Windows and Mac mongoose binaries have built-in Lua Server Pages
support. That means it is possible to write PHP-like scripts with mongoose,
using Lua programming language instead of PHP. Lua is known
for it's speed and small size. Mongoose uses Lua version 5.2.1, the
documentation for it can be found at
[Lua 5.2 reference manual](http://www.lua.org/manual/5.2/).
To create a Lua Page, make sure a file has `.lp` extension. For example,
let's say it is going to be `my_page.lp`. The contents of the file, just like
with PHP, is HTML with embedded Lua code. Lua code must be enclosed in
`<? ?>` blocks, and can appear anywhere on the page. For example, to
print current weekday name, one can write:
<p>
<span>Today is:</span>
<? mg.write(os.date("%A")) ?>
</p>
Note that this example uses function `mg.write()`, which prints data to the
web page. Using function `mg.write()` is the way to generate web content from
inside Lua code. In addition to `mg.write()`, all standard library functions
are accessible from the Lua code (please check reference manual for details),
and also information about the request is available in `mg.request_info` object,
like request method, all headers, etcetera. Please refer to
`struct mg_request_info` definition in
[mongoose.h](https://github.com/valenok/mongoose/blob/master/mongoose.h)
to see what kind of information is present in `mg.request_info` object. Also,
[page.lp](https://github.com/valenok/mongoose/blob/master/test/page.lp) and
[prime_numbers.lp](https://github.com/valenok/mongoose/blob/master/examples/lua/prime_numbers.lp)
contains some example code that uses `request_info` and other functions(form submitting for example).
Mongoose exports the following to the Lua server page:
mg.read() -- reads a chunk from POST data, returns it as a string
mg.write(str) -- writes string to the client
mg.include(path) -- sources another Lua file
mg.redirect(uri) -- internal redirect to a given URI
mg.onerror(msg) -- error handler, can be overridden
mg.version -- a string that holds Mongoose version
mg.request_info -- a table with request information
-- Connect to the remote TCP server. This function is an implementation
-- of simple socket interface. It returns a socket object with three
-- methods: send, recv, close, which are synchronous (blocking).
-- connect() throws an exception on connection error.
connect(host, port, use_ssl)
-- Example of using connect() interface:
local host = 'code.google.com' -- IP address or domain name
local ok, sock = pcall(connect, host, 80, 1)
if ok then
sock:send('GET /p/mongoose/ HTTP/1.0\r\n' ..
'Host: ' .. host .. '\r\n\r\n')
local reply = sock:recv()
sock:close()
-- reply now contains the web page https://code.google.com/p/mongoose
end
**IMPORTANT: Mongoose does not send HTTP headers for Lua pages. Therefore,
every Lua Page must begin with HTTP reply line and headers**, like this:
<? print('HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n') ?>
<html><body>
... the rest of the web page ...
To serve Lua Page, mongoose creates Lua context. That context is used for
all Lua blocks within the page. That means, all Lua blocks on the same page
share the same context. If one block defines a variable, for example, that
variable is visible in the block that follows.
# Common Problems
- PHP doesn't work - getting empty page, or 'File not found' error. The
reason for that is wrong paths to the interpreter. Remember that with PHP,
correct interpreter is `php-cgi.exe` (`php-cgi` on UNIX). Solution: specify
full path to the PHP interpreter, e.g.:
`mongoose -cgi_interpreter /full/path/to/php-cgi`
- Mongoose fails to start. If Mongoose exits immediately when run, this
usually indicates a syntax error in the configuration file
(named `mongoose.conf` by default) or the command-line arguments.
Syntax checking is omitted from Mongoose to keep its size low. However,
the Manual should be of help. Note: the syntax changes from time to time,
so updating the config file might be necessary after executable update.
- Embedding with OpenSSL on Windows might fail because of calling convention.
To force Mongoose to use `__stdcall` convention, add `/Gz` compilation
flag in Visual Studio compiler.
# Embedding
Embedding Mongoose is easy. Copy
[mongoose.c](https://github.com/valenok/mongoose/blob/master/mongoose.c) and
[mongoose.h](https://github.com/valenok/mongoose/blob/master/mongoose.h)
to your application's source tree and include them in the build. For
example, your application's code lives in C file `my_app.c`, then on UNIX
this command embeds Mongoose:
$ ls
my_app.c mongoose.c mongoose.h
$ gcc my_app.c mongoose.c -o my_app -ldl -pthread
Somewhere in the application code, call `mg_start()` to start the server.
Pass configuration options and event handlers to `mg_start()`.
Mongoose then calls handlers when certain events happen.
For example, when new request arrives, Mongoose calls `begin_request`
handler function to let user handle the request. In the handler, user code
can get all information about the request -- parsed headers, etcetera.
Mongoose API is logically divided in three categories: server setup/shutdown
functions, functions to be used by user-written event handlers, and
convenience utility functions.
### Starting and stopping embedded web server
To start the embedded web server, call `mg_start()`. To stop it, call
`mg_stop()`.
// This structure needs to be passed to mg_start(), to let mongoose know
// which callbacks to invoke. For detailed description, see
// https://github.com/valenok/mongoose/blob/master/UserManual.md
struct mg_callbacks {
int (*begin_request)(struct mg_connection *);
void (*end_request)(const struct mg_connection *, int reply_status_code);
int (*log_message)(const struct mg_connection *, const char *message);
int (*init_ssl)(void *ssl_context);
int (*websocket_connect)(const struct mg_connection *);
void (*websocket_ready)(struct mg_connection *);
int (*websocket_data)(struct mg_connection *);
const char * (*open_file)(const struct mg_connection *,
const char *path, size_t *data_len);
void (*init_lua)(struct mg_connection *, void *lua_context);
void (*upload)(struct mg_connection *, const char *file_name);
int (*http_error)(struct mg_connection *, int status);
};
[hello.c](https://github.com/valenok/mongoose/blob/master/examples/hello.c)
provides a minimalistic example.
Common pattern is to implement `begin_request` callback, and serve static files
from memory, and/or construct dynamic replies on the fly. Here is
my [embed.c](https://gist.github.com/valenok/4714740) gist
that shows how to easily any data can be embedded
directly into the executable. If such data needs to be encrypted, then
encrypted database or encryption dongles would be a better choice.
# Build on Android
This is a small guide to help you run mongoose on Android. Currently it is
tested on the HTC Wildfire. If you have managed to run it on other devices
as well, please comment or drop an email in the mailing list.
Note : You dont need root access to run mongoose on Android.
- Download the source from the Downloads page.
- Download the Android NDK from [http://developer.android.com/tools/sdk/ndk/index.html](http://developer.android.com/tools/sdk/ndk/index.html)
- Run `/path-to-ndk/ndk-build -C /path-to-mongoose/build`
That should generate mongoose/lib/armeabi/mongoose
- Using the adb tool (you need to have Android SDK installed for that),
push the generated mongoose binary to `/data/local` folder on device.
- From adb shell, navigate to `/data/local` and execute `./mongoose`.
- To test if the server is running fine, visit your web-browser and
navigate to `http://127.0.0.1:8080` You should see the `Index of /` page.
![screenshot](https://a248.e.akamai.net/camo.github.com/b88428bf009a2b6141000937ab684e04cc8586af/687474703a2f2f692e696d6775722e636f6d2f62676f6b702e706e67)
Notes:
- `jni` stands for Java Native Interface. Read up on Android NDK if you want
to know how to interact with the native C functions of mongoose in Android
Java applications.
- TODO: A Java application that interacts with the native binary or a
shared library.
# Mongoose internals
Mongoose is multithreaded web server. `mg_start()` function allocates
web server context (`struct mg_context`), which holds all information
about web server instance:
- configuration options. Note that mongoose makes internal copies of
passed options.
- SSL context, if any
- user-defined callbacks
- opened listening sockets
- a queue for accepted sockets
- mutexes and condition variables for inter-thread synchronization
When `mg_start()` returns, all initialization is quaranteed to be complete
(e.g. listening ports are opened, SSL is initialized, etc). `mg_start()` starts
two threads: a master thread, that accepts new connections, and several
worker threads, that process accepted connections. The number of worker threads
is configurable via `num_threads` configuration option. That number puts a
limit on number of simultaneous requests that can be handled by mongoose.
When master thread accepts new connection, a new accepted socket (described by
`struct socket`) it placed into the accepted sockets queue,
which has size of 20 (see [code](https://github.com/valenok/mongoose/blob/3892e0199e6ca9613b160535d9d107ede09daa43/mongoose.c#L486)). Any idle worker thread
can grab accepted sockets from that queue. If all worker threads are busy,
master thread can accept and queue up to 20 more TCP connections,
filling up the queue.
In the attempt to queue next accepted connection, master thread blocks
until there is space in a queue. When master thread is blocked on a
full queue, TCP layer in OS can also queue incoming connection.
The number is limited by the `listen()` call parameter on listening socket,
which is `SOMAXCONN` in case of Mongoose, and depends on a platform.
Worker threads are running in an infinite loop, which in simplified form
looks something like this:
static void *worker_thread() {
while (consume_socket()) {
process_new_connection();
}
}
Function `consume_socket()` gets new accepted socket from the mongoose socket
queue, atomically removing it from the queue. If the queue is empty,
`consume_socket()` blocks and waits until new sockets are placed in a queue
by the master thread. `process_new_connection()` actually processes the
connection, i.e. reads the request, parses it, and performs appropriate action
depending on a parsed request.
Master thread uses `poll()` and `accept()` to accept new connections on
listening sockets. `poll()` is used to avoid `FD_SETSIZE` limitation of
`select()`. Since there are only a few listening sockets, there is no reason
to use hi-performance alternatives like `epoll()` or `kqueue()`. Worker
threads use blocking IO on accepted sockets for reading and writing data.
All accepted sockets have `SO_RCVTIMEO` and `SO_SNDTIMEO` socket options set
(controlled by `request_timeout_ms` mongoose option, 30 seconds default) which
specify read/write timeout on client connection.
# Other Resources
- Presentation made by Arnout Vandecappelle at FOSDEM 2011 on 2011-02-06
in Brussels, Belgium, called
"Creating secure web based user interfaces for Embedded Devices"
([pdf](http://mind.be/content/110206_Web-ui.pdf) |
[odp](http://mind.be/content/110206_Web-ui.odp))
- Linux Journal article by Michel J.Hammel, 2010-04-01, called
[Mongoose: an Embeddable Web Server in C](http://www.linuxjournal.com/article/10680)
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key> <string>Mongoose</string>
<key>CFBundlePackageType</key> <string>APPL</string>
<key>CFBundleTypeRole</key> <string>None</string>
<key>CFBundleIconFiles</key> <array>
<string>mongoose_16x16.png</string>
<string>mongoose_22x22.png</string>
<string>mongoose_32x32.png</string>
<string>mongoose_64x64.png</string>
</array>
<key>LSUIElement</key> <true/>
<key>RunAtLoad</key> <true/>
<key>Label</key> <string>com.kolkin.mongoose</string>
<key>ProgramArguments</key> <array> </array>
<key>KeepAlive</key> <true/>
</dict>
</plist>
-218
View File
@@ -1,218 +0,0 @@
# This Makefile is part of Mongoose web server project,
# https://github.com/valenok/mongoose
#
# This Makefile is GNU make compatible. You can get GNU Make from
# http://gnuwin32.sourceforge.net/packages/make.htm
#
# Example custom build:
# COPT="-g -O0 -DNO_SSL_DL -DUSE_LUA -llua -lcrypto -lssl" make linux
#
# Flags are:
# -DHAVE_MD5 - use system md5 library (-2kb)
# -DNDEBUG - strip off all debug code (-5kb)
# -DDEBUG - build debug version (very noisy) (+7kb)
# -DNO_CGI - disable CGI support (-5kb)
# -DNO_SSL - disable SSL functionality (-2kb)
# -DNO_SSL_DL - link against system libssl library (-1kb)
# -DCONFIG_FILE=\"file\" - use `file' as the default config file
# -DSSL_LIB=\"libssl.so.<version>\" - use system versioned SSL shared object
# -DCRYPTO_LIB=\"libcrypto.so.<version>\" - use system versioned CRYPTO so
# -DUSE_LUA - embed Lua in Mongoose (+100kb)
PROG = mongoose
CFLAGS = -std=c99 -O2 -W -Wall -pedantic -pthread -pipe -I.. $(COPT)
# To build with Lua, download and unzip Lua 5.2.1 source code into the
# mongoose directory, and then add $(LUA_SOURCES) to CFLAGS
LUA = ../lua-5.2.1/src
LUA_FLAGS = -DLUA_COMPAT_ALL
LUA_SOURCES = $(LUA)/lapi.c $(LUA)/lcode.c $(LUA)/lctype.c \
$(LUA)/ldebug.c $(LUA)/ldo.c $(LUA)/ldump.c \
$(LUA)/lfunc.c $(LUA)/lgc.c $(LUA)/llex.c \
$(LUA)/lmem.c $(LUA)/lobject.c $(LUA)/lopcodes.c \
$(LUA)/lparser.c $(LUA)/lstate.c $(LUA)/lstring.c \
$(LUA)/ltable.c $(LUA)/ltm.c $(LUA)/lundump.c \
$(LUA)/lvm.c $(LUA)/lzio.c $(LUA)/lauxlib.c \
$(LUA)/lbaselib.c $(LUA)/lbitlib.c $(LUA)/lcorolib.c \
$(LUA)/ldblib.c $(LUA)/liolib.c $(LUA)/lmathlib.c \
$(LUA)/loslib.c $(LUA)/lstrlib.c $(LUA)/ltablib.c \
$(LUA)/loadlib.c $(LUA)/linit.c
LUA_HEADERS = $(LUA)/llimits.h $(LUA)/lobject.h $(LUA)/lapi.h $(LUA)/lzio.h \
$(LUA)/ldo.h $(LUA)/ltm.h $(LUA)/lstate.h $(LUA)/lgc.h \
$(LUA)/lvm.h $(LUA)/ltable.h $(LUA)/lstring.h $(LUA)/lfunc.h \
$(LUA)/lundump.h $(LUA)/ldebug.h $(LUA)/lopcodes.h $(LUA)/llex.h \
$(LUA)/lparser.h $(LUA)/lcode.h $(LUA)/lmem.h $(LUA)/lctype.h
LUA_WINOBJS = $(LUA_SOURCES:%.c=%.obj)
ifneq ($(OS), Windows_NT)
LUA_FLAGS += -DLUA_USE_DLOPEN
endif
lua_5.2.1.c: lua_5.2.1.h
(echo '#define LUA_CORE' ; \
echo '#define LUA_LIB' ; \
echo '#define lobject_c' ; \
echo '#define lua_c' ; \
echo '#define ltable_c' ; \
echo '#include "lua_5.2.1.h"' ; \
cat $(LUA_HEADERS) $(LUA_SOURCES) | sed '/^#include "/d') > $@
lua_5.2.1.h:
cat $(LUA)/luaconf.h $(LUA)/lua.h $(LUA)/lauxlib.h $(LUA)/lualib.h | \
sed '/^#include "/d' > $@
# Stock windows binary builds with Lua and YASSL library.
YASSL = ../../cyassl-2.4.6
YASSL_FLAGS = -I $(YASSL) -I $(YASSL)/cyassl \
-D _LIB -D OPENSSL_EXTRA -D HAVE_ERRNO_H \
-D HAVE_GETHOSTBYNAME -D HAVE_INET_NTOA -D HAVE_LIMITS_H \
-D HAVE_MEMSET -D HAVE_SOCKET -D HAVE_STDDEF_H -D HAVE_STDLIB_H \
-D HAVE_STRING_H -D HAVE_SYS_STAT_H -D HAVE_SYS_TYPES_H
YASSL_SOURCES = \
$(YASSL)/src/internal.c $(YASSL)/src/io.c $(YASSL)/src/keys.c \
$(YASSL)/src/ssl.c $(YASSL)/src/tls.c $(YASSL)/ctaocrypt/src/hmac.c \
$(YASSL)/ctaocrypt/src/random.c $(YASSL)/ctaocrypt/src/sha.c \
$(YASSL)/ctaocrypt/src/sha256.c $(YASSL)/ctaocrypt/src/logging.c \
$(YASSL)/ctaocrypt/src/error.c $(YASSL)/ctaocrypt/src/rsa.c \
$(YASSL)/ctaocrypt/src/des3.c $(YASSL)/ctaocrypt/src/asn.c \
$(YASSL)/ctaocrypt/src/coding.c $(YASSL)/ctaocrypt/src/arc4.c \
$(YASSL)/ctaocrypt/src/md4.c $(YASSL)/ctaocrypt/src/md5.c \
$(YASSL)/ctaocrypt/src/dh.c $(YASSL)/ctaocrypt/src/dsa.c \
$(YASSL)/ctaocrypt/src/pwdbased.c $(YASSL)/ctaocrypt/src/aes.c \
$(YASSL)/ctaocrypt/src/md2.c $(YASSL)/ctaocrypt/src/ripemd.c \
$(YASSL)/ctaocrypt/src/sha512.c $(YASSL)/src/sniffer.c \
$(YASSL)/ctaocrypt/src/rabbit.c $(YASSL)/ctaocrypt/src/misc.c \
$(YASSL)/ctaocrypt/src/tfm.c $(YASSL)/ctaocrypt/src/integer.c \
$(YASSL)/ctaocrypt/src/ecc.c $(YASSL)/src/ocsp.c $(YASSL)/src/crl.c \
$(YASSL)/ctaocrypt/src/hc128.c $(YASSL)/ctaocrypt/src/memory.c
ALL_SOURCES = ../mongoose.c main.c sqlite3.c lsqlite3.c lua_5.2.1.c \
$(YASSL_SOURCES)
ALL_OBJECTS = $(ALL_SOURCES:%.c=%.o)
ALL_WINOBJS = $(ALL_SOURCES:%.c=%.obj)
SQLITE_FLAGS = -DTHREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
MONGOOSE_FLAGS = -DNO_SSL_DL -DUSE_LUA -DUSE_LUA_SQLITE3 -I.. $(COPT)
FLAGS = $(MONGOOSE_FLAGS) $(SQLITE_FLAGS) $(YASSL_FLAGS) $(LUA_FLAGS)
# Using Visual Studio 6.0. To build Mongoose:
# Set MSVC variable below to where VS 6.0 is installed on your system
# Run "PATH_TO_VC6\bin\nmake windows"
MSVC = ../../vc6
#DBG = /Zi /Od
DBG = /DNDEBUG /O1
CL = $(MSVC)/bin/cl /MD /TC /nologo $(DBG) /W3 /GA /I$(MSVC)/include
LINK_FLAGS = /incremental:no /libpath:$(MSVC)/lib /machine:IX86 \
user32.lib shell32.lib comdlg32.lib ws2_32.lib advapi32.lib
LINK = $(MSVC)/bin/link $(LINK_FLAGS)
all:
@echo "make (linux|bsd|solaris|mac|windows|mingw|cygwin)"
%.obj: %.c
$(CL) /c $(FLAGS) /Fo$@ $<
%.o: %.c
$(CC) -o $@ $< -c $(FLAGS) $(CFLAGS)
# Lua library for Windows
lua.lib: $(LUA_WINOBJS)
$(MSVC)/bin/lib /out:$@ $(LUA_WINOBJS)
# To build with lua, make sure you have Lua unpacked into lua-5.2.1 directory
linux_lua: $(ALL_OBJECTS)
$(CC) $(ALL_OBJECTS) -o $(PROG) -ldl
mongoose.o: mod_lua.c
# Make sure that the compiler flags come last in the compilation string.
# If not so, this can break some on some Linux distros which use
# "-Wl,--as-needed" turned on by default in cc command.
# Also, this is turned in many other distros in static linkage builds.
linux:
$(CC) ../mongoose.c main.c -o $(PROG) -ldl $(CFLAGS)
mac: bsd
bsd:
$(CC) ../mongoose.c main.c -o $(PROG) $(CFLAGS)
bsd_lua: $(ALL_OBJECTS)
$(CC) $(ALL_OBJECTS) -o $@
solaris:
$(CC) ../mongoose.c main.c -lnsl -lsocket -o $(PROG) $(CFLAGS)
lib$(PROG).a: $(ALL_OBJECTS)
ar cr $@ $(ALL_OBJECTS)
$(PROG).lib: $(ALL_WINOBJS)
$(MSVC)/bin/lib /out:$@ $(ALL_WINOBJS)
# For codesign to work in non-interactive mode, unlock login keychain:
# security unlock ~/Library/Keychains/login.keychain
# See e.g. http://lists.apple.com/archives/apple-cdsa/2008/Jan/msg00027.html
Mongoose: ../mongoose.c main.c
$(CC) $(ALL_SOURCES) \
-DUSE_COCOA $(CFLAGS) $(FLAGS) -mmacosx-version-min=10.4 \
-framework Cocoa -ObjC -arch i386 -arch x86_64 -o Mongoose
cocoa: Mongoose
V=`perl -lne '/define\s+MONGOOSE_VERSION\s+"(\S+)"/ and print $$1' ../mongoose.c`; DIR=dmg/Mongoose.app && rm -rf $$DIR && mkdir -p $$DIR/Contents/{MacOS,Resources} && install -m 644 mongoose_*.png $$DIR/Contents/Resources/ && install -m 644 Info.plist $$DIR/Contents/ && install -m 755 Mongoose $$DIR/Contents/MacOS/ && ln -fs /Applications dmg/ ; hdiutil create Mongoose_$$V.dmg -volname "Mongoose $$V" -srcfolder dmg -ov #; rm -rf dmg
un:
$(CC) ../test/unit_test.c -o unit_test lua_5.2.1.c $(CFLAGS) -g -O0
./unit_test
wi:
$(CL) test/unit_test.c $(LUA_SOURCES) $(LUA_FLAGS) \
$(YASSL_SOURCES) $(YASSL_FLAGS) /I. /DNO_SSL_DL \
/link /libpath:$(MSVC)/lib advapi32.lib /out:unit_test.exe
./unit_test.exe
windows: $(ALL_WINOBJS)
$(MSVC)/bin/rc res.rc
$(LINK) /nologo $(ALL_WINOBJS) res.res /out:$(PROG).exe
windows_tiny: $(ALL_SOURCES)
$(MSVC)/bin/rc res.rc
$(CL) /nologo ../mongoose.c main.c /I.. \
/link $(LINK_FLAGS) res.res /out:$(PROG)-tiny.exe
# Build for Windows under MinGW
#MINGWDBG= -DDEBUG -O0 -ggdb
MINGWDBG= -DNDEBUG -Os
MINGWOPT= -W -Wall -mthreads -Wl,--subsystem,console $(MINGWDBG) -DHAVE_STDINT $(GCC_WARNINGS) $(COPT)
mingw:
windres res.rc res.o
$(CC) $(MINGWOPT) ../mongoose.c -lws2_32 \
-shared -Wl,--out-implib=$(PROG).lib -o $(PROG).dll
$(CC) $(MINGWOPT) ../mongoose.c main.c res.o \
-lws2_32 -ladvapi32 -lcomdlg32 -o $(PROG).exe
# Build for Windows under Cygwin
#CYGWINDBG= -DDEBUG -O0 -ggdb
CYGWINDBG= -DNDEBUG -Os
CYGWINOPT= -W -Wall -mthreads -Wl,--subsystem,console $(CYGWINDBG) -DHAVE_STDINT $(GCC_WARNINGS) $(COPT)
cygwin:
windres res.rc res.o
$(CC) $(CYGWINOPT) ../mongoose.c -lws2_32 \
-shared -Wl,--out-implib=$(PROG).lib -o $(PROG).dll
$(CC) $(CYGWINOPT) -I.. ../mongoose.c main.c res.o \
-lws2_32 -ladvapi32 -o $(PROG).exe
tests:
perl ../test/test.pl $(TEST)
tarball: clean
F=mongoose-`perl -lne '/define\s+MONGOOSE_VERSION\s+"(\S+)"/ and print $$1' ../mongoose.c`.tgz ; cd ../.. && tar -czf x mongoose/{LICENSE,*.[ch]} && mv x mongoose/build/$$F
release: tarball cocoa
wine make windows windows_tiny
V=`perl -lne '/define\s+MONGOOSE_VERSION\s+"(\S+)"/ and print $$1' ../mongoose.c`; upx mongoose.exe; upx mongoose-tiny.exe ; cp mongoose.exe mongoose-$$V.exe; cp mongoose-tiny.exe mongoose-tiny-$$V.exe; cp mongoose.exe mongoose_php_bundle/; zip -r mongoose-php-$$V.zip mongoose_php_bundle/
clean:
cd ../examples && $(MAKE) clean
rm -rf *.o *.core $(PROG) *.obj *.so $(PROG).txt *.dSYM *.tgz \
$(PROG).exe *.dll *.lib res.o res.RES *.dSYM *.zip *.pdb \
*.exe *dmg* $(ALL_OBJECTS) $(ALL_WINOBJS)
-15
View File
@@ -1,15 +0,0 @@
LIBRARY
EXPORTS
mg_start
mg_stop
mg_read
mg_write
mg_printf
mg_get_header
mg_get_var
mg_get_cookie
mg_get_option
mg_get_valid_option_names
mg_version
mg_modify_passwords_file
mg_md5
-6
View File
@@ -1,6 +0,0 @@
LOCAL_PATH := $(call my-dir)/../..
include $(CLEAR_VARS)
LOCAL_CFLAGS := -std=c99 -O2 -W -Wall -pthread -pipe $(COPT)
LOCAL_MODULE := mongoose
LOCAL_SRC_FILES := main.c mongoose.c
include $(BUILD_EXECUTABLE)
-1883
View File
File diff suppressed because it is too large. Load diff
-17698
View File
File diff suppressed because it is too large. Load diff
-1247
View File
File diff suppressed because it is too large. Load diff
-985
View File
@@ -1,985 +0,0 @@
// Copyright (c) 2004-2013 Sergey Lyubka
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if defined(_WIN32)
#define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005
#else
#define _XOPEN_SOURCE 600 // For PATH_MAX on linux
#endif
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdarg.h>
#include <ctype.h>
#include "mongoose.h"
#ifdef _WIN32
#include <windows.h>
#include <winsvc.h>
#include <shlobj.h>
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH
#endif
#ifndef S_ISDIR
#define S_ISDIR(x) ((x) & _S_IFDIR)
#endif
#define DIRSEP '\\'
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define sleep(x) Sleep((x) * 1000)
#define WINCDECL __cdecl
#define abs_path(rel, abs, abs_size) _fullpath((abs), (rel), (abs_size))
#else
#include <sys/wait.h>
#include <unistd.h>
#define DIRSEP '/'
#define WINCDECL
#define abs_path(rel, abs, abs_size) realpath((rel), (abs))
#endif // _WIN32
#define MAX_OPTIONS 100
#define MAX_CONF_FILE_LINE_SIZE (8 * 1024)
static int exit_flag;
static char server_name[40]; // Set by init_server_name()
static char config_file[PATH_MAX]; // Set by process_command_line_arguments()
static struct mg_context *ctx; // Set by start_mongoose()
#if !defined(CONFIG_FILE)
#define CONFIG_FILE "mongoose.conf"
#endif /* !CONFIG_FILE */
static void WINCDECL signal_handler(int sig_num) {
#if !defined(_WIN32)
// Do not do the trick with ignoring SIGCHLD, cause not all OSes (e.g. QNX)
// reap zombies if SIGCHLD is ignored. On QNX, for example, waitpid()
// fails if SIGCHLD is ignored, making system() non-functional.
if (sig_num == SIGCHLD) {
do {} while (waitpid(-1, &sig_num, WNOHANG) > 0);
} else
#endif
{ exit_flag = sig_num; }
}
static void die(const char *fmt, ...) {
va_list ap;
char msg[200];
va_start(ap, fmt);
vsnprintf(msg, sizeof(msg), fmt, ap);
va_end(ap);
#if defined(_WIN32)
MessageBox(NULL, msg, "Error", MB_OK);
#else
fprintf(stderr, "%s\n", msg);
#endif
exit(EXIT_FAILURE);
}
static void show_usage_and_exit(void) {
const char **names;
int i;
fprintf(stderr, "Mongoose version %s (c) Sergey Lyubka, built on %s\n",
mg_version(), __DATE__);
fprintf(stderr, "Usage:\n");
fprintf(stderr, " mongoose -A <htpasswd_file> <realm> <user> <passwd>\n");
fprintf(stderr, " mongoose [config_file]\n");
fprintf(stderr, " mongoose [-option value ...]\n");
fprintf(stderr, "\nOPTIONS:\n");
names = mg_get_valid_option_names();
for (i = 0; names[i] != NULL; i += 2) {
fprintf(stderr, " -%s %s\n",
names[i], names[i + 1] == NULL ? "<empty>" : names[i + 1]);
}
exit(EXIT_FAILURE);
}
#if defined(_WIN32) || defined(USE_COCOA)
static const char *config_file_top_comment =
"# Mongoose web server configuration file.\n"
"# For detailed description of every option, visit\n"
"# https://github.com/valenok/mongoose/blob/master/UserManual.md\n"
"# Lines starting with '#' and empty lines are ignored.\n"
"# To make a change, remove leading '#', modify option's value,\n"
"# save this file and then restart Mongoose.\n\n";
static const char *get_url_to_first_open_port(const struct mg_context *ctx) {
static char url[100];
const char *open_ports = mg_get_option(ctx, "listening_ports");
int a, b, c, d, port, n;
if (sscanf(open_ports, "%d.%d.%d.%d:%d%n", &a, &b, &c, &d, &port, &n) == 5) {
snprintf(url, sizeof(url), "%s://%d.%d.%d.%d:%d",
open_ports[n] == 's' ? "https" : "http", a, b, c, d, port);
} else if (sscanf(open_ports, "%d%n", &port, &n) == 1) {
snprintf(url, sizeof(url), "%s://localhost:%d",
open_ports[n] == 's' ? "https" : "http", port);
} else {
snprintf(url, sizeof(url), "%s", "http://localhost:8080");
}
return url;
}
static void create_config_file(const char *path) {
const char **names, *value;
FILE *fp;
int i;
// Create config file if it is not present yet
if ((fp = fopen(path, "r")) != NULL) {
fclose(fp);
} else if ((fp = fopen(path, "a+")) != NULL) {
fprintf(fp, "%s", config_file_top_comment);
names = mg_get_valid_option_names();
for (i = 0; names[i * 2] != NULL; i++) {
value = mg_get_option(ctx, names[i * 2]);
fprintf(fp, "# %s %s\n", names[i * 2], value ? value : "<value>");
}
fclose(fp);
}
}
#endif
static char *sdup(const char *str) {
char *p;
if ((p = (char *) malloc(strlen(str) + 1)) != NULL) {
strcpy(p, str);
}
return p;
}
static void set_option(char **options, const char *name, const char *value) {
int i;
for (i = 0; i < MAX_OPTIONS - 3; i++) {
if (options[i] == NULL) {
options[i] = sdup(name);
options[i + 1] = sdup(value);
options[i + 2] = NULL;
break;
} else if (!strcmp(options[i], name)) {
free(options[i + 1]);
options[i + 1] = sdup(value);
break;
}
}
if (i == MAX_OPTIONS - 3) {
die("%s", "Too many options specified");
}
}
static void process_command_line_arguments(char *argv[], char **options) {
char line[MAX_CONF_FILE_LINE_SIZE], opt[sizeof(line)], val[sizeof(line)], *p;
FILE *fp = NULL;
size_t i, cmd_line_opts_start = 1, line_no = 0;
// Should we use a config file ?
if (argv[1] != NULL && argv[1][0] != '-') {
snprintf(config_file, sizeof(config_file), "%s", argv[1]);
cmd_line_opts_start = 2;
} else if ((p = strrchr(argv[0], DIRSEP)) == NULL) {
// No command line flags specified. Look where binary lives
snprintf(config_file, sizeof(config_file), "%s", CONFIG_FILE);
} else {
snprintf(config_file, sizeof(config_file), "%.*s%c%s",
(int) (p - argv[0]), argv[0], DIRSEP, CONFIG_FILE);
}
fp = fopen(config_file, "r");
// If config file was set in command line and open failed, die
if (cmd_line_opts_start == 2 && fp == NULL) {
die("Cannot open config file %s: %s", config_file, strerror(errno));
}
// Load config file settings first
if (fp != NULL) {
fprintf(stderr, "Loading config file %s\n", config_file);
// Loop over the lines in config file
while (fgets(line, sizeof(line), fp) != NULL) {
line_no++;
// Ignore empty lines and comments
for (i = 0; isspace(* (unsigned char *) &line[i]); ) i++;
if (line[i] == '#' || line[i] == '\0') {
continue;
}
if (sscanf(line, "%s %[^\r\n#]", opt, val) != 2) {
printf("%s: line %d is invalid, ignoring it:\n %s",
config_file, (int) line_no, line);
} else {
set_option(options, opt, val);
}
}
(void) fclose(fp);
}
// If we're under MacOS and started by launchd, then the second
// argument is process serial number, -psn_.....
// In this case, don't process arguments at all.
if (argv[1] == NULL || memcmp(argv[1], "-psn_", 5) != 0) {
// Handle command line flags.
// They override config file and default settings.
for (i = cmd_line_opts_start; argv[i] != NULL; i += 2) {
if (argv[i][0] != '-' || argv[i + 1] == NULL) {
show_usage_and_exit();
}
set_option(options, &argv[i][1], argv[i + 1]);
}
}
}
static void init_server_name(void) {
snprintf(server_name, sizeof(server_name), "Mongoose web server v.%s",
mg_version());
}
static int log_message(const struct mg_connection *conn, const char *message) {
(void) conn;
printf("%s\n", message);
return 0;
}
static int is_path_absolute(const char *path) {
#ifdef _WIN32
return path != NULL &&
((path[0] == '\\' && path[1] == '\\') || // UNC path, e.g. \\server\dir
(isalpha(path[0]) && path[1] == ':' && path[2] == '\\')); // E.g. X:\dir
#else
return path != NULL && path[0] == '/';
#endif
}
static char *get_option(char **options, const char *option_name) {
int i;
for (i = 0; options[i] != NULL; i++)
if (!strcmp(options[i], option_name))
return options[i + 1];
return NULL;
}
static void verify_existence(char **options, const char *option_name,
int must_be_dir) {
struct stat st;
const char *path = get_option(options, option_name);
if (path != NULL && (stat(path, &st) != 0 ||
((S_ISDIR(st.st_mode) ? 1 : 0) != must_be_dir))) {
die("Invalid path for %s: [%s]: (%s). Make sure that path is either "
"absolute, or it is relative to mongoose executable.",
option_name, path, strerror(errno));
}
}
static void set_absolute_path(char *options[], const char *option_name,
const char *path_to_mongoose_exe) {
char path[PATH_MAX], abs[PATH_MAX], *option_value;
const char *p;
// Check whether option is already set
option_value = get_option(options, option_name);
// If option is already set and it is an absolute path,
// leave it as it is -- it's already absolute.
if (option_value != NULL && !is_path_absolute(option_value)) {
// Not absolute. Use the directory where mongoose executable lives
// be the relative directory for everything.
// Extract mongoose executable directory into path.
if ((p = strrchr(path_to_mongoose_exe, DIRSEP)) == NULL) {
getcwd(path, sizeof(path));
} else {
snprintf(path, sizeof(path), "%.*s", (int) (p - path_to_mongoose_exe),
path_to_mongoose_exe);
}
strncat(path, "/", sizeof(path) - 1);
strncat(path, option_value, sizeof(path) - 1);
// Absolutize the path, and set the option
abs_path(path, abs, sizeof(abs));
set_option(options, option_name, abs);
}
}
static void start_mongoose(int argc, char *argv[]) {
struct mg_callbacks callbacks;
char *options[MAX_OPTIONS];
int i;
// Edit passwords file if -A option is specified
if (argc > 1 && !strcmp(argv[1], "-A")) {
if (argc != 6) {
show_usage_and_exit();
}
exit(mg_modify_passwords_file(argv[2], argv[3], argv[4], argv[5]) ?
EXIT_SUCCESS : EXIT_FAILURE);
}
// Show usage if -h or --help options are specified
if (argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))) {
show_usage_and_exit();
}
options[0] = NULL;
set_option(options, "document_root", ".");
// Update config based on command line arguments
process_command_line_arguments(argv, options);
// Make sure we have absolute paths for files and directories
// https://github.com/valenok/mongoose/issues/181
set_absolute_path(options, "document_root", argv[0]);
set_absolute_path(options, "put_delete_auth_file", argv[0]);
set_absolute_path(options, "cgi_interpreter", argv[0]);
set_absolute_path(options, "access_log_file", argv[0]);
set_absolute_path(options, "error_log_file", argv[0]);
set_absolute_path(options, "global_auth_file", argv[0]);
set_absolute_path(options, "ssl_certificate", argv[0]);
// Make extra verification for certain options
verify_existence(options, "document_root", 1);
verify_existence(options, "cgi_interpreter", 0);
verify_existence(options, "ssl_certificate", 0);
// Setup signal handler: quit on Ctrl-C
signal(SIGTERM, signal_handler);
signal(SIGINT, signal_handler);
// Start Mongoose
memset(&callbacks, 0, sizeof(callbacks));
callbacks.log_message = &log_message;
ctx = mg_start(&callbacks, NULL, (const char **) options);
for (i = 0; options[i] != NULL; i++) {
free(options[i]);
}
if (ctx == NULL) {
die("%s", "Failed to start Mongoose.");
}
}
#ifdef _WIN32
enum {
ID_ICON = 100, ID_QUIT, ID_SETTINGS, ID_SEPARATOR, ID_INSTALL_SERVICE,
ID_REMOVE_SERVICE, ID_STATIC, ID_GROUP, ID_SAVE, ID_RESET_DEFAULTS,
ID_STATUS, ID_CONNECT,
// All dynamically created text boxes for options have IDs starting from
// ID_CONTROLS, incremented by one.
ID_CONTROLS = 200,
// Text boxes for files have "..." buttons to open file browser. These
// buttons have IDs that are ID_FILE_BUTTONS_DELTA higher than associated
// text box ID.
ID_FILE_BUTTONS_DELTA = 1000
};
static HICON hIcon;
static SERVICE_STATUS ss;
static SERVICE_STATUS_HANDLE hStatus;
static const char *service_magic_argument = "--";
static NOTIFYICONDATA TrayIcon;
static void WINAPI ControlHandler(DWORD code) {
if (code == SERVICE_CONTROL_STOP || code == SERVICE_CONTROL_SHUTDOWN) {
ss.dwWin32ExitCode = 0;
ss.dwCurrentState = SERVICE_STOPPED;
}
SetServiceStatus(hStatus, &ss);
}
static void WINAPI ServiceMain(void) {
ss.dwServiceType = SERVICE_WIN32;
ss.dwCurrentState = SERVICE_RUNNING;
ss.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
hStatus = RegisterServiceCtrlHandler(server_name, ControlHandler);
SetServiceStatus(hStatus, &ss);
while (ss.dwCurrentState == SERVICE_RUNNING) {
Sleep(1000);
}
mg_stop(ctx);
ss.dwCurrentState = SERVICE_STOPPED;
ss.dwWin32ExitCode = (DWORD) -1;
SetServiceStatus(hStatus, &ss);
}
static void show_error(void) {
char buf[256];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
buf, sizeof(buf), NULL);
MessageBox(NULL, buf, "Error", MB_OK);
}
static void *align(void *ptr, DWORD alig) {
ULONG ul = (ULONG) ptr;
ul += alig;
ul &= ~alig;
return ((void *) ul);
}
static int is_boolean_option(const char *option_name) {
return !strcmp(option_name, "enable_directory_listing") ||
!strcmp(option_name, "enable_keep_alive");
}
static int is_filename_option(const char *option_name) {
return !strcmp(option_name, "cgi_interpreter") ||
!strcmp(option_name, "global_auth_file") ||
!strcmp(option_name, "put_delete_auth_file") ||
!strcmp(option_name, "access_log_file") ||
!strcmp(option_name, "error_log_file") ||
!strcmp(option_name, "ssl_certificate");
}
static int is_directory_option(const char *option_name) {
return !strcmp(option_name, "document_root");
}
static int is_numeric_options(const char *option_name) {
return !strcmp(option_name, "num_threads");
}
static void save_config(HWND hDlg, FILE *fp) {
char value[2000];
const char **options, *name, *default_value;
int i, id;
fprintf(fp, "%s", config_file_top_comment);
options = mg_get_valid_option_names();
for (i = 0; options[i * 2] != NULL; i++) {
name = options[i * 2];
id = ID_CONTROLS + i;
if (is_boolean_option(name)) {
snprintf(value, sizeof(value), "%s",
IsDlgButtonChecked(hDlg, id) ? "yes" : "no");
} else {
GetDlgItemText(hDlg, id, value, sizeof(value));
}
default_value = options[i * 2 + 1] == NULL ? "" : options[i * 2 + 1];
// If value is the same as default, skip it
if (strcmp(value, default_value) != 0) {
fprintf(fp, "%s %s\n", name, value);
}
}
}
static BOOL CALLBACK DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP) {
FILE *fp;
int i;
const char *name, *value, **options = mg_get_valid_option_names();
switch (msg) {
case WM_CLOSE:
DestroyWindow(hDlg);
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case ID_SAVE:
EnableWindow(GetDlgItem(hDlg, ID_SAVE), FALSE);
if ((fp = fopen(config_file, "w+")) != NULL) {
save_config(hDlg, fp);
fclose(fp);
mg_stop(ctx);
start_mongoose(__argc, __argv);
}
EnableWindow(GetDlgItem(hDlg, ID_SAVE), TRUE);
break;
case ID_RESET_DEFAULTS:
for (i = 0; options[i * 2] != NULL; i++) {
name = options[i * 2];
value = options[i * 2 + 1] == NULL ? "" : options[i * 2 + 1];
if (is_boolean_option(name)) {
CheckDlgButton(hDlg, ID_CONTROLS + i, !strcmp(value, "yes") ?
BST_CHECKED : BST_UNCHECKED);
} else {
SetWindowText(GetDlgItem(hDlg, ID_CONTROLS + i), value);
}
}
break;
}
for (i = 0; options[i * 2] != NULL; i++) {
name = options[i * 2];
if ((is_filename_option(name) || is_directory_option(name)) &&
LOWORD(wParam) == ID_CONTROLS + i + ID_FILE_BUTTONS_DELTA) {
OPENFILENAME of;
BROWSEINFO bi;
char path[PATH_MAX] = "";
memset(&of, 0, sizeof(of));
of.lStructSize = sizeof(of);
of.hwndOwner = (HWND) hDlg;
of.lpstrFile = path;
of.nMaxFile = sizeof(path);
of.lpstrInitialDir = mg_get_option(ctx, "document_root");
of.Flags = OFN_CREATEPROMPT | OFN_NOCHANGEDIR;
memset(&bi, 0, sizeof(bi));
bi.hwndOwner = (HWND) hDlg;
bi.lpszTitle = "Choose WWW root directory:";
bi.ulFlags = BIF_RETURNONLYFSDIRS;
if (is_directory_option(name)) {
SHGetPathFromIDList(SHBrowseForFolder(&bi), path);
} else {
GetOpenFileName(&of);
}
if (path[0] != '\0') {
SetWindowText(GetDlgItem(hDlg, ID_CONTROLS + i), path);
}
}
}
break;
case WM_INITDIALOG:
SendMessage(hDlg, WM_SETICON,(WPARAM) ICON_SMALL, (LPARAM) hIcon);
SendMessage(hDlg, WM_SETICON,(WPARAM) ICON_BIG, (LPARAM) hIcon);
SetWindowText(hDlg, "Mongoose settings");
SetFocus(GetDlgItem(hDlg, ID_SAVE));
for (i = 0; options[i * 2] != NULL; i++) {
name = options[i * 2];
value = mg_get_option(ctx, name);
if (is_boolean_option(name)) {
CheckDlgButton(hDlg, ID_CONTROLS + i, !strcmp(value, "yes") ?
BST_CHECKED : BST_UNCHECKED);
} else {
SetDlgItemText(hDlg, ID_CONTROLS + i, value == NULL ? "" : value);
}
}
break;
default:
break;
}
return FALSE;
}
static void add_control(unsigned char **mem, DLGTEMPLATE *dia, WORD type,
DWORD id, DWORD style, WORD x, WORD y,
WORD cx, WORD cy, const char *caption) {
DLGITEMTEMPLATE *tp;
LPWORD p;
dia->cdit++;
*mem = align(*mem, 3);
tp = (DLGITEMTEMPLATE *) *mem;
tp->id = (WORD)id;
tp->style = style;
tp->dwExtendedStyle = 0;
tp->x = x;
tp->y = y;
tp->cx = cx;
tp->cy = cy;
p = align(*mem + sizeof(*tp), 1);
*p++ = 0xffff;
*p++ = type;
while (*caption != '\0') {
*p++ = (WCHAR) *caption++;
}
*p++ = 0;
p = align(p, 1);
*p++ = 0;
*mem = (unsigned char *) p;
}
static void show_settings_dialog() {
#define HEIGHT 15
#define WIDTH 400
#define LABEL_WIDTH 80
unsigned char mem[4096], *p;
const char **option_names, *long_option_name;
DWORD style;
DLGTEMPLATE *dia = (DLGTEMPLATE *) mem;
WORD i, cl, x, y, width, nelems = 0;
static int guard;
static struct {
DLGTEMPLATE template; // 18 bytes
WORD menu, class;
wchar_t caption[1];
WORD fontsiz;
wchar_t fontface[7];
} dialog_header = {{WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE |
DS_SETFONT | WS_DLGFRAME, WS_EX_TOOLWINDOW, 0, 200, 200, WIDTH, 0},
0, 0, L"", 8, L"Tahoma"};
if (guard == 0) {
guard++;
} else {
return;
}
(void) memset(mem, 0, sizeof(mem));
(void) memcpy(mem, &dialog_header, sizeof(dialog_header));
p = mem + sizeof(dialog_header);
option_names = mg_get_valid_option_names();
for (i = 0; option_names[i * 2] != NULL; i++) {
long_option_name = option_names[i * 2];
style = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
x = 10 + (WIDTH / 2) * (nelems % 2);
y = (nelems/2 + 1) * HEIGHT + 5;
width = WIDTH / 2 - 20 - LABEL_WIDTH;
if (is_numeric_options(long_option_name)) {
style |= ES_NUMBER;
cl = 0x81;
style |= WS_BORDER | ES_AUTOHSCROLL;
} else if (is_boolean_option(long_option_name)) {
cl = 0x80;
style |= BS_AUTOCHECKBOX;
} else if (is_filename_option(long_option_name) ||
is_directory_option(long_option_name)) {
style |= WS_BORDER | ES_AUTOHSCROLL;
width -= 20;
cl = 0x81;
add_control(&p, dia, 0x80,
ID_CONTROLS + i + ID_FILE_BUTTONS_DELTA,
WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
(WORD) (x + width + LABEL_WIDTH + 5),
y, 15, 12, "...");
} else {
cl = 0x81;
style |= WS_BORDER | ES_AUTOHSCROLL;
}
add_control(&p, dia, 0x82, ID_STATIC, WS_VISIBLE | WS_CHILD,
x, y, LABEL_WIDTH, HEIGHT, long_option_name);
add_control(&p, dia, cl, ID_CONTROLS + i, style,
(WORD) (x + LABEL_WIDTH), y, width, 12, "");
nelems++;
}
y = (WORD) (((nelems + 1) / 2 + 1) * HEIGHT + 5);
add_control(&p, dia, 0x80, ID_GROUP, WS_CHILD | WS_VISIBLE |
BS_GROUPBOX, 5, 5, WIDTH - 10, y, " Settings ");
y += 10;
add_control(&p, dia, 0x80, ID_SAVE,
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP,
WIDTH - 70, y, 65, 12, "Save Settings");
add_control(&p, dia, 0x80, ID_RESET_DEFAULTS,
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP,
WIDTH - 140, y, 65, 12, "Reset to defaults");
add_control(&p, dia, 0x82, ID_STATIC,
WS_CHILD | WS_VISIBLE | WS_DISABLED,
5, y, 180, 12, server_name);
dia->cy = ((nelems + 1) / 2 + 1) * HEIGHT + 30;
DialogBoxIndirectParam(NULL, dia, NULL, DlgProc, (LPARAM) NULL);
guard--;
}
static int manage_service(int action) {
static const char *service_name = "Mongoose";
SC_HANDLE hSCM = NULL, hService = NULL;
SERVICE_DESCRIPTION descr = {server_name};
char path[PATH_MAX + 20]; // Path to executable plus magic argument
int success = 1;
if ((hSCM = OpenSCManager(NULL, NULL, action == ID_INSTALL_SERVICE ?
GENERIC_WRITE : GENERIC_READ)) == NULL) {
success = 0;
show_error();
} else if (action == ID_INSTALL_SERVICE) {
GetModuleFileName(NULL, path, sizeof(path));
strncat(path, " ", sizeof(path));
strncat(path, service_magic_argument, sizeof(path));
hService = CreateService(hSCM, service_name, service_name,
SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
path, NULL, NULL, NULL, NULL, NULL);
if (hService) {
ChangeServiceConfig2(hService, SERVICE_CONFIG_DESCRIPTION, &descr);
} else {
show_error();
}
} else if (action == ID_REMOVE_SERVICE) {
if ((hService = OpenService(hSCM, service_name, DELETE)) == NULL ||
!DeleteService(hService)) {
show_error();
}
} else if ((hService = OpenService(hSCM, service_name,
SERVICE_QUERY_STATUS)) == NULL) {
success = 0;
}
CloseServiceHandle(hService);
CloseServiceHandle(hSCM);
return success;
}
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam) {
static SERVICE_TABLE_ENTRY service_table[] = {
{server_name, (LPSERVICE_MAIN_FUNCTION) ServiceMain},
{NULL, NULL}
};
int service_installed;
char buf[200], *service_argv[] = {__argv[0], NULL};
POINT pt;
HMENU hMenu;
static UINT s_uTaskbarRestart; // for taskbar creation
switch (msg) {
case WM_CREATE:
if (__argv[1] != NULL &&
!strcmp(__argv[1], service_magic_argument)) {
start_mongoose(1, service_argv);
StartServiceCtrlDispatcher(service_table);
exit(EXIT_SUCCESS);
} else {
start_mongoose(__argc, __argv);
s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
}
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case ID_QUIT:
mg_stop(ctx);
Shell_NotifyIcon(NIM_DELETE, &TrayIcon);
PostQuitMessage(0);
return 0;
case ID_SETTINGS:
show_settings_dialog();
break;
case ID_INSTALL_SERVICE:
case ID_REMOVE_SERVICE:
manage_service(LOWORD(wParam));
break;
case ID_CONNECT:
printf("[%s]\n", get_url_to_first_open_port(ctx));
ShellExecute(NULL, "open", get_url_to_first_open_port(ctx),
NULL, NULL, SW_SHOW);
break;
}
break;
case WM_USER:
switch (lParam) {
case WM_RBUTTONUP:
case WM_LBUTTONUP:
case WM_LBUTTONDBLCLK:
hMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_GRAYED, ID_SEPARATOR, server_name);
AppendMenu(hMenu, MF_SEPARATOR, ID_SEPARATOR, "");
service_installed = manage_service(0);
snprintf(buf, sizeof(buf), "NT service: %s installed",
service_installed ? "" : "not");
AppendMenu(hMenu, MF_STRING | MF_GRAYED, ID_SEPARATOR, buf);
AppendMenu(hMenu, MF_STRING | (service_installed ? MF_GRAYED : 0),
ID_INSTALL_SERVICE, "Install service");
AppendMenu(hMenu, MF_STRING | (!service_installed ? MF_GRAYED : 0),
ID_REMOVE_SERVICE, "Deinstall service");
AppendMenu(hMenu, MF_SEPARATOR, ID_SEPARATOR, "");
AppendMenu(hMenu, MF_STRING, ID_CONNECT, "Start browser");
AppendMenu(hMenu, MF_STRING, ID_SETTINGS, "Edit Settings");
AppendMenu(hMenu, MF_SEPARATOR, ID_SEPARATOR, "");
AppendMenu(hMenu, MF_STRING, ID_QUIT, "Exit");
GetCursorPos(&pt);
SetForegroundWindow(hWnd);
TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, hWnd, NULL);
PostMessage(hWnd, WM_NULL, 0, 0);
DestroyMenu(hMenu);
break;
}
break;
case WM_CLOSE:
mg_stop(ctx);
Shell_NotifyIcon(NIM_DELETE, &TrayIcon);
PostQuitMessage(0);
return 0; // We've just sent our own quit message, with proper hwnd.
default:
if (msg==s_uTaskbarRestart)
Shell_NotifyIcon(NIM_ADD, &TrayIcon);
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR cmdline, int show) {
WNDCLASS cls;
HWND hWnd;
MSG msg;
init_server_name();
memset(&cls, 0, sizeof(cls));
cls.lpfnWndProc = (WNDPROC) WindowProc;
cls.hIcon = LoadIcon(NULL, IDI_APPLICATION);
cls.lpszClassName = server_name;
RegisterClass(&cls);
hWnd = CreateWindow(cls.lpszClassName, server_name, WS_OVERLAPPEDWINDOW,
0, 0, 0, 0, NULL, NULL, NULL, NULL);
ShowWindow(hWnd, SW_HIDE);
TrayIcon.cbSize = sizeof(TrayIcon);
TrayIcon.uID = ID_ICON;
TrayIcon.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
TrayIcon.hIcon = hIcon = LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(ID_ICON),
IMAGE_ICON, 16, 16, 0);
TrayIcon.hWnd = hWnd;
snprintf(TrayIcon.szTip, sizeof(TrayIcon.szTip), "%s", server_name);
TrayIcon.uCallbackMessage = WM_USER;
Shell_NotifyIcon(NIM_ADD, &TrayIcon);
while (GetMessage(&msg, hWnd, 0, 0) > 0) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
// Return the WM_QUIT value.
return msg.wParam;
}
#elif defined(USE_COCOA)
#import <Cocoa/Cocoa.h>
@interface Mongoose : NSObject<NSApplicationDelegate>
- (void) openBrowser;
- (void) shutDown;
@end
@implementation Mongoose
- (void) openBrowser {
[[NSWorkspace sharedWorkspace]
openURL:[NSURL URLWithString:
[NSString stringWithUTF8String:get_url_to_first_open_port(ctx)]]];
}
- (void) editConfig {
create_config_file(config_file);
[[NSWorkspace sharedWorkspace]
openFile:[NSString stringWithUTF8String:config_file]
withApplication:@"TextEdit"];
}
- (void)shutDown{
[NSApp terminate:nil];
}
@end
int main(int argc, char *argv[]) {
init_server_name();
start_mongoose(argc, argv);
[NSAutoreleasePool new];
[NSApplication sharedApplication];
// Add delegate to process menu item actions
Mongoose *myDelegate = [[Mongoose alloc] autorelease];
[NSApp setDelegate: myDelegate];
// Run this app as agent
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToBackgroundApplication);
SetFrontProcess(&psn);
// Add status bar menu
id menu = [[NSMenu new] autorelease];
// Add version menu item
[menu addItem:[[[NSMenuItem alloc]
//initWithTitle:[NSString stringWithFormat:@"%s", server_name]
initWithTitle:[NSString stringWithUTF8String:server_name]
action:@selector(noexist) keyEquivalent:@""] autorelease]];
// Add configuration menu item
[menu addItem:[[[NSMenuItem alloc]
initWithTitle:@"Edit configuration"
action:@selector(editConfig) keyEquivalent:@""] autorelease]];
// Add connect menu item
[menu addItem:[[[NSMenuItem alloc]
initWithTitle:@"Open web root in a browser"
action:@selector(openBrowser) keyEquivalent:@""] autorelease]];
// Separator
[menu addItem:[NSMenuItem separatorItem]];
// Add quit menu item
[menu addItem:[[[NSMenuItem alloc]
initWithTitle:@"Quit"
action:@selector(shutDown) keyEquivalent:@"q"] autorelease]];
// Attach menu to the status bar
id item = [[[NSStatusBar systemStatusBar]
statusItemWithLength:NSVariableStatusItemLength] retain];
[item setHighlightMode:YES];
[item setImage:[NSImage imageNamed:@"mongoose_22x22.png"]];
[item setMenu:menu];
// Run the app
[NSApp activateIgnoringOtherApps:YES];
[NSApp run];
mg_stop(ctx);
return EXIT_SUCCESS;
}
#else
int main(int argc, char *argv[]) {
init_server_name();
start_mongoose(argc, argv);
printf("%s started on port(s) %s with web root [%s]\n",
server_name, mg_get_option(ctx, "listening_ports"),
mg_get_option(ctx, "document_root"));
while (exit_flag == 0) {
sleep(1);
}
printf("Exiting on signal %d, waiting for all threads to finish...",
exit_flag);
fflush(stdout);
mg_stop(ctx);
printf("%s", " done.\n");
return EXIT_SUCCESS;
}
#endif /* _WIN32 */
-393
View File
@@ -1,393 +0,0 @@
#include "lua_5.2.1.h"
#ifdef _WIN32
static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
int offset) {
HANDLE fh = (HANDLE) _get_osfhandle(fd);
HANDLE mh = CreateFileMapping(fh, 0, PAGE_READONLY, 0, 0, 0);
void *p = MapViewOfFile(mh, FILE_MAP_READ, 0, 0, (size_t) len);
CloseHandle(mh);
return p;
}
#define munmap(x, y) UnmapViewOfFile(x)
#define MAP_FAILED NULL
#define MAP_PRIVATE 0
#define PROT_READ 0
#else
#include <sys/mman.h>
#endif
static const char *LUASOCKET = "luasocket";
// Forward declarations
static void handle_request(struct mg_connection *);
static int handle_lsp_request(struct mg_connection *, const char *,
struct file *, struct lua_State *);
static void reg_string(struct lua_State *L, const char *name, const char *val) {
lua_pushstring(L, name);
lua_pushstring(L, val);
lua_rawset(L, -3);
}
static void reg_int(struct lua_State *L, const char *name, int val) {
lua_pushstring(L, name);
lua_pushinteger(L, val);
lua_rawset(L, -3);
}
static void reg_function(struct lua_State *L, const char *name,
lua_CFunction func, struct mg_connection *conn) {
lua_pushstring(L, name);
lua_pushlightuserdata(L, conn);
lua_pushcclosure(L, func, 1);
lua_rawset(L, -3);
}
static int lsp_sock_close(lua_State *L) {
if (lua_gettop(L) > 0 && lua_istable(L, -1)) {
lua_getfield(L, -1, "sock");
closesocket((SOCKET) lua_tonumber(L, -1));
} else {
return luaL_error(L, "invalid :close() call");
}
return 1;
}
static int lsp_sock_recv(lua_State *L) {
char buf[2000];
int n;
if (lua_gettop(L) > 0 && lua_istable(L, -1)) {
lua_getfield(L, -1, "sock");
n = recv((SOCKET) lua_tonumber(L, -1), buf, sizeof(buf), 0);
if (n <= 0) {
lua_pushnil(L);
} else {
lua_pushlstring(L, buf, n);
}
} else {
return luaL_error(L, "invalid :close() call");
}
return 1;
}
static int lsp_sock_send(lua_State *L) {
const char *buf;
size_t len, sent = 0;
int n, sock;
if (lua_gettop(L) > 1 && lua_istable(L, -2) && lua_isstring(L, -1)) {
buf = lua_tolstring(L, -1, &len);
lua_getfield(L, -2, "sock");
sock = (int) lua_tonumber(L, -1);
while (sent < len) {
if ((n = send(sock, buf + sent, len - sent, 0)) <= 0) {
break;
}
sent += n;
}
lua_pushnumber(L, n);
} else {
return luaL_error(L, "invalid :close() call");
}
return 1;
}
static const struct luaL_Reg luasocket_methods[] = {
{"close", lsp_sock_close},
{"send", lsp_sock_send},
{"recv", lsp_sock_recv},
{NULL, NULL}
};
static int lsp_connect(lua_State *L) {
char ebuf[100];
SOCKET sock;
if (lua_isstring(L, -3) && lua_isnumber(L, -2) && lua_isnumber(L, -1)) {
sock = conn2(lua_tostring(L, -3), (int) lua_tonumber(L, -2),
(int) lua_tonumber(L, -1), ebuf, sizeof(ebuf));
if (sock == INVALID_SOCKET) {
return luaL_error(L, ebuf);
} else {
lua_newtable(L);
reg_int(L, "sock", sock);
reg_string(L, "host", lua_tostring(L, -4));
luaL_getmetatable(L, LUASOCKET);
lua_setmetatable(L, -2);
}
} else {
return luaL_error(L, "connect(host,port,is_ssl): invalid parameter given.");
}
return 1;
}
static int lsp_error(lua_State *L) {
lua_getglobal(L, "mg");
lua_getfield(L, -1, "onerror");
lua_pushvalue(L, -3);
lua_pcall(L, 1, 0, 0);
return 0;
}
// Silently stop processing chunks.
static void lsp_abort(lua_State *L) {
int top = lua_gettop(L);
lua_getglobal(L, "mg");
lua_pushnil(L);
lua_setfield(L, -2, "onerror");
lua_settop(L, top);
lua_pushstring(L, "aborting");
lua_error(L);
}
static int lsp(struct mg_connection *conn, const char *path,
const char *p, int64_t len, lua_State *L) {
int i, j, pos = 0, lines = 1, lualines = 0;
char chunkname[MG_BUF_LEN];
for (i = 0; i < len; i++) {
if (p[i] == '\n') lines++;
if (p[i] == '<' && p[i + 1] == '?') {
for (j = i + 1; j < len ; j++) {
if (p[j] == '\n') lualines++;
if (p[j] == '?' && p[j + 1] == '>') {
mg_write(conn, p + pos, i - pos);
snprintf(chunkname, sizeof(chunkname), "@%s+%i", path, lines);
lua_pushlightuserdata(L, conn);
lua_pushcclosure(L, lsp_error, 1);
if (luaL_loadbuffer(L, p + (i + 2), j - (i + 2), chunkname)) {
// Syntax error or OOM. Error message is pushed on stack.
lua_pcall(L, 1, 0, 0);
} else {
// Success loading chunk. Call it.
lua_pcall(L, 0, 0, 1);
}
pos = j + 2;
i = pos - 1;
break;
}
}
if (lualines > 0) {
lines += lualines;
lualines = 0;
}
}
}
if (i > pos) {
mg_write(conn, p + pos, i - pos);
}
return 0;
}
static int lsp_write(lua_State *L) {
int i, num_args;
const char *str;
size_t size;
struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
num_args = lua_gettop(L);
for (i = 1; i <= num_args; i++) {
if (lua_isstring(L, i)) {
str = lua_tolstring(L, i, &size);
mg_write(conn, str, size);
}
}
return 0;
}
static int lsp_read(lua_State *L) {
struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
char buf[1024];
int len = mg_read(conn, buf, sizeof(buf));
if (len <= 0) return 0;
lua_pushlstring(L, buf, len);
return 1;
}
// mg.include: Include another .lp file
static int lsp_include(lua_State *L) {
struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
struct file file = STRUCT_FILE_INITIALIZER;
if (handle_lsp_request(conn, lua_tostring(L, -1), &file, L)) {
// handle_lsp_request returned an error code, meaning an error occured in
// the included page and mg.onerror returned non-zero. Stop processing.
lsp_abort(L);
}
return 0;
}
// mg.cry: Log an error. Default value for mg.onerror.
static int lsp_cry(lua_State *L){
struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
cry(conn, "%s", lua_tostring(L, -1));
return 0;
}
// mg.redirect: Redirect the request (internally).
static int lsp_redirect(lua_State *L) {
struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
conn->request_info.uri = lua_tostring(L, -1);
handle_request(conn);
lsp_abort(L);
return 0;
}
static void prepare_lua_environment(struct mg_connection *conn, lua_State *L) {
const struct mg_request_info *ri = mg_get_request_info(conn);
extern void luaL_openlibs(lua_State *);
int i;
luaL_openlibs(L);
#ifdef USE_LUA_SQLITE3
{ extern int luaopen_lsqlite3(lua_State *); luaopen_lsqlite3(L); }
#endif
luaL_newmetatable(L, LUASOCKET);
lua_pushliteral(L, "__index");
luaL_newlib(L, luasocket_methods);
lua_rawset(L, -3);
lua_pop(L, 1);
lua_register(L, "connect", lsp_connect);
if (conn == NULL) return;
// Register mg module
lua_newtable(L);
reg_function(L, "read", lsp_read, conn);
reg_function(L, "write", lsp_write, conn);
reg_function(L, "cry", lsp_cry, conn);
reg_function(L, "include", lsp_include, conn);
reg_function(L, "redirect", lsp_redirect, conn);
reg_string(L, "version", MONGOOSE_VERSION);
// Export request_info
lua_pushstring(L, "request_info");
lua_newtable(L);
reg_string(L, "request_method", ri->request_method);
reg_string(L, "uri", ri->uri);
reg_string(L, "http_version", ri->http_version);
reg_string(L, "query_string", ri->query_string);
reg_int(L, "remote_ip", ri->remote_ip);
reg_int(L, "remote_port", ri->remote_port);
reg_int(L, "num_headers", ri->num_headers);
lua_pushstring(L, "http_headers");
lua_newtable(L);
for (i = 0; i < ri->num_headers; i++) {
reg_string(L, ri->http_headers[i].name, ri->http_headers[i].value);
}
lua_rawset(L, -3);
lua_rawset(L, -3);
lua_setglobal(L, "mg");
// Register default mg.onerror function
luaL_dostring(L, "mg.onerror = function(e) mg.write('\\nLua error:\\n', "
"debug.traceback(e, 1)) end");
}
static int lua_error_handler(lua_State *L) {
const char *error_msg = lua_isstring(L, -1) ? lua_tostring(L, -1) : "?\n";
lua_getglobal(L, "mg");
if (!lua_isnil(L, -1)) {
lua_getfield(L, -1, "write"); // call mg.write()
lua_pushstring(L, error_msg);
lua_pushliteral(L, "\n");
lua_call(L, 2, 0);
luaL_dostring(L, "mg.write(debug.traceback(), '\\n')");
} else {
printf("Lua error: [%s]\n", error_msg);
luaL_dostring(L, "print(debug.traceback(), '\\n')");
}
// TODO(lsm): leave the stack balanced
return 0;
}
void mg_exec_lua_script(struct mg_connection *conn, const char *path,
const void **exports) {
int i;
lua_State *L;
if (path != NULL && (L = luaL_newstate()) != NULL) {
prepare_lua_environment(conn, L);
lua_pushcclosure(L, &lua_error_handler, 0);
lua_pushglobaltable(L);
if (exports != NULL) {
for (i = 0; exports[i] != NULL && exports[i + 1] != NULL; i += 2) {
lua_pushstring(L, exports[i]);
lua_pushcclosure(L, (lua_CFunction) exports[i + 1], 0);
lua_rawset(L, -3);
}
}
if (luaL_loadfile(L, path) != 0) {
lua_error_handler(L);
}
lua_pcall(L, 0, 0, -2);
lua_close(L);
}
}
static void lsp_send_err(struct mg_connection *conn, struct lua_State *L,
const char *fmt, ...) {
char buf[MG_BUF_LEN];
va_list ap;
int len;
va_start(ap, fmt);
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (L == NULL) {
send_http_error(conn, 500, http_500_error, "%s", buf);
} else {
lua_pushstring(L, buf);
lua_error(L);
}
}
static int handle_lsp_request(struct mg_connection *conn, const char *path,
struct file *filep, struct lua_State *ls) {
void *p = NULL;
lua_State *L = NULL;
int error = 1;
// We need both mg_stat to get file size, and mg_fopen to get fd
if (!mg_stat(conn, path, filep) || !mg_fopen(conn, path, "r", filep)) {
lsp_send_err(conn, ls, "File [%s] not found", path);
} else if (filep->membuf == NULL &&
(p = mmap(NULL, (size_t) filep->size, PROT_READ, MAP_PRIVATE,
fileno(filep->fp), 0)) == MAP_FAILED) {
lsp_send_err(conn, ls, "mmap(%s, %zu, %d): %s", path, (size_t) filep->size,
fileno(filep->fp), strerror(errno));
} else if ((L = ls != NULL ? ls : luaL_newstate()) == NULL) {
send_http_error(conn, 500, http_500_error, "%s", "luaL_newstate failed");
} else {
// We're not sending HTTP headers here, Lua page must do it.
if (ls == NULL) {
prepare_lua_environment(conn, L);
if (conn->ctx->callbacks.init_lua != NULL) {
conn->ctx->callbacks.init_lua(conn, L);
}
}
error = lsp(conn, path, filep->membuf == NULL ? p : filep->membuf,
filep->size, L);
}
if (L != NULL && ls == NULL) lua_close(L);
if (p != NULL) munmap(p, filep->size);
mg_fclose(filep);
return error;
}
-589
View File
@@ -1,589 +0,0 @@
%PDF-1.5␍%âãÏÓ
1 0 obj␍<</Metadata 2 0 R/OCProperties<</D<</ON[5 0 R]/Order 6 0 R/RBGroups[]>>/OCGs[5 0 R]>>/Pages 3 0 R/Type/Catalog>>␍endobj␍2 0 obj␍<</Length 16195/Subtype/XML/Type/Metadata>>stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:xmpGImg="http://ns.adobe.com/xap/1.0/g/img/">
<xmp:CreatorTool>Adobe Illustrator CS6 (Windows)</xmp:CreatorTool>
<xmp:CreateDate>2013-01-02T17:27:47+01:00</xmp:CreateDate>
<xmp:ModifyDate>2013-01-02T17:27:47Z</xmp:ModifyDate>
<xmp:MetadataDate>2013-01-02T17:27:47Z</xmp:MetadataDate>
<xmp:Thumbnails>
<rdf:Alt>
<rdf:li rdf:parseType="Resource">
<xmpGImg:width>256</xmpGImg:width>
<xmpGImg:height>228</xmpGImg:height>
<xmpGImg:format>JPEG</xmpGImg:format>
<xmpGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA&#xA;AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK&#xA;DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f&#xA;Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgA5AEAAwER&#xA;AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA&#xA;AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB&#xA;UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE&#xA;1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ&#xA;qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy&#xA;obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp&#xA;0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo&#xA;+DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9U4q7FXYq7FXYq7FXYq7&#xA;FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FVsssUUbSyuscSAs7sQqqo3JJPQDFWOL+ZXk&#xA;Rrj6uNat/UrTkSQn/Iwjh+OR4wx4wyG3ube4iEtvKk0TfZkjYMp+RFRkmSpirsVYj+ZvnFfLPl2R&#xA;4XA1O8rDYr3BI+KT5IPxpkJyoMJyoI38vbs3fknRZmbkwtY4yx3NYh6f/GuGPJMeTIckydirsVdi&#xA;rsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVeG/nX55mutQby3YSlbO1I+v&#xA;lD/eTdfTNP2Y+4/m+WUZJdGnJLoiX/Lfybo/5fxavr31prq4SCWS4t6c4WnA4osbHgVUt8Vdz2pj&#xA;wgCyvAAN3nd9aW1gzXGiayLmDvx9S1uFB2AaNqBuv7DNkGs+SyHzf5sh/utavkFa0W5mA29uWPEV&#xA;4ijI/wAxfPMYIXW7o1/mfl/xKuHjKeMpbrfmLW9cnjn1a7e7liT042eg4rWuwUAfTgJJQSS9/wDy&#xA;ZufW/L+xStTBJPEf+RrOPwfL8fJvx8mb5Nm7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7&#xA;FXYq7FXYq7FXYq7FUr8063Hofl6/1V6H6rEWjU9GkPwxqf8AWdgMEjQRI0Hy9pdhqHmHX4LRGMt7&#xA;qM/xyHclnPJ5G+QqxzF5uMBZer/n3fww6bpek290EKsXmsFO5jVQsbt7KQQK9foy3IejblLxbKml&#xA;2KuxV2KvWvyR8721lI3lq9pGl1KZbGc7fvWAUxN/rcRx99u4y3HLo245dHtuXNzsVdirsVdirsVd&#xA;irsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVeffnjfRQeSGt2I53lxFGi9/gJkJ/4TK8&#xA;h2a8h2Yl+TWn6RpNrdebNauYrSM8rawaZgtQN5XUHdidlFPfIY6G5Y4xW5YP5+vtM1DzZf32m3cl&#xA;7aXL+ok0oYEEihQc6HitKL7ZCXNhI7sewMUw0bQNZ1q5a30u0e6lQcnCUAVfFmYhVHzOICQCUZfe&#xA;SPNVlA9xNp0j28ZIkngKXEakdeTwmRRT3ONJMCEjxYqlupaZaMU4/EXHUBRyJHuAMVfR35U+cbjz&#xA;L5ff63ve2DiCaQmpkUrVHbp8RGx9xmRCVhyISsM1ybN2KuxV2KuxV2KuxV2KuxV2KuxV2KuxV2Ku&#xA;xV2KuxV2KuxV2KuxV2KuxV87/nF5wi13zAtlZvz0/S+USOD8LzMf3jj2FAo+Ve+Y+SVlx8krLAmd&#xA;2ChmJCiigmtBWtBkGC3FXYqyifzCLv8AK++8qaYq2GryTJK8wf0xexcqvG0jEBWApsTxYCnU0MMt&#xA;mFDm5OCYB3Tb/nHLyP590bzNdahqNpPpujPbFJYriqCeRipj4xk78dzzp7d8r0eKYlZ2DlZZAhEf&#xA;nXp3ly18wRzaXNEL2YN+kbOL9hxTi54/CrPXcde/fMrIBezgZALedxuyOrrsykEfRkGt67+QV2qa&#xA;nq1on93cwxzotfsmFirD/ksPwy3EW3E9oy5udirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsV&#xA;dirsVdirsVdiryD80PzahWGbQ/LsweVwY7zUIzVVU7FIWHUnuw6dt9xVOfQNU59A8XylpdirsVdi&#xA;rsVTy287+bbXTf0Zb6rcRWQHFYlehVT+yrfaUewOHiLLiKSMxYlmJLE1JPUnAxZ9+UXkjSvM2o3s&#xA;mqgyWlgkZ+rKxTm8palWUhuICHofDJwjZbMcbet6f+XuheX9QXVtAhktpkHCe2EjyRywtTmtJC7c&#xA;h9pd+op0y3grcNoiByZbk2TsVdirsVdirsVdirsVdirsVdirsVdirsVdirH9Z8/eT9HLJfapCsq7&#xA;NDGTNID4FIw5H05EyAYmQDDtR/P7y9CzLYafc3ZHRpCkKk+3941PmMgcoYHKEof/AJyFuix4aGgX&#xA;sDcEn7/TGDxUeK0v/OQt3yHLRIytdwLgg0+fpnHxV8VHW3/OQmntT6zo00Xj6Uyyf8SWPD4qfFTQ&#xA;fnx5ONs0noXgmUfDA0aVY+HIOVw+KE+IHm3nL82PMXmNHtYyNO0xtjawsSzjwlk2LfIAD2yuUyWu&#xA;UyWEZBg7FXYq7FXYq7FV8cMktfTXkR+yOv0DqfoxV0kMsRAkRkJFQGBFR9OKsl/LzzbeeWdeF3FC&#xA;9zayr6d7boKkx1ryX/KU7j7u+GMqLKEqL3fR/P2m69epZaNDcSOV9S5nliaKOGMdal/tOTsoAP3D&#xA;LxO+TeJWyjJsnYq7FXYq7FXYq7FXYq7FXYq7FXYqoXt9ZWNs91ezx21vGKvLKwRR9JxtbeZeZvz3&#xA;0q1LwaBbG/lG31qascHzVdnf/hcqOXuajk7nl2v/AJgebddLLfajJ6Df8esJ9KKngVSnL/ZVysyJ&#xA;azIljuRYuxV2KuxV2KuxV2KuxV2KuxV2KuxV2KuxVWt3uSwhh5OZCAIQOYZjsPg3BP0Yq9G8r/k1&#xA;5l1f059bkOl2H2hAQPXI/wAmIfDH/st/bLI4yebYMZPN7H5Z8paH5as2tdKg9ISEGaViWkkZdgXY&#xA;/PoNsuEQG4RATjCl2KuxV2KuxV2KuxV2KuxV2KuxVgvnv819I8t87K0Av9YGxgU/u4j/AMWsO/8A&#xA;kjfxpkJTphKdPCfMXmrXfMN39Z1W6aYgn0oR8MUYPZEGw+fU98oMiWgyJSjAh2KuxV2KuxV2KuxV&#xA;2KuxV2KuxV2KuxV2KuxV2KvS/wAh9LW581XN861WxtjwPhJKwUH/AIDllmIbtmMbvfMvb3Yq7FXY&#xA;q7FXYq7FXYq7FXYq7FXYq8p/Nb803055NB0KUfXaFb68U1MNdjGh/wB+eJ/Z+fSqc+gapz6B4ezM&#xA;zFmJZmNSTuSTlLS1irsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdir3D/nH2y4aPq17T+/uI&#xA;4a/8YU5f8zsuxN2J6vlra7FXYq7FXYq7FXYq7FXYq7FXYqwX81fPv+GtJFpZOP0zfKRB3MUfRpSP&#xA;Hsvv8shOVMJyp85szOxdyWZjVmO5JPUk5juO1irsVdirsVdirsVdirsVdirsVdirsVdirsVdirsV&#xA;dirsVfTH5TaQ+meRdPWReMt2Gu3H/GY1T/knxzIgKDkQFBl+TZuxV2KuxV2KuxV2KuxV2KuxVC6p&#xA;qVppenXOoXb8La1jaSVvZR0HuegwE0gmnyt5m8wXnmDW7rVbs/HO3wR9QkY2RB/qrmMTZcYmyleB&#xA;DsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVT7yR5Zm8x+Y7TTUB9At6l24/ZgQ1c/T9k&#xA;e5wxFllEWX1PHGkcaxxqFjQBUUbAACgAzKcldirsVdirsVdirsVdirsVdirsVeO/nz5pIFt5bt32&#xA;YC5vqHtX91Gfu5Ef6uU5ZdGnLLo8aypqdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirs&#xA;VfR35T+Sf8OaF9Zu4+OragFkuARvHH1SL2IrVvf5ZkQjQciEaDOcmzdirsVdirsVdirsVdirsVdi&#xA;qld3UFpazXVwwSC3RpZXPRUQFmP0AYq+TvMOsz61rd7qs/8AeXcrSBf5V6Iv+xUAZik2XFJspdgQ&#xA;7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXqH5M+Qjqd6PMOoR/7j7N/9DjYbSzr+1v1&#xA;WP8A4l8jlmON7tmON7vd8vb3YLine truncated
</rdf:li>
</rdf:Alt>
</xmp:Thumbnails>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/">
<xmpTPg:NPages>1</xmpTPg:NPages>
<xmpTPg:HasVisibleTransparency>False</xmpTPg:HasVisibleTransparency>
<xmpTPg:HasVisibleOverprint>False</xmpTPg:HasVisibleOverprint>
<xmpTPg:MaxPageSize rdf:parseType="Resource">
<stDim:w>64.000000</stDim:w>
<stDim:h>64.000000</stDim:h>
<stDim:unit>Points</stDim:unit>
</xmpTPg:MaxPageSize>
<xmpTPg:PlateNames>
<rdf:Seq>
<rdf:li>Cyan</rdf:li>
<rdf:li>Magenta</rdf:li>
<rdf:li>Yellow</rdf:li>
<rdf:li>Black</rdf:li>
</rdf:Seq>
</xmpTPg:PlateNames>
<xmpTPg:SwatchGroups>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<xmpG:groupName>Default Swatch Group</xmpG:groupName>
<xmpG:groupType>0</xmpG:groupType>
</rdf:li>
</rdf:Seq>
</xmpTPg:SwatchGroups>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:illustrator="http://ns.adobe.com/illustrator/1.0/">
<illustrator:Type>Document</illustrator:Type>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format>application/pdf</dc:format>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">Mongoo 3 smooth green</rdf:li>
</rdf:Alt>
</dc:title>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
<xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>
<xmpMM:DocumentID>uuid:a2f6b830-2598-49b9-8770-4f9fa14f1be3</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:42245d04-b042-4038-b450-94c7cfb8ee6f</xmpMM:InstanceID>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
<pdf:Producer>Adobe PDF library 10.01</pdf:Producer>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
endstream␍endobj␍3 0 obj␍<</Count 1/Kids[7 0 R]/Type/Pages>>␍endobj␍7 0 obj␍<</ArtBox[0.643066 4.46875 63.2324 59.6494]/BleedBox[0.0 0.0 64.0 64.0]/Contents 8 0 R/LastModified(D:20130102172747+01'00')/MediaBox[0.0 0.0 64.0 64.0]/Parent 3 0 R/PieceInfo<</Illustrator 9 0 R>>/Resources<</ExtGState<</GS0 10 0 R>>/Properties<</MC0 5 0 R>>>>/Thumb 11 0 R/TrimBox[0.0 0.0 64.0 64.0]/Type/Page>>␍endobj␍8 0 obj␍<</Filter/FlateDecode/Length 1251>>stream
H‰t–KŽ•7…çÿ*¼�kì²]¶§!#Y@+�A "±û|§Ü}i"E4}»ü¨Ç©SÇ÷Õ¯¯Ó«·¯Kúéç×éú|•ä]?7þùãú=ýu•Ül¤’»u~7éˇëÕ›÷%}øûúœj*ü«©ö<gÉfÞ­{zøtiãÓu«yøL–K[øÍ¥®ÄRK_Ù­oÌb5ÝêÊ}Xº�\pp«5ouµ§‡ëÖòžø°�}�ÔKøºÕ�7Oß.㪱P
Õ¼†‡Ûʹ¯—åÞ,üY›ªhN,Ï«,,ëºjyt#V˶å»äéÆîZ-vw_©åÚ”é¬ÅÙ™{ìŽ<¨¥äíÖÄ/‡ÌG˜»ê°NùЏըÙ#�Îåª"
Þw\¨»§ÇËH;ʹ�•¬e¯Ç¡¨qùýþC€Pq¸ù°D ,OrµžW·€Ö÷ÔiúÑçk¢EÓmåmç|9Φ%eÒ´Õ,"�CºÍ<F�¬¦ºÛÆÒ�ä¶:Y)žÍ¥;Í6•¨¤h#‘¢À8âɆæŽ>Ò»\µ¢(JØ\›^v@_ÈŸ= ,ñ<• Ûf€³pÒÈÐOǽˆ!,L÷XèKå²ÐK‹nP.6mj~X±ì,¬ÚO»è. 6oDh:�œw:ĉ G‡a÷Ȃh ½žŠ`ÖhJ˃,¿ÊÁò㱪€1³G›j '­ž6ì„55WÌ `mu��¢¼E*âdžpƒyé\„—¤×-C*�ß›s�ÐД'ÜÁ"=E‚N’ÕÓS¹¥B€à¤êÇ«“ÇàôŽšî64nSxq~Žž åÄŸî×%›D£†³SMSqXcXÕöV¹␍Ö[¶&Žê–è)øܼ˜ì…~¨␍H–8Â]@ôVí">vñ° „Ikw»,ãP0QºIl†§k[jHž ñªaµc¸èg-¢2*u]Ù 8®!ɰý<“:HWÈ­®U+±)·_/±E¸#^]¢R¥“”ZÒ¯èÏŒR:à„Ú‰ë–␍8}å=AOá@AXé!Øß®?¯wW•pKÏ¿ë8 ôÚIû»„Çà€"%Ãuè-£³o� “¤2æ[LZ}Ÿý…ÜJ¼M=ÄYLÔ5ö£-9°}ö›î3ñþt~Ä�ÑŽyÖÀ¯^ïæyG¯�QÖËjè�Bçå«T JãÍ”©'©¸†¯Âך™„ª"þHhßãs1Pi Ê[#!_R7i޲Ÿ|Qbgñ•xd ¢º3Bøñ±¸VC*U%irGÉÓõp•?Ì�À|ïžÔ/’˜TòŸ.z¤KÙ¥ù˲åEZ©�¦ßkÄÇûÙzГݥÈO»5ž®ç‹Ç*çXüù¼®;?8¼û‹`Ç*OçK¸ø:=ÀÒ·žnûáËDÕs/$Ò«ç»!Õ¬"²1~RÐ"Uǰ“ÿ4‰¢l�û5ð�?—Y4FßC¸ÜìÔ×$̰¿?‰jXC§7·ÓáS¢
ÇV~…a‹8´êC$èâïÝ,1_`ðÛv¥ãÿ¤žÞ¦û‰{4 qÒ¾ê;²
¼¥g¶N ôÜÃ uåm;4
ëýƒâÔ>hÒ�ê·€—ü d{ö«îŠ–2wðç:¯ù|Rƒoáþ—·|©|wý+ÀWûµ
endstream␍endobj␍11 0 obj␍<</BitsPerComponent 8/ColorSpace 12 0 R/Filter[/ASCII85Decode/FlateDecode]/Height 8/Length 60/Width 8>>stream
8;Xp,*=RnBA=+-oL^=GFM?1!l_%=Zlo8S9:+GRslKjBJT)I<XS0E>k]*Q8~>
endstream␍endobj␍12 0 obj␍[/Indexed/DeviceRGB 255 13 0 R]␍endobj␍13 0 obj␍<</Filter[/ASCII85Decode/FlateDecode]/Length 428>>stream
8;X]O>EqN@%''O_@%e@?J;%+8(9e>X=MR6S?i^YgA3=].HDXF.R$lIL@"pJ+EP(%0
b]6ajmNZn*!='OQZeQ^Y*,=]?C.B+\Ulg9dhD*"iC[;*=3`oP1[!S^)?1)IZ4dup`
E1r!/,*0[*9.aFIR2&b-C#s<Xl5FH@[<=!#6V)uDBXnIr.F>oRZ7Dl%MLY\.?d>Mn
6%Q2oYfNRF$$+ON<+]RUJmC0I<jlL.oXisZ;SYU[/7#<&37rclQKqeJe#,UF7Rgb1
VNWFKf>nDZ4OTs0S!saG>GGKUlQ*Q?45:CI&4J'_2j<etJICj7e7nPMb=O6S7UOH<
PO7r\I.Hu&e0d&E<.')fERr/l+*W,)q^D*ai5<uuLX.7g/>$XKrcYp0n+Xl_nU*O(
l[$6Nn+Z_Nq0]s7hs]`XX1nZ8&94a\~>
endstream␍endobj␍5 0 obj␍<</Intent 14 0 R/Name(svg2)/Type/OCG/Usage 15 0 R>>␍endobj␍14 0 obj␍[/View/Design]␍endobj␍15 0 obj␍<</CreatorInfo<</Creator(Adobe Illustrator 16.0)/Subtype/Artwork>>>>␍endobj␍10 0 obj␍<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>␍endobj␍9 0 obj␍<</LastModified(D:20130102172747+01'00')/Private 16 0 R>>␍endobj␍16 0 obj␍<</AIMetaData 17 0 R/AIPrivateData1 18 0 R/AIPrivateData2 19 0 R/ContainerVersion 11/CreatorVersion 16/NumBlock 2/RoundtripStreamType 1/RoundtripVersion 16>>␍endobj␍17 0 obj␍<</Length 1003>>stream
%!PS-Adobe-3.0
%%Creator: Adobe Illustrator(R) 16.0
%%AI8_CreatorVersion: 16.0.3
%%For: (Calum) ()
%%Title: (Mongoo 3 smooth green.svg)
%%CreationDate: 1/2/2013 5:27 PM
%%Canvassize: 16383
%%BoundingBox: 274 368 337 425
%%HiResBoundingBox: 274.1431 368.9688 336.7324 424.1494
%%DocumentProcessColors: Cyan Magenta Yellow Black
%AI5_FileFormat 12.0
%AI12_BuildNumber: 691
%AI3_ColorUsage: Color
%AI7_ImageSettings: 0
%%RGBProcessColor: 0 0 0 ([Registration])
%AI3_Cropmarks: 273.5 364.5 337.5 428.5
%AI3_TemplateBox: 305.5 396.5 305.5 396.5
%AI3_TileBox: 16.2998 -16 594.7002 809
%AI3_DocumentPreview: None
%AI5_ArtSize: 14400 14400
%AI5_RulerUnits: 2
%AI9_ColorModel: 1
%AI5_ArtFlags: 0 0 0 1 0 0 1 0 0
%AI5_TargetResolution: 800
%AI5_NumLayers: 1
%AI9_OpenToView: -285 842 1 1189 873 26 0 0 46 116 0 0 0 1 1 0 1 1 0 1
%AI5_OpenViewLayers: 7
%%PageOrigin:0 0
%AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9
%AI9_Flatten: 1
%AI12_CMSettings: 00.MS
%%EndComments
endstream␍endobj␍18 0 obj␍<</Length 19265>>stream
%%BoundingBox: 274 368 337 425
%%HiResBoundingBox: 274.1431 368.9688 336.7324 424.1494
%AI7_Thumbnail: 128 116 8
%%BeginData: 19108 Hex Bytes
%0000330000660000990000CC0033000033330033660033990033CC0033FF
%0066000066330066660066990066CC0066FF009900009933009966009999
%0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66
%00FF9900FFCC3300003300333300663300993300CC3300FF333300333333
%3333663333993333CC3333FF3366003366333366663366993366CC3366FF
%3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99
%33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033
%6600666600996600CC6600FF6633006633336633666633996633CC6633FF
%6666006666336666666666996666CC6666FF669900669933669966669999
%6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33
%66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF
%9933009933339933669933999933CC9933FF996600996633996666996699
%9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33
%99CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF
%CC0000CC0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399
%CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933
%CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF
%CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC
%FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699
%FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33
%FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100
%000011111111220000002200000022222222440000004400000044444444
%550000005500000055555555770000007700000077777777880000008800
%000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB
%DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF
%00FF0000FFFFFF0000FF00FFFFFF00FFFFFF
%524C45FD77FFA8A8FD7EFF7D58FD7EFF2D7DFD6BFF7C585283A8FD0DFF52
%5152FD6AFF52522D582D52527D7D837DFD04A8FFA8FF83585258FD69FF52
%522DA8A883522D2D522D512D522D522D5852522D5252FD68FF7D522DA7FF
%FFA8AE7D5851585258515852522D5852582D58A8FD66FFA8522D5283FFA8
%52517D58522D522D522D522D522D522D522DA8FD66FF832D5852FFFFA82D
%5852585258525852585258525852585258A8FD66FF2D522D52A8FF52522D
%5851522D5851522D5851522D5851522D83FD65FF835251527CFFFF7D2D58
%515852585158525851585258515852582DA8FD64FF582D522DA8FFA85152
%2D522D522D522D522D522D522D522D522D522DFD64FF52582D7DFFFF5258
%525852585258525852585258525852585258525858FD62FFA8582D52A8FF
%83522D5851522D5851522D5851522D5851522D5851522D527DFD61FFA82D
%5258FFFFFF585251585258515852522D5851522D585258515852585258A8
%FD60FF7D512DA8FFA852582D522D522D522D5258A8A7A87D522D522D522D
%5251582D7DFD60FF7D2D587D582D5852585258525852587DFF7C5151FFFF
%A7515852585258525858FD5FFFAE2D522D522D522D5851522D58515251FF
%A726202651FFFF832D522D582D585258A8FD5EFF58525258515852585158
%5258515852527DA82626207CFFFFFF5852585158525852FD5EFF7D512D52
%2D522D522D522D522D522D522D52527C517CA8FFFFA82D522D522D522D52
%7DFD5CFFAE5851585258525852585258525852585258525852A8FFFFA87D
%2D58525852582D522DA8FD5BFFA8582D522D5851522D5851522D5851522D
%5851522D522D5858582D522D58515252A8A8837CFD5BFF7D2D5852585158
%5258515852585158525851585258515851522D585258515852A8FD04FFA8
%FD58FFA8582D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D58FD05FFCFFD57FF83585158525852585258525852585258
%52585258525852585258525852585258525852FD5CFF58522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D527DFD
%46FFA8A883837D837D7D7D837DA783A8A8FFFFFFAE835152525851585258
%515852585158525851585258515852585158525851585258515852585158
%A7FFFFFFA8FD3EFF838352522D522D512D522D512D522D522D5251585258
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%525851522D522D522D587C7D58FD3CFFA87D52582D525158525852585258
%525852585258525851585258525852585258525852585258525852585258
%525852585258525852585258587C527D5258527D525252FD3AFFA87D5152
%2D522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D522D525158
%52522D5258A8FD38FFA858582D5251585258515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%52585158525851585258515852582D522D7DA8FD38FF7D582D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D51
%52A8FD38FFA8525252585258525852585258525852585258525852585258
%525852585258525852585258525852585258525852585258525852585258
%525852585258525852585258525883FD38FFA87C2D522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D5258FD
%38FF7D522D58525851585258515852585158525851585258515852585158
%525851585258515852585158525851585258515852585158525851585258
%5158525851585258515852582DA8FD36FFA852522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%A8FD35FFA82D585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852FD35FF832D522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D582D58FD34FF832D58525851585258515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%5258515852585158525851585258515852585158525851587CFD33FF832D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D7DFD32FFA82D58525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525283FD31FFA82D5251522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522DA8FD31
%FF5252515852585158525851585258515852585158525851585258515852
%585158525851585258515852585158525851585258515852585158525851
%58525851585258515852585158525851585258A8FD30FF58522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D5258FD30FFA75852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%5852582DA8FD2FFFA8522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D58A8FD
%2FFF832D5851585258515852585158525851585258515852585158525851
%585258515852585158525851585258515852585158525851585258515852
%5851585258515852585158525851585258515852527DFD2FFFA82D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522DAEFD2FFF5858525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852582DA7FD2FFFA8522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D58AEFD2FFF7D5158515852585158525851585258515852585158525851
%585258515852585158525851585258515852585158525851585258515852
%58515852585158525851585258515852585158525851585252A7FD2FFFA8
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D5258FD30FF5858525852585258
%525852585258525852585258525852585258525852585258525852585258
%525852585258525852585258525852585258525852585258525852585258
%5258525852585258525852FD30FFA8522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522DA8FD30FF832D585158525851585258515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%5258515852585158525851585258515852585158525851582D7DFD31FF51
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D58A8FD30FFA85852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585158A8FD31FF7D2D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585151
%7DFD32FF5252515852585158525851585258515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%525851585258515852585158525851585258515258FD32FF7D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522DFD33FF83515852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%58525852585258525852585258525852585258525852585258525852582D
%AEFD33FF515251522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D582D83FD25FFA8AEA8A883A8A8
%AEFD06FFA852515852585158525851585258515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%5258515852585158525851585258515852582D7DFD23FFA88352522D522D
%2D2D522D5858A8FFFFFF832D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D52A8FD22FF7C
%582D52515852585258525851582D7CA8FF58585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%52A8FD20FFA8832D522D5851522D5851522D5851522D522D527D582D522D
%5851522D5851522D5851522D5851522D5851522D5851522D5851522D5851
%522D5851522D5851522D5851522D5851522D5851522D5851522D5851522D
%5851522D5851522D527DFD20FFA8582D5852585158525851585258515852
%585158525251585258515852585158525851585258515852585158525851
%585258515852585158525851585258515852585158525851585258515852
%585158525851585258515852585158525258FD20FF7D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D5252FD20FF83
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%5852582DA8FD1FFFA8522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5283FD1EFFA85851585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%525851585258515852585158525851585258515852585158525851585258
%51585258515852582D5852585158525851585258515852582DA8FD1EFF7D
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D5283FD1DFFA82D585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%A8A858525852585258525852585258525851FD1EFF52522D5851522D5851
%522D5851522D5851522D5851522D5851522D5851522D5851522D5851522D
%5851522D5851522D5851522D5851522D5851522D5851522D5851522D5851
%522D5851522D582D527DFFFFFF525251522D5851522D5851522D582D52A8
%FD1CFFA85252585158525851585258515852585158525851585258515852
%585158525851585258515852585158525851585258515852585158525851
%585258515852585158525851585258515852582D7DA8FD04FFA82D585258
%5158525851585258515852AEFD1CFF7D2D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D58A8FD05FFA8582D522D522D522D522D522D522D52A8FD1CFF52585258
%525852585258525852585258525852585258525852585258525852585258
%525852585258525852585258525852585258525852585258525852585258
%52585258525852585258525852FD07FF7D52525852585258525852585258
%52AEFD1BFF83522D5851522D5851522D5851522D5851522D5851522D5851
%522D5851522D5851522D5851522D5851522D5851522D5851522D5851522D
%5851522D5851522D5851522D5851522D5851522D582D58AEFD07FF2D5251
%522D5851522D5851522D52A8FD1BFF832D58515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%525851585258515852585158525851585258515852585158525851585258
%51527DFD08FF7D2D58525851585258515852582DAEFD1BFF52522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522DA8FD08FFA8522D522D522D522D522D522D527D
%FD1BFF585258525852585258525852585258525852585258525852585258
%525852585258525852585258525852585258525852585258525852585258
%5258525852585258525852585258525852582D7DFD0AFF58585258525852
%58525852582DA8FD1BFF2D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D582D52A8FD0AFF
%A82D5851522D5851522D582D527DFD1BFF58515852585158525851585258
%515852585158525851585258515852585158525851585258515852585158
%525851585258515852585158525851585258515852585158525851585258
%5158A8FD0CFF582D5852585158525851582DA8FD1BFF2D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522DA7A8FD0BFF7D512D522D522D522D522D527DFD1BFF5852
%585258525852585258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%5852585258525852585258525851587DAEFD09FFAE2D5852585258525852
%585183FD1BFF52522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D582D522D7DFD09FF58
%2D5851522D5851522D5258FD1BFF7D525851585258515852585158525851
%585258515852585158525851585258515852585158525851585258515852
%585158525851585258515852585158525851585258515852585158525851
%5852582DA7FD08FF7D5251585258515852582D7CFD1BFF58522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522DA8FD07FFA82D522D522D522D522D522D
%FD1BFFA82D58525852585258525852585258525852585258525852585258
%525852585258525852585258525852585258525852585258525852585258
%52585258525852585258525852585258525852585258525258FD07FFA858
%52585258525852585258A8FD1AFFA7522D522D5851522D5851522D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D5851522D585152
%2D522D522D7DAEFD07FF2D522D5851522D5851522DA8FD1BFF5258525851
%58525851585258515852585158525851585258515852582D52527D515852
%585158525851585258515852585158525851585258515852585158525851
%58525851585258515858837DA8A8FD09FFA858525851585258515852527D
%FD1BFF7D2D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D527DFFA8522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D7DA8FD0CFFCF2D522D522D522D
%522D522D58A8FD1AFF7D5252585258525852585258525852585258525852
%585258525852527DFFFFFF52585258525852585258525852585258525852
%585258525852585258525852585258525852585258525851587DFD0CFF58
%525852585258525852582D7CA8FD19FFAE2D5251522D5851522D5851522D
%5851522D5851522D5851522D582D83FFFFFF7D2D5251522D5851522D5851
%522D5851522D5851522D5851522D5851522D5851522D5851522D5851522D
%582D5158FD0BFF525251522D5851522D5851522D527DFD19FF7D2D585258
%515852585158525851585258515852585158525851527DFD04FF7D2D5251
%585158525851585258515852585158525851585258515852585158525851
%585258515852585158525258FD0AFF7D2D585258515852582D5852582D58
%AEFD18FF83512D522D522D522D522D522D522D522D522D522D522D522D52
%2D58FD05FFA87D582D512D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D2D52FD09FF7D512D522D52
%2D522D7C52522D522DA8FD19FF5258525852585258525852585258525852
%58525852585258525851AEFD07FFAE7D7D52522D58525852585258525852
%585258525851588383587D52582D5851522D5851522D585158527DA8FD09
%FF525852585258525852FFA87D2D58A8FD19FF832D5851522D5851522D58
%51522D5851522D5851522D5851522D5258FD0BFFA87D585851522D522D52
%2D522D522D582D2D7DFFFFFFCFFFA8A87D837D7D587D587D7DA8A8FD0CFF
%A82D5251522D58515252FFFFCFA8FD1BFF582D5852585158525851585258
%51585258515852585158525851527DFD0FFFA8A87D837C7D525852522D58
%7DFD20FF7D2D5852585158525252FD1EFF7D512D522D522D522D522D522D
%522D522D522D522D522D522D522D527DFD15FFA8FFA8AEA8FD22FF7D2D52
%2D522D522D2D7DFD1EFF5258525852585258525852585258525852585258
%525852585258525252A8FD3BFF7D2D527DFF837D52A8FD1EFF832D585152
%2D5851522D5851522D5851522D5851522D5851522D5851522D5858A8A8FD
%38FF7D277DFD04FFA8FD1FFF582D58525851585258515852585158525851
%58525851585258515852582D522D52527D7D8383AEA8FD32FFA87DFD24FF
%A8522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D525258527D7D837DA8A8AEA8FFCFFD4CFF83585258
%525852585258525852585258525852585258525852585258525852585258
%5258525852582D5851522D5851525158527D587D7D837DA883A8A8FFA8FF
%A8FD40FF7D522D522D5851522D5851522D5851522D5851522D5851522D58
%51522D5851522D5851522D5851522D5851522D5851522D522D522D522D52
%2D522D522D5251525258527C527D7C7D7D837DA87DFD04A8FFA8CFA8FFA8
%FFA8FD28FF83582D58515852585158525851585258515852585158525851
%585258515852585158525851585258515852585158525851585258515852
%5851585258515852522D5851522D522D522D5251522D5851522D58525852
%58587C527D587D58FD047D837D7D7DA8A8FD1AFFA8582D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D522D522D522D522D52
%2D522D522D522D522D522D522D522D522D522D522D2D272D2D52527D7DA8
%A8FD1DFFA752525258525852585258525852585258525852585258525852
%585258525852585258525852585258525852585258525852585258525852
%58525852585258525852585258525852585258525852585258525852522D
%5252585883A8CFCFFD24FF7D582D522D5851522D5851522D5851522D5851
%522D5851522D5851522D5851522D5851522D5851522D5851522D5851522D
%5851522D5851522D5851522D5851522D5851522D5851522D522D522D522D
%522D58587D7DAEA8FD2AFFA8A858522D5852585158525851585258515852
%585158525851585258515852585158525851585258515852585158525851
%585258515852585158525851585258515852522D522D522D58587D7DA8A8
%FD34FFA87D52522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D522D522D522D522D522D522D522D522D522D522D522D522D522D
%522D522D512D525258588383A8A8FD3CFFA8A87D7C52522D585158515852
%585258525852585258525852585258525852585258525852585258525851
%5852582D582D522D585258527D7DA883AEA8FD46FFAEFFA8837C7D52522D
%522D512D522D522D522D522D522D522D522D522D522D522D522D512D522D
%525158527D58837DA8A8FFA8FD54FFAEAEA8A88383FD047D587D587D587D
%587D587D58FD047D837DA883A8A8FFA8FDBFFFFF
%%EndData
endstream␍endobj␍19 0 obj␍<</Length 22912>>stream
%AI12_CompressedDataxœí½g›êº0z?ïçá?ÀT ¤�é´é½W&@f`␍&À*çÃýíW¶ÓIÖûÎ9w¯µ7 Û²eI–dÉ^Ž�_¥w[rCJs�ü³¼\V$q$+Å(~=èvÇÑ‚Å/Q&GѨÔî�PWKÞJʰ#÷‹øÅ¡·5T?^»ã^"O G×�QW‚‡'rÿC–£\tØ“åQ;ú¡HRŸþüHèÀ¡±Š8‚ÂL†Í°4ÃE³E6=?Á%ÄþOq8ìü½Ïq†W’ÇýV§ÿQ’£lž�r9!Êqù(ÏfÑûýÎ¥4´¢žcPIª�Pñ•çXê WU¬ÈÍqOê�ι)␍‡e¹++Ãb´üGìGOÄx#F¤nWþ-uÅæ'ÔÙ=ÈÖk�®8艣(Ãb„í0l½4ît[§ã^Côä
~ÎÕq«7ChZFßñó|ý �®¤Ñ:␍@1Þ/÷Jæ¾ÀSü7þt)}tð<ö^ZËŠ<è‰Êç␍˜£²0Z}ryøäY�ʪ¯¥Þ  8Ǹáè,*TÈ¡Oã»VƆ‹Át³…‚M3¹h¶ÀSyšf£]P˨“~v¤_Åè©Ü—Tüì*£+2ƒ<OÓäS}u9îJÊM¿3B}ÆÏ
A'rKêB␍£‰ZWÄxÁãS-q-*Ò&^îŽG˜@
L±øGBsɨ@ÎRÿZ¾Å]M³B6*ð,´Ç0B!*ä¹(›Ãø<Êé@ãSmµƒZÑÚÏ£i;‡™<S:�~Që`¾¾§tZÆôæyä‚Lÿ´ÿÕ¾ÂÈG#©¯uH«|b"š:¹BP«ýVYî¡Ib.éõtåõ­ñ¿ƒ&ÆuøAæì\éôQÑNÉ;¡~ÞÃË=EúïräŸ8‘Ð-EŠ’·À÷ø'üûŽþ¥ÄÎ áS¿"½Ó␍�§ÕþO©+L␍ëOÄ~+z'*ƒ �Ÿwž¨Dñ ½íãÎOx#Â�Ö�g�š…IHÍ®„ËØ@x0½
êŠÊ
ðM+zÖø?  ,#¢×ŠØ„)B¿␍qMI¿%ßÞ‹ ‚K]©ßê&?mø ƒôòêO¯!w;Þޠù‰þ=n•+ý³>é¦2¶£×²Ü5pK
¨¯ ºQF¤Î·¢v/¿oã°ˆw;Š8hwšNí;¼×¹Ô␍DEMŒu'ˆÖW:°Éß ŽFDÕVXÓERx–¹ú%Žšm�X␍ET:’/¢é}ïô[ÐÑ«qg$ó%÷HŠ^µÅzŒJÖL%�v³uX"ÌK@:í»8È;´À�þt%Xw2G}ùWÿŠ¡gO åÅqwô’ˆfNÅžMA™«è’^ˆŽž¡c‘e¢÷"zr T>K³°FR¹<(nþB³,‹ÖGšÉñjµû]T�Ñ~ýA¿áÛxö+ÊÐÑ“èÓ mEà%4‹a´ +d5X�üÍ@OÑ<,@…iPþØ9»° Kdç�àý¶«r÷ÿA˜³ëxçMø¿dôF‡n’Ž¡QËÄL™™’&š¼$²5õÿhÏ¡1ûS7j§5µ, ˆåzF{€èýì4zDå�úàþäøTG—×ëÑøï^·ÒÀ}J§1I°¦pá]Eƒ53'(¦rÍ6Ø
ŠÔWK±ÑÌŒQ�>Fã×ñž4[€¸
´ç&¼¾@ýk•Ÿ`’éu:-ïÂ}àNµ,t •NÍeÿ+˜�p¥õ^òxï¦Jßý³ã—óÁoi¸™áÏ�$”�ìÅ‘ô!ÚÃv¬ÚúÇx÷Ï€¥'­fñ;BL{ê¿�ôۣѠ˜É ÆJ—’•�L« ÿõ:¨`¥Óíbë$$ƒ(`°�•¦OµI1ê…b“¿<ñ¤Â\§ý»Œ 9ôÂíoö©Ù,ÞÉÊçwê¢ËËJí�ïWúÃúOQ®»ˆW Ћa9¬•œç*÷U}¹/ÁRWn~J­@hÒŠþŸ‘~lt°S� 2H ™+itŠG` æâÿ7TŸ¿)`l±Ñ•qÆÿ¨P(þ .PÙïAðhœÍñp$÷¾�øû«$ZŠÈ+ƒ,màÃà”ú‚o Cß­?ÿ[¬<|ÿõ␍èû¿@’»�æÿŽ×÷Å3—’Øõš÷`sþM¤¶ºËŸ÷ÖŸ@ÃúóM†•ÍRŒ@û�ª-u>Ú�¦^ô[Œ/ÇRY¡ÀùŽïW§5jžZò[Œ˜¬$Ë^ãjÈ#Ð3Ž¥÷ 4ÄÉJßF¥À²ò
»ip4Î÷Ð)`©ûýÐ|øóó`fîÓbKÝ^ Dz¦Ò¤úÓ‰ÔêŒ{Q#
çert» Õ·qpJT�p‘”è¹"␍¥QÔdNp*—Ó$Ä@li–1­qWO~Ú9n8�Görb·£ñC^ãÜÖ C©ÏxõQSî*ƈw¢»ã‘½‡# ÅfØ[Ý=(Dâ2ìôÆ]¼wg£TDTF␍YTZÑ&ŠuÒ
 ø6½�†!weÀŠ“À;Ó }îÔÆÝ®VC�Ѓ·Z␍␍F£?$ 55pu»‡ƒÇJòïû­MѤŠöÅVE=™+Ðj×QC»Š$îâH'-Ï>¡(D� ƒ™$%èjÊùî¥}ІZ#꾦©žÀd T6ªþƒÛ8—;ýfŠ8A³ÈNm$•ÎpÐÿœˆŠFQ$”Ž„Õí\JÝkù’4AÚ<—‡4DüšÕ•-N‹Ã ^™™`~mœ£ÚÊ™ÍrYWúŠ2QEw!eYè�{Q6Ú0ä�oYδa6úkb-�šÄ‰v@ˆ# •°GJ£‡,­ j÷D¶ufÅÌh’MÞ>ûróS�`Œ8"ƒÌ?miþl<@ ¾ˆ1c‘5)b8AÀ7ÿ@¡N+:4Äcé6›ÊO)z-ýá�±ÑévFl$í$|�ÅþÇÅ•�Ëc¤l>—W+™×PcýéŒ{¦NÓ^KÆ´›1áXöÒ SÑŽÏbÓ�& bpŽÉ90¸c(>P*KÝnõ÷ÈXÁø¬'Ԛؔvû]É·8ÒÇ&J ®cB²ˆÎHì7␍¹UÀÃây&À°®F¢.5¬␍ä �0ðr-𠨣™VM--åò¸%Ò` –nÅ~gØä˜Ûɲ!&M†ó|»®±&ô[Òï+©)÷[!+Õ:Êpº™Ð;<ÓDè­LÎC>Ï„˜Ô�ã4dÝ)Ï�×…
yÞ͵®,+féã%ªpa“ò-Dá‚V ÄæXÆ­Ãhtæþ‚�+0eMÝuï6ø,]ðéîûûPÒÐ˸Ê-Ä!e°Õ´’œk«¨¤I+eÝ»º�¢˜åþ¾ÙÕ`^½èè»®þ´uLþ))¦)é mZÃÌU¼ú¦âpéhCìš$¨˜f·3€åù»ƒ®ñrsh Ñ±
¨ÝN_ŠGŠü)-M¢R&ŠæLEÅþ¨kDÔGeü…}SìJ>ò¥U˜^Š3ˆžu)umòƒöëh¨„ežý
ß™4t4�Õô+¯UABfÕO “µ£XòTG°D¼í ;D?B«¦"1¤)êéعš&À|;0W€Œ‡wíN³}®Èï�®t$ý1?á.Ké«q¸º&›\¢ÕߨA;5^í5¤ÖdãaZÊ¢Èa`ơŀu(w^©¡¢Ý¢p®£þ6e¥%µÌøhæTYßkâ¨\Wì<OïÅ�ÃÓó�wGþB–:b¬]ÄX&ûÀTˆE…ÎTF½rekK±kƒŸ␍{^-b—XÖUϯ{d5?P)oXj;° èÍÞÀ̹A�␍Ò�$I{) Jìv}Š␍?;ƒ¼f.,?Ñ Ø`Ý|ØYÈ^N‘` C ␍D ØGͼÒ0ã²i¯ªU1÷h]·¬P€ø¡Ü@¡öQ„e›¨"¬ö¡u‡)…WhIú…¶¢ÕÀhkvL fnq*±+ü�øÝ$�yã␍ŽÞ¾vð9Ã;ä¸:’»;JmïXnŠNF1É´U<†Þi¾ˆƒÊ$¢}ÙXÆ£�>^p‘oC_Iœý…&G!f,/çà?—ÑÊ^VWöKËÊžÏÚ8–à7C­¢%«æ`v$�â{ŠØê ³å¡Ï‚ÝÔ·øH­cÄÊ(-ÕÂÖùD-ÆUX¥’?¾Hm/„™‘@J{ba¢gøµ¢Œ�3R-Ò¦xƒ�B‘`Y‚
µˆQÓ YŠÕúh/jÞbÀ.Ü
Z¶Úâ鯨Š6þD+
( Š·”B␍˜œï´�¦½;î¥,}qÂ.…ýOÁ¥¨µ“MvªÕ=;§´Ph1å=µ�#dRŽìņHMÖ[ó-øÓ«û¸Ô ÛüãA;¤P³?ôÄ-�®d^/&©ð£÷I␍‘8÷+ÔèJ’Ý51Q¨ ê¶G¿ßû#ªÕµÎŽc¡!(œºmèlHuaÉöR H£ƒØÖ«ÏCª/}ˆ¦␍—RMXºpÌ¥W¡.ÓÄê¤À±¶EÐ3$Ãs.†l·>¨Æv‘j.ö{@M˜¢N…�%êÑ{(!š²_‰¡p‰ÖØ{ñàm¨ïÃÚ 9VÆýf0a�‹‹ý¾¾)ç¬'âb¾âºÙ3K•ø␍uEE郎Q ²´¢Ïñ«»³óçDô'ëÝ)hg@,#›6f+ºŒ4ijÚÐ%ÈôÚxúÕU¤:RB£)ÖMrÈ
ZOmºšcÉw ­¶¬üG[Å\Š␍Ôí&_‘ ý슃²Y-è%M±P’ú(–®ŒhˆÃÔ`𤠕`mR³Hw(6ëÈØ¨,,üHñ²­¢ÎÝG6LŒ¿rŠ)�ÓWN£-¡†¨ ½�lˆ}ùýäíû(xé‘<^X±j ~ÅI(Šærr-��(±õ<@i£ç
›{ ¸¥çŽ‹–e ã¡T‘›%ôÓ‹»Éª:PÞå¾§Àë˜ÝÛâRÔyÛòÃÑ.B_Q& �¬KÑ�‰¢.U¹6štM8$ÞRï6‘TœpŠ8/2V‘á¸@“ÅH5�†C�nb‘OüÍÍÞŸO/qj””GmÝ&·d·{­-r·+akÅjºNÀŽºší�—’7TO­`ZªƒT´ÐêÙíï×  ÀFuˆ¼6ªïfáÄO³Hð-k„¬�s·»Ha³@8ίm‹@ð°¶d󶊇½e/çèÁjIÃÎGß¼N8é º¯«¡ÆÔy¶‰KšÕÏ‚â°ÑõD/�•%…&d†Õe¶«Õ1;ÍÌÞάˆpÞù-uÏ%å]š,9±õÑ–íwÌ–ŠÖâ•øS:í ºÒ®Í È¸6×wô+ãã3·â„¯ú̈÷}dˆ-?ŸDüÉt`OtÙá(ÈòÏ+5r€VEþÕ'®–uÒ]jã¤Þ݆¬[b9¿º¦�ƒ£N¿å!Vܪ]ŒEÓV‚÷`÷ñÏÔcµVžªWŸQU÷.{T<‘ûr³­È=É€l“órîUyb̼'ÂPcæAwžcGMK«Lv kPxó—¬|û¨®K¾z¦kÕK?½Ðµæµ¾Ú„· µFUÇ,ڮĎYG»8%‚G™™¼¯ö‚DÁ9:1Âí´ûU÷ØtPÛyÿ݋Ѵ˜¸Ý¦"7Ä9¡Ï»Kêáõò ßY�#ªºO¯ŸVQcHñ␍U�L0¼&GO"àˆ2,õ}”-Ÿ¦¦iÒÂŽ�ƒ4ÖyïxîÀÙ‘nZèP4"À*‹“ØÑgÏɃh¬ “›Ê.b␍wúf(a½ãÚìYõàˆ¬Ä‘tÝ÷}±ÓõR¥t¸“(^/èºæ(åÙ¬ï2ŠNÞ¼²Ä{\Ƭ9è¸s¨^ˆ¾i @ŒÀïµÒé¡xë sq)}-ŠZ²¸UÜ)Äo·ŽAìØäB½0mºº9˜ìc¼“üÜ+Z␍ìi8öñóX
_†júÚÛ)d)[òs•X;Ýéz—åQYÍ›¢õÔ�Œ ó +z´D'+ε)öÚ»–g,—KŸP1¯Åâj$ö[`Ø(Z‘† xÕ¨àðk‰©úÌkH¸ÊêÉwN½·´â0Wƒ�áG¾nÃEgÓŽÚRTu[DUKmýÕ–úÑ¡øAû毣h¹ŒŠCôX=£±RÓ3¨(,1¨Iø´6öGG  EA±’Èb‡A“æ>ÄNE?˜¥¢L¯ÚÂ�ŽdÔDSŠvp¨„íŠPöŒ fŽ(mÃq³�ºwЯ`O�Ñ �ÖÆCïäw|g÷?Ñ™ŒTàYo*��Õ¬‡Dc-ëÖ¨þrÒÌ5¢h;¿19Ømêk/#ÿ`î3?BæóîUùà@ÈV$ÔeÜrr+û–Onß62t&y’Nn·GúÆòENq¡Ã/Ö¹íëQ©ò^ØûÜ_¼Ü+ïôÖþ–Mn^æÚ±·¿KgV/L,¹õ¹Kœ>b©vÞ½½S±ä¸xK�ÜWbiú„¥3›q ?+'.ø!;<�ÞU>ùí³·-®$pBî1×{ÜH¿ÕäüG·Œ·ô~]*EÙÚl즧‡;G…á–°¿qGÕäGþ¶ª<?Ò•ÇÚÃumsw³É¬íæû*n)ÜàÒÈø…�¥n_bi!-Ä’Mê
�K@Ϫ±T½•�%:ŸÝXbTê Á%̃ãS—è[ zò¼‹²UØ_úa ÀàQ␍c/«vuk¡b+Ee†Â»½¸ÿ
?÷ºtkå¡¢␍äx¨(ëÃ[å¹+ÑþŠàÕ@Ô\¾çv.âq¦µÂ`dœ“§¼”×v(îX'·öb+Æd`¨¼|yÕwƒúª¼ÔÛW6¨úh„½Í·ì×Ú€v„úš{<wƒº¿Ømd�¡nÄž†‹·çŒãp/6W·Šå§C'¨Éõ&¿á5·¸xûxšµAÅ`0`þá‘®•rgŽPj?„¥>·~î•®½7÷]¡®°üC•°§Ãpù‡½·§<8�µöuÖ¯h^yyb^W{Eêùê*†JÀ¨SË)·™6†
”Ù¨Z§öIy©Üž#¨‰I‚â_øu“v†:Ø?06ÀÔÜ)½¾èµ©¼
̽3ÔÓêÚâWn|b@0àáâ Tsƒº¿Íö™Gg¨|â!¹Þ½9u„ºPÑYþ6Àæ©=º(¹@Í-.g…ì¶ Ô‡:]“¯¯␍¨h4&À{K›+ÇRûÆêÞ…pë:Ö•tŒRçµúüY³0Ï:¯v¸º“"ÀkÃݯ÷4–ÍìP�N_T¨é¸m¬ù,E=P¥™‡ûX¢�{yg¨ cáø¡)8B=ëJû®PÌõ5H9—JÒWÇ_cg¨GÜëq­¶s„z}Ð90 ¢¹±¾:É]¿¹A­Ð·ôkÁêqzñºU_[w‚Š„ÍíëæÐu¸·q©>pƒzBߥ·K.P«É»A)c¨Æ>ÜÇÔõ«+Ô ×Ç%¨Ï9úE|K:AE”¶pzÓù,.Ÿ¦‘üúz_w…*KÛñ7¨'ô[õ¸‚¡bJ³sí␍³p?º8p‚ª(§éEjƒKؘ'YX«rª¸0Ú3 b•c#VTÆ\™F€SPÏ6ã_¯Õû€º©ØWž¢ü�R¡~ÖlP—ߟÞ1TÖ˜«¬¸¤«§O{jzR.ž¦µ•§<²c¸ZýA¨ÛñjÊ€Š$tf˜m¯¶’ª„â–Šå#«\”’›Â邚™„š[^Ø|Øß¨‡1Ô[:kc¨xnŠ”m¸?äÍê'�º}s|l]ÞÍ?Ú2^ïèý·ó²ù-;êÅØb¿a{k,Òìx%Ƶzçê|˜g++¹½U€"N:.o‰ÊQÝ8«’+õã&}¼Ã±øí¤¼ܦ�/·y··»ôqë(‡ß‡eú$v'¸U¯Òg̓K··uúªü9²½5i6O)úêv1æRý‰¢¯wNâno³ôMì‹r~»C÷·(ãX^-0)µöéÛ›Ø&ykå8ôö�¾ýHo»½=¦ï–
»:Ò& œÒw¹jÙ­ú9ý¸˜q{ûƒ~¹\³½5!í9O¿üxO¹T.Я7ëœÛÛºž«\ÞÖÑ¥F µv”u) Æ™Â{âò¶±È”V^kno¯˜£‹…Cw¤5eæô“í¸To%˜‡G+Îo³¯ýëõ�Ñ£+ÒØáyl5qˆu­8X:ñ} wwcÔþÎyk—‚ì¨Ûà8¿åÏHØl°n^’ë½KÓÛrzíR5
Aºm␍â­ëdIžI¶µ9X6oÕg©¤‰N›ý†E¢¢l3Ë;™Ñj¹v½�Àh屺AÁ3ºV.QÍr¹”9JBµ«�Zím¹‹ºÃ€&ЋÜ*QÕ{ĺtŸ !š9ú«`gÞ�±=¢ö}C7l3�ÍFXq¡
ÆPñÜ"º•vuó<­Cg'V]Ö fÛkË1Ù*ÿpïu¡ÖÊØ ¢eML×®K.PAi>뜈nPß< î¥ V] µ²²h@U†ÅäP‡ÊY 
ûü}ûx]ƒº×µ`x!n†Ê_-°2~c(W¨˜æ\ ‚Å vų3TþቘQfÀ$÷XW¨Ø´p…ŠìŠ–�ÆXr‡*œ^Ü»CEJŠ+† ÒSêný˜˜ÚÅbJ…�¿©ä^ô.‡…�Zt=P“üóq°r‰sRÉ␍bç¬þ$ ׯ`ί>•U./KX1$rFC®Áû;Lê†IéOÚ܍ІêO˜ë-ÙGm\š|w[ç+2ê Òô¯vÌ2
Á?Ì./ã4¥w6kM…p¦÷¨‚¬Ë.¥<ÜV]S{7çðseYýï+† `sêAá§
S}î©>u̦NoU—Õ�Ô‰LD,M8c:,[phF})Ó–*ˈ á_ ÌmúÀ»[z—>¥ª)ò¡¢”1¹M&.Aü8âñ‡:Blº;Žð<fŒ�¬žƒÔ?.Í6’Âþ}â7‡õ16£Ôî“Éæ/%¤¥Ïô´sˆ½ƒd�ëÉ�ør§ˆõ”­)ÙâEöÎ4¿÷0ð¦/ƒ¸T‚v§/ú�Yx€}oÔc]°ïG­�9h�vB½67þø²J!Jž�B©�‚>~h� 1#U4�=Sz§-R(±‚iÓ•=R#ש=Q�?TôaW­úªÏ·vö4Ëqgö$–‘Ãà¶™£ãƒ#scŸepéEïÁ‘éœZÙ$6ÎhÞ;ï!åÖe}2ƵBÆåLó¯UZ~Þy �frÊl„× ½œ3¹ï­Øy ¥ÁlU2óÀMÝ}áF£‘F7•‚t‚&�ck�¡kk®M™i+2ƒ l°_FíÄ}V‹zTC«� ­�WA <IéâÉqo
‹5öe\ÂÛTœê¼w™Uô¡vŸx¿' Fh•‡–¦R¥8î1<L}Kºö�~/SO.Ã<»pÒÎŒV‘f�þkbZ>Å{Ñó–B–e␍Æu?t[©µI«*iÌðžMÄö´®T�'¹µÇˆK«û”*“ÊÁ8mÑ"|b~øÚlĽû„␍vè[z,:wKWóÜt=kŸ½VOc,&€ÒÏ%OmcÑÏ"0O£�®b±Lë7ói�–~H·NM‘¹ Ýšu�ñï˜YtN´ö¾úu??¤ù(|a†ù^Œ?Îi6éiª'LóÙŒ¶¾lÖ-[ºu•GvÍÙP›UÑiíïǾuñ÷Òu�×ì}´»³ï-ÓÌÚ·£Cú\˜{î£=˜£0ætÂe6?�3…[Z?:ž Aþ–!‰åðFP�
ìoð�«„1UuG«Æè‰fxxwÆOøöoáÝ×Ù™Ñâ*pOAÛìÇâ—óš5Úz,NÆ#ÞÕÌ(ìÇd¤G�¡n~pèÑ��b58‹ûêټ û±0’Ä�Q~Øt›QèÛ-KŸF‹AE�-œg‚÷æ#
ÈBðã ¸(ðá(¹ê4B4šÐˆ÷Óì”ËËÆB`%ÞíxeĬ•~Ôæ0Âa›5i�Á¤.¦;XD{Ï_®¡:!ƒãË“Ù�ð…[Á~èI|…dv ¾¬œNiËš…Ù{‡Vfw1ã|}QÜRqa!�3ÅÓéÐ;ô0'¹æHÈIrcˆGÁÏaàïÈÅ‹t‘Y�Ñ£Ò;ä¶o¯O\‡…�¯/„[*|ѳ8BT)p`n噇d_eÍž[o¿žeªÇVØIdYon²áÜ%.¾�C›oǃ �]V5{»x>²©ÙÜöÍr̆=ÒSÓžœ‡ÁQ(›!l¬¤µ}Ãx»␍íZ²Ûºx„×EmõôòˆÐ’GÖuqJ¾Ù¾ÙLÌBî„ Gö1 ÛLîÅ‹˜u!4␍ÉM�!-óSŠ3¥M¬€Sˆ@ŒmåC}Ò•]?5!Ⱥòù¬KŒ¦é:,~«zqÕ´© ßÊð,Þóµ‰ûÜÝ÷WSîn˜ÇµwÞ3ïFY=Ü[¨5ÝKëÍ7¼´Ðš7“Јy˜YÝøhæq[+.;…þ␍­…êŽó;n(9—q™5›™JèŽã½âÖ¨–UišFœHLš�÷×3oO˜„␍´f³Ì¦^~PÇ,»Fw
]±ÙZaƒìdi^›ï$ÝÀ´É&lÒ␍ž¨w‹xcÅG½¸¿™Yºá¹…3”~ï%Ý )é¦Y„݃‚ÖBI7
9´¹™¥Ú×_›‡˜ ¨p§4߆‚ˆïVH<ôzIâß�Œ«í�␍v9¹©ÑÒ„'ÌaÒ’^{Jê$úÈŠ‹ÕËA–<�e�Q´f�ƒgA&#PDWÞ¸ndÔØîo␍‰«¯žSï Ckþ×ðuú ÝÛ NÇ�{o£;€š�gÎ0å.l|rUü][±­žzC³FU�Vt³Û{#ß·¡ 1MzdŠ+?âÖ¦sr‹£ÙA¼
kñ^Ò¾>Š ÇlÛ›…÷wóÐþŸÝã U=ðú­yjÿN‹£›çµ6¥öožWf!;—eM\8™Ï²␍;‘ä‹“™ƒ“pwÜ={–h;ÿ†×õÑ{qt6ÌB:üúè±8ã8ºÛ¾>ã!� —@Ã2ôäi¤û|B³ŒÐWyTŒ»›¬›˜=íœé¶…¶Ä”J°Ãn-4Ÿ»v 3¹·ûÁKòZ‘–óžMë.®§ÉzDÿtÚ†5…÷ž>o÷ˆ=·>™ÈÂêëôç3'3Ž-Ý?¤mË”-#�ÚÕŒ{ðZ¦Ì¡qH¦9DÇÙQPºoÛ=Ø¡˜Ìê³y/S>ÆSÐh,ÔTÖknBmÿ Ö|h9„3…-=,¬„Ñ;ì�Žf‚~À޹ ­¹°}cèékc¦ ßøKÜ'wo²�É´¹±yŒÌìÑFÇÛÔêŽT­ÎÎÛÛ:kïuoÅze±5®Ö
K;¯µë­ó*Îå0óIçKzæòELIK3¥ó™#´&sù"æc fIçóÎå‹©‹³¥ó™ :äò™•gJçóÎ勘SgIçóÎå³*P3¤óyçòEÌ©‹³¤óyçòE¬©‹Ó§óyçò©ËÚìé|Þ¹|˜ ç‘Îç�˧Ž&\:Ÿ5Ú#O÷è[x~
Ÿ{ØW€>qC·übÅOdoÍ]␍K¨Øw¦¼}ªXcvñùj¨øu��§ŠÕ!5ª´ü¶‰4ŸÉP6‹Qæ•èòç¸SèÑš_”—Ë'2V$ñá„£kÄ×½WIŸLñiÝòstyôi`Ó¡Ãæï…;¯è`³™ŽÐý³‘w|‰jx1©Î²ÁgQ ðøfvoÁàžmƒsçñM» _âä@iw¡=Í“CªPÍ(¿´»àñ%î¢pãb2••‚ :h¢X�¯­+ÛÔ
ìaŽø$b“_␍vìëL œ÷*.Ôü'Ã1éuBB×¼3*C9Ú�Û’õr[<*.Ž6«¯)Á)«Ge!¦j ™!GÎ}©3§ÇÊGF~:F˜œÂ×q¨„�œB‹B攃"ºL>.÷9É5 Ç®fûEÞïyEÞŸ]êiŸ9Œ¨9…~‘÷Ás
ƒÒ#æŒü9…6¯§E� ÷Ö|2|‚vŒXÒ·î[ð¡‡éŒA˜ÖÜ÷>¦AšOþOH¤q³´fõ“Ã2-AT$Ë'}'�š»ow;$-l,uÏCn¸4€çÆÏÄ|ÎøÊê�}'{Ð)æ6€=8ÚöI>1ôj£óž4nc%|–¶†´Ã9.6WŸn7´ø¥ì¹Ì’Y¹ÝŸØXñ0Ô\ÓþùÖ&|1ØáêU÷KØ›Xï\ô4$Þ6¤É(U«æ•B¯(öLÝ—áÇÈ ëS¦—UÃt!hXLC98fuÐ'WÏG¹§eM'M­§ý8på}ƒçu)à‹ªÀ|ëâd¢´á|AlÖ]  ƒ Û3 øçèYúÑ9uìV(ï�GŸp�Å|¨ÊË{ÑO Ö­pÞ»eõoŽìÞ”5‹÷ÆDi½Ã™½7ÜR1¾ädéY„M@«â0¼÷ÆÝ/Ð;œÙ{ƒãã!#Áóázo"^ç@á|¸Y½7(Ž39!§�K: à½QùÆ7WÐÝ{(;H×l‚B%y^dlŠtDËôòI�␍¤H¹Æ\DÂdH/|&ÒÕr˜Œèâ¶oò’Y{vdDéºF\"(•bš3¡ †ðKcCÁV_ç”)~þ—Øž>)~A2Z=9˜$bzøé‚„�˜äæ6µ´'ÛÂA`®Ú7dá™;E˜Çü·.¦Î̳YkZrÞ¼3ó¼Ã®ç–™çKióÉÌ#ÞÁ‰ä¼ð␍ygæ…†�%3ϬC›’óæ�™7i␍Œ •™çj¥)¡sÈÌ‹˜/tràÇ9eæ©‘÷öä¼ygæ¹Ìͼ3ó|¬5·}¡½[y‰ÿhÉó‰_z M1µÎ¡—Ð;)8¿
°é娘.oæ¡càV&â�§Ø,Æ␍YMlßî8úlpC3€[Q™Ñ¼zšvyB…X»pìy(Ä´ô­5;?VŸËÞ8TcðãÃL‡Ýê¾Î÷U¿3^‚‡B¯~Ù9(€Ls␍…^ý
œàꡪ—�¢%B“Û휎:Æ␍ù�…ÄÄÅ␍…äGçeív.üxëº8š}6ÜZ#ÔÁ�I›ÏÆ2#œXBÏB›Ýf0Ö<¨K×ó™ƒâðn®I²wsM’½›S’ìó×’d™…ô|’d¡¡ù$É¢†fO’E­Ì%I¥Ñùtm�tM#Fñ8
6Pü’5œÉŠI~¬+3»ÁTacÊË›9VÈ))ϲ¬‰²3¨uošWIy&öTóòþJRÞô¶g¨¤<wçý\“òÔ ŸtÍ™“ò"ødØWïµ% ×ºÊ(¢ÜšäB°ì+kÌ…ÿé÷ýö8‡I¶œ<õ‘p*Ò¾·�B;žQÇFŽzß4šÍƒýeÿ�‰ˆkª<J§ °äuò0ì¼FÜrqý³®m}²�gn% sصw¸«¡Í—ð$ÍÊÇ/—ò±TûǺMe£‹×ë±µ£u&–ª\Þ¡‹×¯ÐÅë×±µëÝúvŽŠ–cé£z–ÎÜæÕÅiSþ4wZóOY¯Ð#afÛÓ’vwž¡Í˜¶$À␍W—dó³Ö´»xcéòÓ5Ù�O<{¥Ý½¦]¡â›È] æqnVÄ=ÙïÕ+í.–u‡Šn"סr÷º'ÀmÄ^<®•»Ø¹4Aµ]¡‡n玸&ûeÛk;wk·T´¯´»Ú5b½§ðeß=Ùoù3sÛpƒ*z@Ý£‹V­ÓžÛøq¸è
5ö¼˜»qÃpÊ3Ùo¡v°b›ZÄ·i Ó’Ç­@åÎ%[±[Ñ…³ÍX€&•qýÓ|Ú8µ¡¢þ4�‰¡z*n[c½|Îþñ½“ÊíùJÏŸo÷ÃN•\!wz␍\ýTÎ÷;½vÏ¢v�èrO.ò½¢frÿÌÑ;8ÛõzÖ>�íþóº^Ïiú‚ºíÎWfIÎ49ˆŸ*þ·­Xb=îv³_«Àmâf=×FüïÂó»h%È#N§ÁM�莕 ˆ÷¹~"ßÐïÇüs T™ý¤î·òFáÜûœ¬�°>›‰}NV‚³Ûn¦Ä>§¬>WzúÄ>'/¢ê žgbŸSVæ›ù&ö9‘�¾·6¿Ä>ww÷\ûœÂSLz^‰}¾‘�óIìsÚçqÙÅ�%±Ï:¯$«ÏcceÚÄ>—]Üy'öyd¬Ì3±/è]3&ö™âýõ¬>çíÕ™ûœ'â�škbŸSŸÌ[ßsJìsÊê³EtÍ#±Ïiu¾™_bŸSSÚfñûœ²úœ2VfLì›iáûü�6§Ä>§¬¾°H �Øç”ÕqÉôš!±ÏI'�س¾gOìs’=¦Ez^‰}N›-ÄöœkbŸµ�_wÊÄ>§¹vßX™:±Ï<KÚÎŒ×z3ebŸ‹í銑)ûLèÐü{BÙ´‰}NCŠ˜NNrÓWQ·f´I¼@q8‘>¯øê^‰jZ'~`ÑlFMŸ}å+7l*Ç<nñóS9æt‹ß–Ã~Ž*G0TùÞl"Uâ„t¿,Ï7U? �üîì] 6}m÷å×9ÀßëÊ=¿»zû42‚º„±õI³Bƒ
TåBW“‰[*|f¬&Ó¡Ýdš l²ûÌ\lOÛýS&Ïnf×8›€úzÀËÿ4Jóž‚™/ÿ#^¿ûÿæôÍãˆð™.ÿ3éi÷ÿO•r¹ü/¬rÊËÿœ��öûÿBæKM^þ™8ðÜéþ¿)"H`™0]c¯åx¸åz$ÏÍ/Çcp4Ÿ3ÉñÜ/fÎ&:òŽï0.}súœ"ÃFw£‰Ÿù– #×Hã‰ßkûÜ#C§Çáû|è‚©!ì䃴ë}c–ý“D|ÒœFI�–•Ïb­…Ú0B^ýÀùe^!ñÐUÞÛ—&Ô
[ó µÂgÌNi€ó QVA1ç°“‚[±¨²N$°¡0k {àjh*Vœhì\+߄δ7·æ~Hb�ËëíÙ¾?¤øD¶ïÉ7*xÚ)ÐýÈzŸC9´¶H°™3Wl^õ16Ì�ÙØôÚœ-n2dû–çë½ïÈYXžˆG™21æf®—;ÞÌïrÇ[
Å´RàV¥Ü»˜Qø.ºYt £ïðÑ0␍ÍáÒÐt7|[íÔ�G4R¸°X`‡ŠY6‹A'›äGxæ�B1�ó~Š{ÿ#SÌWÿMÉ�¦¦æx×·ß½UõYïýÓTu׫ÿB¦þ¸ÜûÖÄ�òÞ?‡eÍzõß,ãšðÙ„»¬ÏÞšÿ½6±g¶ïT÷þ>¾}ïùkæü2D õùœ¼<Û—Yp4-u‚—íË,„»_ÞÙ™‚p.ÈûðMÄÔRï␍‹`Ú†9¿|"ºpC³eûâVÈê9{¶ï�çÙv;xõ “}?µèA‹fcÏ¥šŒÚAid7Þ+š£Ì)ÎFïÁ�!©îñ^•û²æœKå•-×p÷ö©”ØÀ‡ÖÚbíÖ½ {BkŸØ3@"Õ=6ñçd{Öo;ÂötY¤ŠqÊ#bÒWc´» [ž¹Ta5ÆÙ¸µƒ�Çó8~%ʵL'Á[wq§È»-Sî¡|†PˆØÎ¼÷ÈL›åT­I¤Íí2ÌÆÐØÊuÝ�
ªÙ”©|€u4ðÁûzð‹R]w£ð=}s» úäyÊHà¼[ƒ�·²'}G€ê$…¡Ü(5að°ð€R␍¯ÑÇN,Ù¤QŠaçRÜqaIŸ¾ÒÔo–9eÈ,+TLÐÖ«éØbÁ93ocaÅ53O¿Qîù€Ìûa¿‰/i\Mçpë ž­öè•…øƒ±Ù7¶DÄ÷Ó+W¨+Ìa½éµåš#`†ÂiéÊ4\kŽÜp±-¹eæ û[_K=}¬¶Ì¼„)0¢ßgBò&ë
•®èS¨¹Å¥ËûêÀ áz¤?.Ô†¼;Ô½ÔÛ­+ÔU)žo›]ö”@Ê êñª+Tex³s‚
`H"âÎKúÚ2µRAƒ�¿©“‘(?¶zAʽŽ{}‹°q)š[üz­ÞŸù6™m«Ô§.œ(Eçy×¦Žš‚,â½ Lm¬¸¯YúÊ :S5Øv”ž*s¹v¡‚Œ±šmÓË/ÉãV>‹:ìx­[Ðn␍øœÜ+³,0y5ï3„‚*Á›8âp1M`¿ÓSÅ÷SÀ¥7ªÂnù¥Ç­¹`áÒãÜ"A#¶3ˆQUÈ0÷¨!4Bß@ø  € “{óMð@Ÿp9UO Ö-÷#zÂòͺ{­Ú�É8\«îp¸'¹m–FÕûœÝ žÛ‡Ôh_˜iÕç[ï› ›àÕùl=¤çàO«ÎãJ”�¨±qÄí`³`)‰A� ªKÕ5%ÑçÒ`ùˆÁóÖü¬šªg X0š5…™Üj°_Þ£,lÄÚ-é·d2dé‹ '&¹5Îò .À—ÇÁÿš3'Bÿƒy`>…�ý^»OÒEI‰�cs|óì@¥sY%´™6$[{Þ*]ˆ„6al[N"³dz5|Žb0ÜkDtºçÙ¹Å@U·(P^Ò°y‰¦9´íJ:ž/8·Ô÷ÖŸ‰9t�úßT¡À¡Lè3µæšBÑï[ ÓZhÂ÷Bšo6Q(¤Íë|hÍut*¤ydÆMd1[7‹§LI ª6šóo¦HI´²§{>bÄáø�)‰ÖN¸ç#Fl÷I‡LI š�¨-®6’[á.tÚ[ ‘’è"ö&ò� ö)‰þK�[ôC¨”D”Nä#Ú¨°)‰�ÌCûöªuH¡2—|òÝ-é³çqMuY¡Y
üÅË
ÍfÔDnãü.+ôs?Ìé²Bc!ð—3\Vh—ié²BÕ¥:íÅ€A/+ÔÝv÷²BLi¨[÷²Bsäý_¼¬ÐÙý€º%9^;ŠõjÒ¿S­Ì·êap³^x¨‘ªóm‡a£í\/<œæT«).<tÜ<Nµ2.<œ)*ø…‡Þ €‘9œj…/<œÃ©VA.< –ï9󅇂œœN=Õ…‡[ž·š �Ù.< ™P6í…‡v²°Þv83í…‡Þƒ‹xÞïâÂCïÛ=|�á.<ôQÕçpá¡o0ì|.<ô¾L•i³_xèÍÆºªnO�
{á¡÷Êg×Ó¦¾ðÐþ4qÛ¡£}3Í…‡ÞqY¦°ëÙ.< �J2� ½o;Ô×›Y/< yOá´Z[±ßv8é žòÂC÷p5Ì|.<ôÞ�QeÚìzfÇ�Xõye«¹ßvh¶fºðÐ{Ÿëó¸ðÐ;ÄÛÕsöÂC·d4óVÄŒ)К�±HŸ” ÉëÂÃR`– urs¼ípÂg3í…‡Þ­D\ï)œ=åÂtÛál©$7®ºm·9Xho€ ½ch#úù:?Nwá¡÷É#†á1ã…‡zâ—cÆvÄœ´<jòÂÃ2mzßv8»ª®^x8‡tì 1qçpá¡ÖгÅ=±¬…½ðÐ÷ŠBa3Å…‡^‰Ï_ªí9û…‡ŽD¦ßv8›L» ªü˜÷=gºðÐ[ù1E?Ìvá¡�p§Ôà°ÞA× ÃçâNuá¡c+º(öÎX qááô]N›ªQ3$g¾ðÐÂ�·0s¸ðP˪s¾íP•i³_xèDE”Û9\xèmÝkH›[â•óm‡!|�V¤Ù/<œÞö uá¡›<$·Î+D±ì}ÛaÄv´þÔzßv¨ª³_xè�¤ë¼HOqá¡÷m‡~zZð$]ÏÛÍNÈ™.<œF³™âÂC×ÙÄ@Ö­o¯Ö|.< ×9û…‡Þkv©Ú— i4©»Á3÷µB]&&ÂHtw°¦ÙÐï7ÅŒÝ# Ï<ä½w¼¿5‰’¤’˜¨j`syÁ�—␍`Ù§MöÍHÀù z–¸Ð/«(…¦lÁIu©¬([—��Ìhãp—î®ØÕ­…
.‚²ºö“×ç¢[~N®Ä�×(¶úºßŽQ›?v“ë[_…äÆúåCòºó)ÓÕê� ]ý‘.Òµ£‹]´ÔäÎ1½wQHÓǧuú¸÷þAŸu¥6}uÂèëƒÎ-}3l¿Ó·ô¨Kß¾nŽé»ômœ~LÝ$è—ÆÂýúzÿN×/¹ýÆÝ¯Òo'ñ EQªeø,¯+c¦ `”q]ˆWó+HO¸¡lÓÕt§µZxß¹}yüˆ­­,ߟ/ ëÝÒòùÕÞáJûsya¡�9�/v›Ë|aå¬ñã¾²±¦%%ÆÆ©ú†§§À˜Øníúz™^’Zðø\v'êÜà”×á%¸ÇÒ¥ÞtA¦zÃb±dÃFBÚÞE‘ŒŒ¿è·�ׄ¢œ¦“Æp'ÆÊ'î“Üê]+•èÚ{ó�Þ;;í␍_s␍”LSn}U“›Âé�©Õc’!yAWoóu|ÿ!�9“R6%ÌÊF–« ßâ=ÃKkœ±ºÉÿ]‰%6NùX:³z‹Ò€+±¥Š�‰¥;;èÙa,y±pŠr�OÑ‹íXz—kÅR'÷û±µ¯E«ø%¨¤Mîe“Hˆ.1kefÀ”;b†AC«ï¬Ç<Aµ*{"À·«“úøØ‚o·_Øü§3Ÿ ®Î-z#šŽSüIȸú퇴5öàûêW’ðÍ~R}RŒ§ÑÏ´úó˜WÛy0ª6?¿
t&{@ïöäãáîÑÝÝ ÈƒQAíçV>a¼ÀcÐ^l"0¦wâRyS{WN/ØÒãͶöâ c¼�ìcW{qÆè/^aÒ–»tfos␍?C`Ðc3ô½rÊ(o½w@ÎSk°¶='¡¡Åû2ü1†— þÉmßÄàçùΚÞ@뎘Îk)Tj␍Tp©„ ’‹ÈÖc„ÓÌïùYy¤Sx-†Ÿ7¸Ý52A™ó'.srõÉAÝkÀÿâÆ"z›T�Î<§ÍH{ÓÀ¼ÁìçÓ•Œ¸±Rüè¯ÞÔ6ªü“ü$ÒuïþÂlÝj&®¶4ùù&`˜G“šˆÅ]L
a¯¶³*]WZ›1Íö„¡Ý3_³ÉJjy\‹ï°‰n}Q%²‘ׇ.š‰¬q–FXJ^ó}øy“Q©¿qO3�マ›ÆC4âLã•Ý*°2|9í[‹Çm¨óûy‰›Lã~ÞgÔºŸO´öíÕ ¹¬¨Ç[{~¶8Ó»×W¯ÕOGìÛÉײ:šÏ^‹®$pºôšx/·sµ³RWXLn�­Ú¸‹b2$õÈVòƒø 5�ÝS:Ô¦J2£WšÙcvâðMd´o-Ö(kö%Œpôƒ·u�¦�ÝÖÖ[ëùÛôÂIííd¹€Zn¥>ÌÓ‡{É,Ì×K.Y½½ßß=º§}VtUÑ8.ÚâÓ¬®,|OóÚKmŒ–•{t!s$äÝ},qúW…踈oeÞÁº}Ktº[±tÿâ Ö‚ÓÑ
úŽGfó�H>`žÝ8æ=Õxù©¿�Ä{PÍ<ÂWœ‚Ÿõ‘F û«(Üö ‰Î¤*:Ñ]®VÑù S¨ñUvu'ö‚g©”)|àX¦™Îýˆ"ίNª˜ÄŠ4È´ê¡“G˜Û¾==š$ôîÀä• Q‹Y¤¬Ö飖ßHÃD£9Ê$·ò·ûå·ÏÝ–EÄÓt¶q„œG �ΊÌ^é+ôqïN×ô&Hö;!A¬äºù�ˆS,DÁ‚ûQê.ôkÌ~ºÆ £e¤îo_"¡w±fs|ûÂXm·6†&Œ"ijû†Â7¡ímä‹/ç'…Ýý\Ūÿ¥ÒÛéâ)~R\‘+ÅÊ¢”:¨Þ•¤Ë�÷kfÞ²WµÂbv«VXºl•_÷×Ç ðS¼r |¾¶§©h•á¯âÚÁ™%4¹qÞ¯ô,’oii§Xýz.råJ}÷ºüú\Ý?ï0;_»™ÝÊA¯3¬UºLIU!øJGSê! &…D…1n`VOB]V“�Çöîõí�².”ÏÝ«q¬�ÿÚ¿<®Šâ*U}l-´1»aLoY~)##c9ŒÞ{Ì“ ïØ
EmÜÕê£fgýðóÒ{ÀÄmŒ¹°�ܯÄl†"f(äæClwØSÏ£¨Õ“˜y␍ù•[,_Â¥Né3¿0@_tèíõ­•)A¯-UP¬zeooós÷ºÂ}…F<Ë–˜ƒXŸ'¥�V)~¿´jµ[␍Ñ)�o&‘èTi®ú\ûÒ•áunûz´SîÔV”�ÛÕû¯y_y¨ÕSû‹»gÇ€~©ò~1¼ÄL9Œ½¬VèÖr¿ìY¼0æzÒ/
çA`L8_û.cÛ‡­4϶�F?åБ° :úÈ␍À„½Óй]%VÑij6¹·æ*Vm2uc#=Ú¨ŒÅ½c�©WÇ`loíîgc
HÒÊU©ÊîïªB3UU^‹¯ë�Çý­½îíý3y¢ÌNf8hãAZt‡ÙØÞFøÄ(œdû™$Π\.}®öŸ+T~uˆ'‘@@¶ŸEÎ!¤ù�yf9G4¿1»Èm°„
»Z¶nêkU'ÐÄy?¯™&’~ZèÚx/k3Jù<‡ÀÌ*å,ë!(ÍXÙÃ&FáüU™ ËÚLªŒ#®Õ­ot‡ð$¹‘õ&ÐÀg5rÛ9°ØŒ”6¡Å˜©E v´‰_”—+q”CF^�,9|f^)–bk§ägb­ÄÆÒÏÕ+d#ð^¤ä@»">6(’Š¥…ô«Õ(¤QámbêÖ¦4ÕͶJN(SO#;é#'Mšô�N, 4=¬ôKgç;/µJ6û¶{½þ#^9xÊÂŒÄv6¶k”îHþ2&!Ó^î£tloS°<8è[içöhóæá:V}Ë�µ�Ô+œdÓ16§…Ê6ëk;ëÏíz…º|SÊï›ýFPÍAµi¡•*ìL™A¥ (ݱ¶žVªN¶¾§ÆyÐQϸ¬…R \VÖÙà[°Ž”Û¹(Þ QŽGh3"¼°�¯Á[{ítã-n ~z3*ÍãõÆÞ…)W9_�“ÁÎŽV̇wM,ˆG>£óÑeîÅTå’E‹,,�ñ¼ÞtùZ,Uo¢'t,õ5¸#Û4É‹…u´¢œÅoï‚ꎬ·8r¾ëßZo¦ {‰ª>›6àz3+èªøVýÜéeÞþ%:B/Äj+§þÏ®7a—:¢ ø�ÙsÀ ln—*ÞŽ-úaŽŽ$âÏmK�Fi3,ô•÷•Á"R®€„fÝièÚF¾“r5“fee2DaølJJW#!§w›�5›|6%“©apó,^2m•2À€Í”„Ϧ5€ ÅgSÝLiAø, “¡½½Û/É`xµèW\³\¢h¶zWz8ÝM␍è�ÝæÅi­²�Ìî¦äâjå±6zÙÝϽ�î¼_Ö«ÊKãl}›¹*‹­qµ²½Våj×ÛùÃYˆÔA«¿pg¡«¶`æí¨wRô�%=g�F`gJÈÍ ìöœ$îß·¤±†­Zkóôh8␍ÝÎóŒÍÈ0Sº/gôÜN½e0©kOáO›Ê•§ƒF—wöÍ&®�¥ñW=·®&žÕŸÆÌàO‹/=QÈwv†~ž‡²eœØ][¤íϬJ£r;ÿ"dö¯¤Ž˜m'Güݘ„Œ�Às”jPŽÛ¾\{Þ½¾ùñHÎáozì`±J [¼ä‘ Õ�‹ÿn­þÙ]«ívÅÁÌ(ü␍JÖ†±méV␍­Ð<§ain5^îÄž¾ÎƒÒ ¥¡o鵕ƒuiÁ–îÅQ␍›„öþÍÙ×6$ÿòìã©×�÷möñÔ˜¿<û!¶‰f™}<õzD×_›ý0;…3Ì>žz"lþæìã Çâ¿:ûÁ”[ÏÙ'Š¿ÕÑ6œe–Ð$t\EZÜ2J6ÎÿÑæÆß·ä Lä×™̰]¯BBÒwL ÷JV®™`ág åÝ}¯êÖrKi a4€VÏ•T§jk#Y^Ú®
*/<pÆð³……­í=͈•×ÌãG¿P«-␍à8›…lÆÖÆýýù®ÞF'nJªÀ$¬'‘}Õçõ4·²þÄ€eVI1{¯ÉdÄÏ`o)ü )P/Ã:ж{jÑ�õ‘Ý‚Â#D?é÷½´‘\ož� HúÛÅGFlpßæ“m¯íÜ­‰¦+�tîNÄ·Ÿ^ «ü¼`¬ô�ìks3ޱý1~ø´¢±gâ½XÔvØ“ëÝ›S3A=¤ú*ÒJ‰£¤vsÏþ µðãó¹ö
ÅÏëÝé¨'µ$T†WÄ™BððlÆÃøéLÇýI}jÛkO
×Ð�PdLH(?¶^5$Pi{´]^ñÅÃÚÆéÎvùËÌUäÌS„ªz}€!Óâ�n©ð™!P¹üÙ§ŠvÌ Õ5”1Hü>&gªJéáÉÀC¼±tùìB ‰¸ ‘˱75i”æÙF»␍ÿÖ4—ê m˜)Â�-Œg$R³v"meϩڠ �"‚³WÛÈÌ:Ú":§#-&m"‹`¢�T"<Ÿ[X³5@tèpmÌAؤR.m�‘TÚ©‚4 e˜ûaoƒ
0#ÜÎE<®6 nŸÙ��©YI+E»6 ™¸þm0°éÊéD³I±Z¹EƒÏ† {Ge ¬ÌšQn©Ï­Ÿk×ðõXk9;•¸Pš×¸2S ;¥e %¹g©ì�y?3-•˜(-CÏ:w˜Ò2ì,� ”–áüÙnŸß<)'IÊV–³t‚õ@Úzã… 65k'ÒÖEzša©d`¼f„␍¢ò8 1½zúEe`xí éLv3eK~®]o«Ê+õ¸»Ÿ;Ý/‹‡(OYÙY#ˆdSë·Zj®–»817Œœ êkqCÍ:“újjÛýgš­ï·R8‘
çZ�ÁÑN«>
[+ÜöÍI�ÒRá:Ñ:Í'ðOÐNwdøYLª‰T8Q-»“&?_†Î5Zå–66ÞÔ «×�­¦Æ™»š¢ûoú‹5ó‹òrC‘2¿¸aZú ÊüâcóÝ †6½K/´µ§$©–Ù;^õgIsJÕ+ÕÔ_¤Í/ED§™ˆ~Ôqö”Æ>³Ÿ;F$pJÜ0LãuYoü"IŠ4 ±iÝY"65<#n¦™+£V.hl% … ¹†Ÿ¨í6Ÿ5�ò¡–Ô³RI›ÈuÜ\Sæ-õîÕr5UH¼î¬Ó·K†­nÞ#¸$þØNý�†2Aòl…¶y 2‹Ã�äͺ’ÛºáOwó/­8qk$¯bZné“‘ùf›·>µaÞ™hƒ­ìoª›Åw„ ÙÊãCˆ½Ò<˪ߺ7¬úmüôJÒ+ª ±®~c?Pþä]–4PÜA²ç‘BwŠÉl½{LãºÈ`¯�/ÕÆß÷:}=š3eßÖ[?ô¼š’yw×0�æí.VÖ]S—¥.õ±¶{Þ|?®Ä®"æËOPtŸò¡ϵb:DÛq(qËãIƒú’!¬½ÂÞð$ë|eý)«~«ˆ\Ž í…S‹Þöví=:+_¿Ô*Ý…æîåõójµ‘Þ¹Câi -␍w4È×ñ�ÕêY‹c2³¢
›¸Æ<'}µæ™´F¹ºyµ†S~qŽ-–PÈ}I«âé®*™"‰u4-ûq’å)␍?Ñ2µ¿¦Çu¾3 ¶’~Jby«'‰¦ñyð¬L¡>îujM¨§ÍdkçDz´–Y�Î␍3�ÝMg¶ø8J¦¤èV<^Ôr6‹x q�Æ­'Üi&uœDà(­&}~lf*‡2␍…k”9‡¾ðÙ%y™Hn™dˆ.ÄAd!ùE©#ÜÛI".<A3’W%ô^-␍èkЪ„Þ;Îh)¤§›HdBQß,F¢+­ÒÒîÿ šH^rQ!+ÑÌå¸+)gJç£Ó�¦"ÿ¬GþÉì0ÌM¿%×Iº–~�*rsÜ“ú£h1šÙ½*ÙŠÔ”[ª€æü-¯‹¿´J(j ùTKt ¦ÃRå½°÷¹¿x¹)VÞé‡-{ì`‚ÛßD±ƒ—rÓûÞc‹¥Ú�6
¤PvòÚV«ÄÒô ‹SŽ�N_2y©s½Ç�ô[MÎßqtË,ìÈö¬Ý›�ÝÔàôpç¨0Üö7üÈßV•çGºòX{¸®mîn6qÞïäÉ.Ç·›²­Ñhl ×ñ´¸€Fxˆ>ÖÑYç0ð•W‡„ëå ßøhGÀ.'ã¤,­Pì ^ãÄ¥Þ3‘K«›ªÀ,Ý×ñ¢žV¹%û<D?3£Ôkõ[œäÆ?®üˆ˜³gJ�Hx/S˜)½fFŽÏÜöí ¤±7baå/SfµIåÙÚA`LgU S´wf>c_Ư;F†µ‰Mð÷ŠXïI˜A»Y±0A¶3P‹/ˆ$¼GäÜÞ�ÄYR=Xbï†Å¹îæsÎA‘FGQ¨ÉâçiôAg#–9?¦È�«›÷ Rž_ÒˆÙøh¡Ÿ÷¤]à›>9j„M,Q Mq8À³™4Ÿ½ñpFi`Â�}`O‹7>x¸Ì8µ‡â+¦nò†6±çÍf±¼{³²þVnç�»×»ý;rºEéiísae¡yßÑu"N'²7ó$7ŽS¦C,È␍�KŠœ_Q}®$È7qá–œia,S8ðá‘ÛÇÑÍøüM�߯G–XA´£Ï
y°˜9a¿Ð�;H›Ï;ùYÓAHÿ�‡X|ðÚbö˜5éjÎ}¨CGÔuÌXåLaêÇf¢=e°•=ß]#ߪχIòÍÔóчŸ±¥‡dÕÖ�Üco¿[y_¢ƒGw6¶ïyr8è kí]ÄU�¤³¼‚õ?«À,›¾lšÏÿÑOç wþφ.D·Éù©¯Á™óù?ú Cº*cè1šK௨2†ƒGó·TC�Áý·TC�ÑŒ�¿¢ÊzŒæãò>UÊ,b&Ž µË(³é¾™ùav ì;í.ó§• m§PIÚvecûÊðKÐÏ)ÊÚ@[Íbá/G$üixã°1ºhÞY}dm»¢tu㬪ï¬^L60^´í¬î¯ì›YŒ¿ZÅj^ �ðNYtb8"Áý$úFéÏ2ú3˜›Ô:Å&®ƒŽŽS�“ÑðÓ{„ñ39…ìÅtØØÆzïRß�| Ñ"Ú^œ}CqÜ,’øØt␍i¡÷âìû Þ®1â··yÇø/¯f<à}b�f$@wÌH@ÇæX‘ ´âÆ©�î©Ë¦Ø`O*üî´î<Ùbð"†�±ë®¬ jÚ v&†½sƒ žÝʽûrÕŸ¥␍|ì«w$λ�‡AÎðj@;„|–�Ô•␍x³': s¶�àã8UÑ9í@Úî¤4ða¯ Ú†‹ º5èêUEZX>?�C
4š‰6ž³ ›óº]ZéH <#ç␍Źæm␍¨Ê­Þ†4œ)Œcë¼=r¢o4šàùOÉdíz•­s9æ� /9W´ +þ¡g4@ïŸ<4mH{xÖ)èÁÔ_ºö²o9÷¡€Jîm”f�j|Í&€$;•””ZÚþT2Ñ ;Ò> %Ä@úc'lbJ <eZdPÚÃxa6Þ\\ °H³Ãg£�ØêmûÊ“ؘIáEº!}ù!çm¤uB]o¼�ÑøÎF�þÈX¤§b�¯ Èy‘¨V+Rß‹ñ‚ÉsZãQ:ö=²©�q2ƒ²½oì¨Ý##/ç”ë⥜�‹ƒñòRÎÇE‰çÆËK9%ã奜�‹’lvxx)ç㢌hǨºy)çã¢Ôü®^Êù¸(Œ·—r>.ÊN_÷ðRÎÇE‰Ã½¼”óqQjRÀÕK9%vtyy)º(KƱÒjD‘‡=ýR?�£ rº­¸pˆg)©•ºýB›º’Zq“ÔÒåŒnœeâøÆDøØ„å/›_#Áâ¯mG#ü¥ý½“Æiè`ðÇäVêVÑŽ©ÍooêûMñÉñÊ•÷×�gÓ¾¶‘_fR«mø�=J˜Ã.
#et”Ô;�bçøÄpì6DlÿIœ€©×¼d
Ðлµí¸¨[Ä È6;³wôÃnÕ£s÷>x´_J©žÀ¥Í ’ Eó™äÆŽË[²¯»»e´Ï‰rG»™õj¿eÞÉ„ÇËðèJ�¸H¶^’>:ýcñ�¤Dþa¢ä/␍Ñg¾eX!Êf³ð#‹ž7"ÿć??ØDôÁ¬gv•Q¥Óu侨ü‰ñ³û“ãS´MJ~…|½�ÿîuûP -ŽFJ§1IÃÞrEÐq²\³Ýé¶©¯–b£™ƒþÈx�>F’ú:Þ�ÅLf0Vº”¬|dZ͌ԕ~††b2‰hæ
÷?¬Mü»c½␍ôbXl5]ÊöÅžVTí')œúNh*’8êü”šr¯'÷‡ýábðá7à ¿ù݆ÿë×/ê‡GÍ
… ÍfX6­´ÞÓÃ?ý‘ø;
P/2péïŠ␍–‰L|ðî…��K«ÁåVgÿSCy¬4¥wÀ‚Dõ¥Q¦r]Ñ_¦iª5j…@ŠZ/ fô*ß
=ˆ6:ýÏaSHDJ@߇±)␍3Úóàxñ©á„£Ê÷ÀK¹øü¬­©Ã¨ØoEaIÁP†ÏÏeqïùùäOT/��w¸ns4V$x„¢Œºb¿)Á[¹ÿ!ËCý[”‹{²<jG? P?šãIÕß9žôñ¥†±¢ô{ +£ô{§«b6ÒÝ+ôèiPð§5Æ‹Îÿ›‡þ{Ú¡ÿþFC·ñp…Òdj±%7sÀd¥ï�šâŠ�*�)„"„Ÿ’2„®†#½Rj>£c¼G`<W·{õëvgX%úz áLÔѧòæ -FU{J‚ÉD×Á �çZuôù‡Žî¢�û_‘Æ‘n¦4|‚"ð»ÛO½­Ÿéø¿éwPH¬?%¶¼ ÛH°õm8.Äß;£tOTÀ Nw¥÷Q˜OTý¯ýHL9x\ó{Œ�c©\–fi. •k¢³ù'¹›«}�Ñó Eç Y¾0ÕèO7úßßeôLÂÿw ¶Ü•¤Î‡¹½æãà•Nkº±[+~“¡3# /LCõÿ‘åÞTtO*~ „™|¹ñCjަšþ‰ªßdø!Fß�•–¤È±Ù…÷¶Šßcäïbwè3ƒV»ª-ÿB<fàF�ï1æÅþzΛrWVÂϸZ훌ýÿ 1ö�ø!…¹©Ò÷w×%ô¯N¿%ÿ%õw§×ù�Ζqoä{`dJ%¿!ƒøµà9Tþ¯Æ€ÒùhOkå©u¿Çø‰d
=¬�Qº‹ö�§Sù­-|t¤C96lì=�ágTþ@ÁtÖŸQù{  �›Ê
P‡Ñ–Â
·¾6V#%íƒùÆ^{l¨␍|dL%,‘&4l‹0˜©ð`®þ=°0= aLa29×OÍg ³ïKèûEºo<Äàì£øïØ5©ÿæÊuc+~Vë.»(0‚’,wI£eu$µJzh‹Q_õÕ­–B4žˆÞßá�&ZAÛ.gðAåò‡FñŒ�ËçáKŽå…< _XF(Ð9øÂ±Y¾€Š°\–E_¸Ÿ‡7÷"jE´Añèýôë¾ý€g¿¢ =‰>½ÐÑV^^Fþa�bóL6ÊXŠçø\´‡æ¨<␍ß¹Oñy6e–b³O8ª�ã…èO(–ÏSͲø!ŸÍ1Q6W ¦ D9!Oq‚¡ �ÍASù,Eçi.ZFíó[à
Q.ÇRy€Í
T^(0Pˆ¥„‚ÀG"ÿpt�Êf6—‡Ö9š iŠaóЉ<OqLŽ�ÞB[úÊ1SÈsQ4¤<ô=Èá¾ T–Á␍Aï
lw¡ÀPÙ\�ƒž2€oÀ +(&‹ë(^ÈACP†§s¨¢@ñ|Žô½�….ó¨9Jàyh¿P XŽ#Oò,+␍�s9?É29 ‘£9J„â‡�‹.yð‡És6Àbhò�åáË1<d€„B?¤ó9xË0” à¾åaØÐ7Ž�Ö²y£±2Á!/h”Ų4OØ<‹G™ãsY\�a8T0 ÈÆ„a˜„ÐJzÁQ4OËÒ9W¥óƒŸ09¾0h6h¦·Šc(.Ï0ø!ôFÀ½/ð j>-ä4“òè<& $Ô5–bxÜ‹<U@tø@ºV€.ÁCANCTÉbÂã©|!žˆF8 ݼ �´žÐ@º‚ZL  |DQ™,‡‰€æ€Jñ€8
xª`FˆeTªbX@êËR4À |�ô�E† +‡(Œ#�ÐX�H1•«Ïh![ÀY 2í!‡šÇdS€ ;&p8Ä':eª%aHÇùÌ~ís!'^`xíaN@s�ª³h&á Ï`.»À¸·¤¨'Áp,Ð0�ˆ ðÇp<¡Xx›%sNg³¸M«b8ˆÃOX‹
 ¾@8Úç€W°˜aÙlŽÑQA‚**8qÀ½QžVñ�*r@ü9˜"¨™É":‚'<"
žÎŽƒ1S,šv1¢\ÞƒAó€*„ .‡Å�8Š/Øž�<Rq�`�<<ƒY"«·LÉñd9Ä@4<PLŽæ³ÚCŒ¦ˆá jƒHÚ ß„ïðÌ „Ñ<~X`°l¢á€ÑyD[èßO2ÕÔ@Ï@WEóÇSYÄýèIŽCüÍ"A�𓬾L¦
z] YDjhb�Ì"# W°î�.ä…l´IhX€¹Å¡Kˆ€ƒrY”åÆá f␍XµˆäÂiµc ¢N4£˜UŒ[ v˜;x“Í¡¶a`ìMråó�èˆL `µ$ˆÊy<¡Ù<Ï‚0F Að´cA€6–V@ˆP–QÅ? 2Ï¢‡0_…ª„V@B§ ;Zø<š‚ð<šß2Y/ù,"UXórˆ9&WPà‰wU!››È«
Ò®Ú ä]ÿ ê÷-tàþ¹ß—š#YI7ÇÊOE†‹Èqlà{XÍÿü§ùŸ&úýAßÔ¯Mý¡úã?ÿ!¡¢·4pÃpñ[¦j߯Xø+êø@µaáÌú2Ñjvú‹ôb$K‘Y*6Òtñ’‹´R,„A]3AJòX˜2 p²Œö�Ö;“M[]Ú³YÉŸRÍmqÎå8?Ì©+ÔÎ Ù,Y+X“çüÔ¢‚¶Š3Ù,‡¥h�æõ’°ÜódUa ºf€5E4 ,íA˜rÚC˸�ÿ•OW>ý¯3^Þ�ñ*D“á
˜âAÙÌÃ=,`␍!G–k¤ðå €íÄÁêŽõNPÅA‰Ã‰‘Ã!ÒÍñ¤"ÒAyb�v…€™!`%æ@�Å aí'Å
Ï`íÔwbX¢Æ²X%ÁöÒe
ЭCž€ºBt,Xþ¹\–<ÌaíW Vj␍t–h¿‚¦½ðH‚p¸[ 0¨ö“µ– ƒØoèùWkøÿ‡Öð¯.ð7DRÁG$�IS`±Ã,—í¹Ò
`˜‚}O@·/ /,
�@î6&O¼kDkyÁ"‹‚A¦tŽ2Ó3:‡í(d¯8bç rÐ6kün1�GV¿©�&+ôvŒ˜Z�<”Î QS;9
ôÖ¦þnù¥öH+¤wZkÇ>²æ¿2è_Í`6Ì1Þl¨:¹'ôrä[ÉÒ^jsŒÀƒ%›S™…¦ÑÂ
O²L6‡‹ C–ixHÃâMêbÿ-Ç/#zªOžpqç8ÂTð,/°,~Èc/,‡4oš¸òÄŒð»Ðìn€yÌ4 ‚äó¤^!'ÄÁaßS–bŽ%O˜|N÷=òÄW�” 4jìCC¥¸¬êõæ�Ä’NyZwG©YäMau‡”iÿêõÿ?Ð ˆ§á_bþ²‹÷³j.'dÊ”Bæ<ÇpÑ_Q>zÁ¦Dÿ4Ø Lžˆ2|–ø�ADW/ÇB�|?¤ób©ƒ,á�ŃKNó3 y¡àÿðê_öÿwñžšrÞ €(ŽÑö;²@Äê"ÍÇس4MižÉ9*‡¶…nÕb9UÓÄN-¼z�­îB/~ÿ’ïÿøêõïºõØVðf[÷ ^ßñž½üýç)–A¹B)þê?Ò,²Y9à^ø
|�Â’Óž¦!ޱ?|—•žul»úd ¸Öw¦'¦°…‚›¡¯÷Ìwÿ1¾è¯´¢¨Ã¤«¸ÛŒ©»»-¹!�á”�<~»À¨J
®Ñ‚j"øA+òON‹é9.EÈ©SÕ~ Ÿ9•F'±-Ÿ‹Òµ"vºèª�¡øSŠŠý¾<G
÷B§` �{¥(ÊAOP%½Âòrõ¬ùçÿÚ¶xÐ
endstream␍endobj␍6 0 obj␍[5 0 R]␍endobj␍20 0 obj␍<</CreationDate(D:20130102172747+01'00')/Creator(Adobe Illustrator CS6 \(Windows\))/ModDate(D:20130102172747Z)/Producer(Adobe PDF library 10.01)/Title(Mongoo 3 smooth green)>>␍endobj␍xref
0 21
0000000000 65535 f
0000000016 00000 n
0000000144 00000 n
0000016417 00000 n
0000000000 00000 f
0000018879 00000 n
0000062760 00000 n
0000016468 00000 n
0000016797 00000 n
0000019175 00000 n
0000019062 00000 n
0000018118 00000 n
0000018317 00000 n
0000018365 00000 n
0000018946 00000 n
0000018977 00000 n
0000019248 00000 n
0000019422 00000 n
0000020477 00000 n
0000039795 00000 n
0000062783 00000 n
trailer
<</Size 21/Root 1 0 R/Info 20 0 R/ID[<DAA7E1F6DAFF2748BD66B503D3959824><B0ED829296E5A049A6E2795E820EF1BF>]>>
startxref
62975
%%EOF
Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

-1
View File
@@ -1 +0,0 @@
100 ICON DISCARDABLE "systray.ico"
-140456
View File
File diff suppressed because it is too large. Load diff
-7245
View File
File diff suppressed because it is too large. Load diff
-50
View File
@@ -1,50 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAwONaLOP7EdegqjRuQKSDXzvHmFMZfBufjhELhNjo5KsL4ieH
hMSGCcSV6y32hzhqR5lvTViaQez+xhc58NZRu+OUgEhodRBW/vAOjpz/xdMz5HaC
EhP3E9W1pkitVseS8B5rrgJo1BfCGai1fPav1nutPq2Kj7vMy24+g460Lonf6ln1
di4aTIRtAqXtUU6RFpPJP35PkCXbTK65O8HJSxxt/XtfoezHCU5+UIwmZGYx46UB
Wzg3IfK6bGPSiHU3pdiTol0uMPt/GUK+x4NyZJ4/ImsNAicRwMBdja4ywHKXJehH
gXBthsVIHbL21x+4ibsg9eVM/XioTV6tW3IrdwIDAQABAoIBACFfdLutmkQFBcRN
HAJNNHmmsyr0vcUOVnXTFyYeDXV67qxrYHQlOHe6LqIpKq1Mon7O2kYMnWvooFAP
trOnsS6L+qaTYJdYg2TKjgo4ubw1hZXytyB/mdExuaMSkgMgtpia+tB5lD+V+LxN
x1DesZ+veFMO3Zluyckswt4qM5yVa04YFrt31H0E1rJfIen61lidXIKYmHHWuRxK
SadjFfbcqJ6P9ZF22BOkleg5Fm5NaxJmyQynOWaAkSZa5w1XySFfRjRfsbDr64G6
+LSG8YtRuvfxnvUNhynVPHcpE40eiPo6v8Ho6yZKXpV5klCKciodXAORsswSoGJa
N3nnu/ECgYEA6Yb2rM3QUEPIALdL8f/OzZ1GBSdiQB2WSAxzl9pR/dLF2H+0pitS
to0830mk92ppVmRVD3JGxYDRZQ56tlFXyGaCzJBMRIcsotAhBoNbjV0i9n5bLJYf
BmjU9yvWcgsTt0tr3B0FrtYyp2tCvwHqlxvFpFdUCj2oRw2uGpkhmNkCgYEA03M6
WxFhsix3y6eVCVvShfbLBSOqp8l0qiTEty+dgVQcWN4CO/5eyaZXKxlCG9KMmKxy
Yx+YgxZrDhfaZ0cxhHGPRKEAxM3IKwT2C8/wCaSiLWXZZpTifnSD99vtOt4wEfrG
+AghNd5kamFiM9tU0AyvhJc2vdJFuXrfeC7ntM8CgYBGDA+t4cZcbRhu7ow/OKYF
kulP3nJgHP/Y+LMrl3cEldZ2jEfZmCElVNQvfd2XwTl7injhOzvzPiKRF3jDez7D
g8w0JAxceddvttJRK9GoY4l7OoeKpjUELSnEQkf+yUfOsTbXPXVY7jMfeNL6jE6b
qN7t3qv8rmXtejMBE3G6cQKBgGR5W2BMiRSlxqKx1cKlrApV87BUe1HRCyuR3xuA
d6Item7Lx1oEi7vb242yKdSYnpApWQ06xTh83Y/Ly87JaIEbiM0+h+P8OEIg0F1a
iB+86AcUX1I8KseVy+Np0HbpfwP8GrFfA5DaRPK7pXMopEtby8cAJ1XZZaI1/ZvZ
BebHAoGAcQU9WvCkT+nIp9FpXfBybYUsvgkaizMIqp66/l3GYgYAq8p1VLGvN4v5
ec0dW58SJrCpqsM3NP78DtEzQf9OOsk+FsjBFzDU2RkeUreyt2/nQBj/2mN/+hEy
hYN0Zii2yTb63jGxKY6gH1R/r9dL8kXaJmcZrfSa3AgywnteJWg=
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDBjCCAe4CCQCX05m0b053QzANBgkqhkiG9w0BAQQFADBFMQswCQYDVQQGEwJB
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
cyBQdHkgTHRkMB4XDTA4MTIwNzEwMjUyMloXDTE4MTIwNTEwMjUyMlowRTELMAkG
A1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0
IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMDjWizj+xHXoKo0bkCkg187x5hTGXwbn44RC4TY6OSrC+Inh4TEhgnElest9oc4
akeZb01YmkHs/sYXOfDWUbvjlIBIaHUQVv7wDo6c/8XTM+R2ghIT9xPVtaZIrVbH
kvAea64CaNQXwhmotXz2r9Z7rT6tio+7zMtuPoOOtC6J3+pZ9XYuGkyEbQKl7VFO
kRaTyT9+T5Al20yuuTvByUscbf17X6HsxwlOflCMJmRmMeOlAVs4NyHyumxj0oh1
N6XYk6JdLjD7fxlCvseDcmSePyJrDQInEcDAXY2uMsBylyXoR4FwbYbFSB2y9tcf
uIm7IPXlTP14qE1erVtyK3cCAwEAATANBgkqhkiG9w0BAQQFAAOCAQEAW4yZdqpB
oIdiuXRosr86Sg9FiMg/cn+2OwQ0QIaA8ZBwKsc+wIIHEgXCS8J6316BGQeUvMD+
plNe0r4GWzzmlDMdobeQ5arPRB89qd9skE6pAMdLg3FyyfEjz3A0VpskolW5VBMr
P5R7uJ1FLgH12RyAjZCWYcCRqEMOffqvyMCH6oAjyDmQOA5IssRKX/HsHntSH/HW
W7slTcP45ty1b44Nq22/ubYk0CJRQgqKOIQ3cLgPomN1jNFQbAbfVTaK1DpEysrQ
5V8a8gNW+3sVZmV6d1Mj3pN2Le62wUKuV2g6BNU7iiwcoY8HI68aRxz2hVMS+t5f
SEGI4JSxV56lYg==
-----END CERTIFICATE-----
-----BEGIN DH PARAMETERS-----
MEYCQQD+ef8hZ4XbdoyIpJyCTF2UrUEfX6mYDvxuS5O1UNYcslUqlj6JkA11e/yS
6DK8Z86W6mSj5CEk4IjbyEOECXH7AgEC
-----END DH PARAMETERS-----
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

-56
View File
@@ -1,56 +0,0 @@
CFLAGS = -W -Wall -I.. -pthread -g -pipe $(COPT)
DLL_FLAGS = -DLUA_COMPAT_ALL -I../build
ifeq ($(OS),Windows_NT)
else
UNAME_S := $(shell uname -s)
DLL_FLAGS += -shared
ifeq ($(UNAME_S),Linux)
CFLAGS += -ldl
endif
ifeq ($(UNAME_S),Darwin)
# DLL_FLAGS += -bundle -undefined dynamic_lookup -dynamiclib
DLL_FLAGS += -flat_namespace -undefined suppress -dynamiclib
endif
endif
all: hello upload post websocket chat
hello:
$(CC) hello.c ../mongoose.c -o $@ $(CFLAGS)
upload:
$(CC) upload.c ../mongoose.c -o $@ $(CFLAGS)
post:
$(CC) post.c ../mongoose.c -o $@ $(CFLAGS)
websocket:
$(CC) -DUSE_WEBSOCKET websocket.c ../mongoose.c -o $@ $(CFLAGS)
chat:
$(CC) chat.c ../mongoose.c -o $@ $(CFLAGS)
lua_dll:
$(CC) lua_dll.c ../build/lua_5.2.1.c -o $@.so $(CFLAGS) $(DLL_FLAGS)
MSVC = ../../vc6
CL = $(MSVC)/bin/cl
CLFLAGS = /MD /TC /nologo $(DBG) /W3 /DNO_SSL \
/I$(MSVC)/include /I.. /Dsnprintf=_snprintf
LFLAGS = /link /incremental:no /libpath:$(MSVC)/lib /machine:IX86
windows:
$(CL) upload.c ../mongoose.c $(CLFLAGS) $(LFLAGS)
$(CL) hello.c ../mongoose.c $(CLFLAGS) $(LFLAGS)
$(CL) upload.c ../mongoose.c $(CLFLAGS) $(LFLAGS)
$(CL) post.c ../mongoose.c $(CLFLAGS) $(LFLAGS)
$(CL) post.c ../mongoose.c $(CLFLAGS) $(LFLAGS)
$(CL) /DUSE_WEBSOCKET websocket.c ../mongoose.c $(CLFLAGS) $(LFLAGS)
#$(CL) lua_dll.c $(CLFLAGS) $(DLL_FLAGS) /DLL $(LFLAGS) /SUBSYSTEM:WINDOWS /ENTRY:luaopen_lua_dll /EXPORT:luaopen_lua_dll /out:lua_dll.dll
clean:
rm -rf hello upload post websocket chat *.exe *.dSYM *.obj .*o
+24
View File
@@ -0,0 +1,24 @@
# Mongoose Network Library Examples
In order to build and run any of the existing examples, please follow:
https://mongoose.ws/documentation/#how-to-build-and-run-examples
## Contributing
Rules for creating a new example:
- Makefile golden reference for desktop/server example: [http-server](http-server)
- Makefile golden reference for the embedded example:
[stm32/nucleo-f746zg-baremetal](stm32/nucleo-f746zg-baremetal)
- An example must build on Windows, Mac and Ubuntu Linux systems
- Assume that user installed tools according to https://mongoose.ws/tutorials/tools/
- Makefile must not include any other make files
- Use `CFLAGS` for system-specific compilation options
- Use `CFLAGS_MONGOOSE` for mongoose-specific compilation options
- Use `$(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA)` to compile
- If external repository is required, download it on demand using git
shallow clone. See embedded example golden reference
- Keep Makefile as short as possible, but verbose to understand it easily
- Symlink files when required, like `mongoose.c`, `ca.pem`, etc. Make no copies
- Example's README.md should contain only the title and the link to mongoose.ws
tutorial page
+1
View File
@@ -0,0 +1 @@
../../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../../mongoose.h
+14
View File
@@ -0,0 +1,14 @@
#pragma once
#include "Arduino.h"
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#define MG_ARCH MG_ARCH_CUSTOM
#define MG_ENABLE_SOCKET 0
#define MG_ENABLE_TCPIP 1
#define mkdir(a, b) (-1)
//#define MG_ENABLE_LOG 0
+49
View File
@@ -0,0 +1,49 @@
#include <SPI.h>
#include "mongoose.h"
#define SS_PIN 3 // Slave select pin
struct mg_mgr mgr; // Mongoose event manager
struct mg_tcpip_spi spi = {
NULL, // SPI data
[](void *) { digitalWrite(SS_PIN, LOW); }, // begin transation
[](void *) { digitalWrite(SS_PIN, HIGH); }, // end transaction
[](void *, uint8_t c) { return SPI.transfer(c); }, // execute transaction
};
struct mg_tcpip_if mif = {.mac = {2, 0, 1, 2, 3, 5}}; // network interface
void setup() {
Serial.begin(115200);
pinMode(SS_PIN, OUTPUT);
SPI.begin();
// Set logging function to a serial print
mg_log_set_fn([](char ch, void *) { Serial.print(ch); }, NULL);
mg_mgr_init(&mgr);
delay(3000);
MG_INFO(("Starting TCP/IP stack..."));
mif.driver = &mg_tcpip_driver_w5500;
mif.driver_data = &spi;
mg_tcpip_init(&mgr, &mif);
// Start a 5 sec timer, print status message periodically
mg_timer_add(
&mgr, 5000, MG_TIMER_REPEAT,
[](void *) {
MG_INFO(("ethernet: %s", mg_tcpip_driver_w5500.up(&mif) ? "up" : "down"));
},
NULL);
// Setup HTTP listener. Respond "ok" on any HTTP request
mg_http_listen(
&mgr, "http://0.0.0.0",
[](struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_HTTP_MSG) mg_http_reply(c, 200, "", "ok\n");
},
&mgr);
}
void loop() {
mg_mgr_poll(&mgr, 1);
}
+25
View File
@@ -0,0 +1,25 @@
PROG ?= example # Program we are building
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_IO_SIZE=8192 -DMG_ENABLE_LINES
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
all: $(PROG) # Default target. Build and run program
$(RUN) ./$(PROG) $(ARGS)
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/captive-dns-server/
+58
View File
@@ -0,0 +1,58 @@
// Copyright (c) 2020 Cesanta Software Limited
// All rights reserved
//
// Example captive DNS server (captive portal).
// 1. Run `make`. This builds and starts a server on port 5533
// 2. Run `dig -t A www.google.com -4 @localhost -p 5533`
#include "mongoose.h"
static const char *s_listen_url = "udp://0.0.0.0:5533";
// DNS answer section. We response with IP 1.2.3.4 - you can change it
// in the last 4 bytes of this array
uint8_t answer[] = {
0xc0, 0x0c, // Point to the name in the DNS question
0, 1, // 2 bytes - record type, A
0, 1, // 2 bytes - address class, INET
0, 0, 0, 120, // 4 bytes - TTL
0, 4, // 2 bytes - address length
1, 2, 3, 4 // 4 bytes - IP address
};
static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_OPEN) {
c->is_hexdumping = 1;
} else if (ev == MG_EV_READ) {
struct mg_dns_rr rr; // Parse first question, offset 12 is header size
size_t n = mg_dns_parse_rr(c->recv.buf, c->recv.len, 12, true, &rr);
MG_INFO(("DNS request parsed, result=%d", (int) n));
if (n > 0) {
char buf[512];
struct mg_dns_header *h = (struct mg_dns_header *) buf;
memset(buf, 0, sizeof(buf)); // Clear the whole datagram
h->txnid = ((struct mg_dns_header *) c->recv.buf)->txnid; // Copy tnxid
h->num_questions = mg_htons(1); // We use only the 1st question
h->num_answers = mg_htons(1); // And only one answer
h->flags = mg_htons(0x8400); // Authoritative response
memcpy(buf + sizeof(*h), c->recv.buf + sizeof(*h), n); // Copy question
memcpy(buf + sizeof(*h) + n, answer, sizeof(answer)); // And answer
mg_send(c, buf, 12 + n + sizeof(answer)); // And send it!
}
mg_iobuf_del(&c->recv, 0, c->recv.len);
}
(void) fn_data;
(void) ev_data;
}
int main(void) {
struct mg_mgr mgr;
mg_log_set(MG_LL_DEBUG); // Set log level
mg_mgr_init(&mgr); // Initialise event manager
mg_listen(&mgr, s_listen_url, fn, NULL); // Start DNS server
for (;;) mg_mgr_poll(&mgr, 1000); // Event loop
mg_mgr_free(&mgr);
return 0;
}
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
-385
View File
@@ -1,385 +0,0 @@
// This file is part of the Mongoose project, http://code.google.com/p/mongoose
// It implements an online chat server. For more details,
// see the documentation on the project web site.
// To test the application,
// 1. type "make" in the directory where this file lives
// 2. point your browser to http://127.0.0.1:8081
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <time.h>
#include <stdarg.h>
#include <pthread.h>
#include "mongoose.h"
#define MAX_USER_LEN 20
#define MAX_MESSAGE_LEN 100
#define MAX_MESSAGES 5
#define MAX_SESSIONS 2
#define SESSION_TTL 120
static const char *authorize_url = "/authorize";
static const char *login_url = "/login.html";
static const char *ajax_reply_start =
"HTTP/1.1 200 OK\r\n"
"Cache: no-cache\r\n"
"Content-Type: application/x-javascript\r\n"
"\r\n";
// Describes single message sent to a chat. If user is empty (0 length),
// the message is then originated from the server itself.
struct message {
long id; // Message ID
char user[MAX_USER_LEN]; // User that have sent the message
char text[MAX_MESSAGE_LEN]; // Message text
time_t timestamp; // Message timestamp, UTC
};
// Describes web session.
struct session {
char session_id[33]; // Session ID, must be unique
char random[20]; // Random data used for extra user validation
char user[MAX_USER_LEN]; // Authenticated user
time_t expire; // Expiration timestamp, UTC
};
static struct message messages[MAX_MESSAGES]; // Ringbuffer for messages
static struct session sessions[MAX_SESSIONS]; // Current sessions
static long last_message_id;
// Protects messages, sessions, last_message_id
static pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;
// Get session object for the connection. Caller must hold the lock.
static struct session *get_session(const struct mg_connection *conn) {
int i;
const char *cookie = mg_get_header(conn, "Cookie");
char session_id[33];
time_t now = time(NULL);
mg_get_cookie(cookie, "session", session_id, sizeof(session_id));
for (i = 0; i < MAX_SESSIONS; i++) {
if (sessions[i].expire != 0 &&
sessions[i].expire > now &&
strcmp(sessions[i].session_id, session_id) == 0) {
break;
}
}
return i == MAX_SESSIONS ? NULL : &sessions[i];
}
static void get_qsvar(const struct mg_request_info *request_info,
const char *name, char *dst, size_t dst_len) {
const char *qs = request_info->query_string;
mg_get_var(qs, strlen(qs == NULL ? "" : qs), name, dst, dst_len);
}
// Get a get of messages with IDs greater than last_id and transform them
// into a JSON string. Return that string to the caller. The string is
// dynamically allocated, caller must free it. If there are no messages,
// NULL is returned.
static char *messages_to_json(long last_id) {
const struct message *message;
int max_msgs, len;
char buf[sizeof(messages)]; // Large enough to hold all messages
// Read-lock the ringbuffer. Loop over all messages, making a JSON string.
pthread_rwlock_rdlock(&rwlock);
len = 0;
max_msgs = sizeof(messages) / sizeof(messages[0]);
// If client is too far behind, return all messages.
if (last_message_id - last_id > max_msgs) {
last_id = last_message_id - max_msgs;
}
for (; last_id < last_message_id; last_id++) {
message = &messages[last_id % max_msgs];
if (message->timestamp == 0) {
break;
}
// buf is allocated on stack and hopefully is large enough to hold all
// messages (it may be too small if the ringbuffer is full and all
// messages are large. in this case asserts will trigger).
len += snprintf(buf + len, sizeof(buf) - len,
"{user: '%s', text: '%s', timestamp: %lu, id: %lu},",
message->user, message->text, message->timestamp, message->id);
assert(len > 0);
assert((size_t) len < sizeof(buf));
}
pthread_rwlock_unlock(&rwlock);
return len == 0 ? NULL : strdup(buf);
}
// If "callback" param is present in query string, this is JSONP call.
// Return 1 in this case, or 0 if "callback" is not specified.
// Wrap an output in Javascript function call.
static int handle_jsonp(struct mg_connection *conn,
const struct mg_request_info *request_info) {
char cb[64];
get_qsvar(request_info, "callback", cb, sizeof(cb));
if (cb[0] != '\0') {
mg_printf(conn, "%s(", cb);
}
return cb[0] == '\0' ? 0 : 1;
}
// A handler for the /ajax/get_messages endpoint.
// Return a list of messages with ID greater than requested.
static void ajax_get_messages(struct mg_connection *conn,
const struct mg_request_info *request_info) {
char last_id[32], *json;
int is_jsonp;
mg_printf(conn, "%s", ajax_reply_start);
is_jsonp = handle_jsonp(conn, request_info);
get_qsvar(request_info, "last_id", last_id, sizeof(last_id));
if ((json = messages_to_json(strtoul(last_id, NULL, 10))) != NULL) {
mg_printf(conn, "[%s]", json);
free(json);
}
if (is_jsonp) {
mg_printf(conn, "%s", ")");
}
}
// Allocate new message. Caller must hold the lock.
static struct message *new_message(void) {
static int size = sizeof(messages) / sizeof(messages[0]);
struct message *message = &messages[last_message_id % size];
message->id = last_message_id++;
message->timestamp = time(0);
return message;
}
static void my_strlcpy(char *dst, const char *src, size_t len) {
strncpy(dst, src, len);
dst[len - 1] = '\0';
}
// A handler for the /ajax/send_message endpoint.
static void ajax_send_message(struct mg_connection *conn,
const struct mg_request_info *request_info) {
struct message *message;
struct session *session;
char text[sizeof(message->text) - 1];
int is_jsonp;
mg_printf(conn, "%s", ajax_reply_start);
is_jsonp = handle_jsonp(conn, request_info);
get_qsvar(request_info, "text", text, sizeof(text));
if (text[0] != '\0') {
// We have a message to store. Write-lock the ringbuffer,
// grab the next message and copy data into it.
pthread_rwlock_wrlock(&rwlock);
message = new_message();
// TODO(lsm): JSON-encode all text strings
session = get_session(conn);
assert(session != NULL);
my_strlcpy(message->text, text, sizeof(text));
my_strlcpy(message->user, session->user, sizeof(message->user));
pthread_rwlock_unlock(&rwlock);
}
mg_printf(conn, "%s", text[0] == '\0' ? "false" : "true");
if (is_jsonp) {
mg_printf(conn, "%s", ")");
}
}
// Redirect user to the login form. In the cookie, store the original URL
// we came from, so that after the authorization we could redirect back.
static void redirect_to_login(struct mg_connection *conn,
const struct mg_request_info *request_info) {
mg_printf(conn, "HTTP/1.1 302 Found\r\n"
"Set-Cookie: original_url=%s\r\n"
"Location: %s\r\n\r\n",
request_info->uri, login_url);
}
// Return 1 if username/password is allowed, 0 otherwise.
static int check_password(const char *user, const char *password) {
// In production environment we should ask an authentication system
// to authenticate the user.
// Here however we do trivial check that user and password are not empty
return (user[0] && password[0]);
}
// Allocate new session object
static struct session *new_session(void) {
int i;
time_t now = time(NULL);
pthread_rwlock_wrlock(&rwlock);
for (i = 0; i < MAX_SESSIONS; i++) {
if (sessions[i].expire == 0 || sessions[i].expire < now) {
sessions[i].expire = time(0) + SESSION_TTL;
break;
}
}
pthread_rwlock_unlock(&rwlock);
return i == MAX_SESSIONS ? NULL : &sessions[i];
}
// Generate session ID. buf must be 33 bytes in size.
// Note that it is easy to steal session cookies by sniffing traffic.
// This is why all communication must be SSL-ed.
static void generate_session_id(char *buf, const char *random,
const char *user) {
mg_md5(buf, random, user, NULL);
}
static void send_server_message(const char *fmt, ...) {
va_list ap;
struct message *message;
pthread_rwlock_wrlock(&rwlock);
message = new_message();
message->user[0] = '\0'; // Empty user indicates server message
va_start(ap, fmt);
vsnprintf(message->text, sizeof(message->text), fmt, ap);
va_end(ap);
pthread_rwlock_unlock(&rwlock);
}
// A handler for the /authorize endpoint.
// Login page form sends user name and password to this endpoint.
static void authorize(struct mg_connection *conn,
const struct mg_request_info *request_info) {
char user[MAX_USER_LEN], password[MAX_USER_LEN];
struct session *session;
// Fetch user name and password.
get_qsvar(request_info, "user", user, sizeof(user));
get_qsvar(request_info, "password", password, sizeof(password));
if (check_password(user, password) && (session = new_session()) != NULL) {
// Authentication success:
// 1. create new session
// 2. set session ID token in the cookie
// 3. remove original_url from the cookie - not needed anymore
// 4. redirect client back to the original URL
//
// The most secure way is to stay HTTPS all the time. However, just to
// show the technique, we redirect to HTTP after the successful
// authentication. The danger of doing this is that session cookie can
// be stolen and an attacker may impersonate the user.
// Secure application must use HTTPS all the time.
my_strlcpy(session->user, user, sizeof(session->user));
snprintf(session->random, sizeof(session->random), "%d", rand());
generate_session_id(session->session_id, session->random, session->user);
send_server_message("<%s> joined", session->user);
mg_printf(conn, "HTTP/1.1 302 Found\r\n"
"Set-Cookie: session=%s; max-age=3600; http-only\r\n" // Session ID
"Set-Cookie: user=%s\r\n" // Set user, needed by Javascript code
"Set-Cookie: original_url=/; max-age=0\r\n" // Delete original_url
"Location: /\r\n\r\n",
session->session_id, session->user);
} else {
// Authentication failure, redirect to login.
redirect_to_login(conn, request_info);
}
}
// Return 1 if request is authorized, 0 otherwise.
static int is_authorized(const struct mg_connection *conn,
const struct mg_request_info *request_info) {
struct session *session;
char valid_id[33];
int authorized = 0;
// Always authorize accesses to login page and to authorize URI
if (!strcmp(request_info->uri, login_url) ||
!strcmp(request_info->uri, authorize_url)) {
return 1;
}
pthread_rwlock_rdlock(&rwlock);
if ((session = get_session(conn)) != NULL) {
generate_session_id(valid_id, session->random, session->user);
if (strcmp(valid_id, session->session_id) == 0) {
session->expire = time(0) + SESSION_TTL;
authorized = 1;
}
}
pthread_rwlock_unlock(&rwlock);
return authorized;
}
static void redirect_to_ssl(struct mg_connection *conn,
const struct mg_request_info *request_info) {
const char *p, *host = mg_get_header(conn, "Host");
if (host != NULL && (p = strchr(host, ':')) != NULL) {
mg_printf(conn, "HTTP/1.1 302 Found\r\n"
"Location: https://%.*s:8082/%s:8082\r\n\r\n",
(int) (p - host), host, request_info->uri);
} else {
mg_printf(conn, "%s", "HTTP/1.1 500 Error\r\n\r\nHost: header is not set");
}
}
static int begin_request_handler(struct mg_connection *conn) {
const struct mg_request_info *request_info = mg_get_request_info(conn);
int processed = 1;
if (!request_info->is_ssl) {
redirect_to_ssl(conn, request_info);
} else if (!is_authorized(conn, request_info)) {
redirect_to_login(conn, request_info);
} else if (strcmp(request_info->uri, authorize_url) == 0) {
authorize(conn, request_info);
} else if (strcmp(request_info->uri, "/ajax/get_messages") == 0) {
ajax_get_messages(conn, request_info);
} else if (strcmp(request_info->uri, "/ajax/send_message") == 0) {
ajax_send_message(conn, request_info);
} else {
// No suitable handler found, mark as not processed. Mongoose will
// try to serve the request.
processed = 0;
}
return processed;
}
static const char *options[] = {
"document_root", "html",
"listening_ports", "8081,8082s",
"ssl_certificate", "ssl_cert.pem",
"num_threads", "5",
NULL
};
int main(void) {
struct mg_callbacks callbacks;
struct mg_context *ctx;
// Initialize random number generator. It will be used later on for
// the session identifier creation.
srand((unsigned) time(0));
// Setup and start Mongoose
memset(&callbacks, 0, sizeof(callbacks));
callbacks.begin_request = begin_request_handler;
if ((ctx = mg_start(&callbacks, NULL, options)) == NULL) {
printf("%s\n", "Cannot start chat server, fatal exit");
exit(EXIT_FAILURE);
}
// Wait until enter is pressed, then exit
printf("Chat server started on ports %s, press enter to quit.\n",
mg_get_option(ctx, "listening_ports"));
getchar();
mg_stop(ctx);
printf("%s\n", "Chat server stopped.");
return EXIT_SUCCESS;
}
// vim:ts=2:sw=2:et
+47
View File
@@ -0,0 +1,47 @@
PROG ?= example # Program we are building
PACK ?= ./pack # Packing executable
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c net.c packed_fs.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
FILES_TO_EMBED ?= $(wildcard web_root/*)
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
PACK = pack.exe # Packing executable
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif
all: $(PROG) # Default target. Build and run program
$(RUN) ./$(PROG) $(ARGS)
# Before embedding files, gzip them to save space
packed_fs.c: $(FILES_TO_EMBED) Makefile
$(CC) ../../test/pack.c -o $(PACK)
ifeq ($(OS),Windows_NT)
$(PACK) $(FILES_TO_EMBED) > $@
else
rm -rf tmp/web_root && mkdir tmp && cp -r web_root tmp/
find tmp -type f | xargs -n1 gzip
cd tmp && ../pack `find web_root -type f` > ../$@
endif
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM pack tmp mbedtls
# see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
mbedtls: # Pull and build mbedTLS library
git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MAKE) -C mbedtls/library
+29
View File
@@ -0,0 +1,29 @@
# A complete device dashboard
This example is a demonstration of how Mongoose Library could be integrated
into an embedded device and provide a complete device dashboard with the
following features:
- Authentication: login-protected dashboard
- Multiple logins with different permissions (admin and user)
- Web UI is fully embedded into the server/firmware binary, and does not
need a filesystem to serve it. UI is resilient to FS problems
- Administrators can change server settings
- All changes are propagated to all connected clients
- The device is connected to the external MQTT server
- Logged in clients can send/receive messages via MQTT
## Screenshots
This is a login screen that prompts for user/password
![](screenshots/login.webp)
## Main dashboard
The main dashboard page shows the interactive MQTT console
![](screenshots/dashboard.webp)
See a detailed tutorial at https://mongoose.ws/tutorials/device-dashboard/
+1
View File
@@ -0,0 +1 @@
../../test/data/ca.pem
+24
View File
@@ -0,0 +1,24 @@
// Copyright (c) 2020-2022 Cesanta Software Limited
// All rights reserved
#include "mongoose.h"
const char *s_listening_url = "http://0.0.0.0:8000";
const char *s_listening_surl = "https://0.0.0.0:8443";
void device_dashboard_fn(struct mg_connection *, int, void *, void *);
int main(void) {
struct mg_mgr mgr;
mg_log_set(MG_LL_DEBUG); // Set debug log level
mg_mgr_init(&mgr);
mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, NULL);
MG_INFO(("Listening on %s", s_listening_url));
#if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
mg_http_listen(&mgr, s_listening_surl, device_dashboard_fn, "");
MG_INFO(("Listening on %s", s_listening_surl));
#endif
while (mgr.conns != NULL) mg_mgr_poll(&mgr, 500);
mg_mgr_free(&mgr);
return 0;
}
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+284
View File
@@ -0,0 +1,284 @@
// Copyright (c) 2020-2022 Cesanta Software Limited
// All rights reserved
#include "mongoose.h"
#if !defined(MQTT_SERVER)
#if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
#define MQTT_SERVER "mqtts://broker.hivemq.com:8883"
#else
#define MQTT_SERVER "mqtt://broker.hivemq.com:1883"
#endif
#endif
#define MQTT_PUBLISH_TOPIC "mg/my_device"
#define MQTT_SUBSCRIBE_TOPIC "mg/#"
// Certificate generation procedure:
// openssl ecparam -name prime256v1 -genkey -noout -out key.pem
// openssl req -new -key key.pem -x509 -nodes -days 3650 -out cert.pem
static const char *s_ssl_cert =
"-----BEGIN CERTIFICATE-----\n"
"MIIBCTCBsAIJAK9wbIDkHnAoMAoGCCqGSM49BAMCMA0xCzAJBgNVBAYTAklFMB4X\n"
"DTIzMDEyOTIxMjEzOFoXDTMzMDEyNjIxMjEzOFowDTELMAkGA1UEBhMCSUUwWTAT\n"
"BgcqhkjOPQIBBggqhkjOPQMBBwNCAARzSQS5OHd17lUeNI+6kp9WYu0cxuEIi/JT\n"
"jphbCmdJD1cUvhmzM9/phvJT9ka10Z9toZhgnBq0o0xfTQ4jC1vwMAoGCCqGSM49\n"
"BAMCA0gAMEUCIQCe0T2E0GOiVe9KwvIEPeX1J1J0T7TNacgR0Ya33HV9VgIgNvdn\n"
"aEWiBp1xshs4iz6WbpxrS1IHucrqkZuJLfNZGZI=\n"
"-----END CERTIFICATE-----\n";
static const char *s_ssl_key =
"-----BEGIN EC PRIVATE KEY-----\n"
"MHcCAQEEICBz3HOkQLPBDtdknqC7k1PNsWj6HfhyNB5MenfjmqiooAoGCCqGSM49\n"
"AwEHoUQDQgAEc0kEuTh3de5VHjSPupKfVmLtHMbhCIvyU46YWwpnSQ9XFL4ZszPf\n"
"6YbyU/ZGtdGfbaGYYJwatKNMX00OIwtb8A==\n"
"-----END EC PRIVATE KEY-----\n";
static time_t s_boot_timestamp = 0; // Updated by SNTP
#ifndef DISABLE_ROUTING
static struct mg_connection *s_sntp_conn = NULL; // SNTP connection
#endif
// Define a system time alternative
time_t ourtime(time_t *tp) {
time_t t = s_boot_timestamp + (time_t) (mg_millis() / 1000);
if (tp != NULL) *tp = t;
return t;
}
// Authenticated user.
// A user can be authenticated by:
// - a name:pass pair
// - a token
// When a user is shown a login screen, she enters a user:pass. If successful,
// a server returns user info which includes token. From that point on,
// client can use token for authentication. Tokens could be refreshed/changed
// on a server side, forcing clients to re-login.
struct user {
const char *name, *pass, *token;
};
// This is a configuration structure we're going to show on a dashboard
static struct config {
char *url, *pub, *sub; // MQTT settings
} s_config;
static struct mg_connection *s_mqtt = NULL; // MQTT connection
static bool s_connected = false; // MQTT connection established
// Try to update a single configuration value
static void update_config(struct mg_str *body, const char *name, char **value) {
char buf[256];
if (mg_http_get_var(body, name, buf, sizeof(buf)) > 0) {
free(*value);
*value = strdup(buf);
}
}
// Parse HTTP requests, return authenticated user or NULL
static struct user *getuser(struct mg_http_message *hm) {
// In production, make passwords strong and tokens randomly generated
// In this example, user list is kept in RAM. In production, it can
// be backed by file, database, or some other method.
static struct user users[] = {
{"admin", "pass0", "admin_token"},
{"user1", "pass1", "user1_token"},
{"user2", "pass2", "user2_token"},
{NULL, NULL, NULL},
};
char user[256], pass[256];
struct user *u;
mg_http_creds(hm, user, sizeof(user), pass, sizeof(pass));
if (user[0] != '\0' && pass[0] != '\0') {
// Both user and password is set, search by user/password
for (u = users; u->name != NULL; u++)
if (strcmp(user, u->name) == 0 && strcmp(pass, u->pass) == 0) return u;
} else if (user[0] == '\0') {
// Only password is set, search by token
for (u = users; u->name != NULL; u++)
if (strcmp(pass, u->token) == 0) return u;
}
return NULL;
}
// Notify all config watchers about the config change
static void send_notification(struct mg_mgr *mgr, const char *fmt, ...) {
struct mg_connection *c;
for (c = mgr->conns; c != NULL; c = c->next) {
if (c->data[0] == 'W') {
va_list ap;
va_start(ap, fmt);
mg_ws_vprintf(c, WEBSOCKET_OP_TEXT, fmt, &ap);
va_end(ap);
}
}
}
// Send simulated metrics data to the dashboard, for chart rendering
static void timer_metrics_fn(void *param) {
send_notification(param, "{%m:%m,%m:[%lu, %d]}", MG_ESC("name"),
MG_ESC("metrics"), MG_ESC("data"),
(unsigned long) ourtime(NULL),
10 + (int) ((double) rand() * 10 / RAND_MAX));
}
#ifndef DISABLE_ROUTING
// MQTT event handler function
static void mqtt_fn(struct mg_connection *c, int ev, void *ev_data, void *fnd) {
if (ev == MG_EV_CONNECT && mg_url_is_ssl(s_config.url)) {
struct mg_tls_opts opts = {.ca = "ca.pem",
.srvname = mg_url_host(s_config.url)};
mg_tls_init(c, &opts);
} else if (ev == MG_EV_MQTT_OPEN) {
s_connected = true;
c->is_hexdumping = 1;
struct mg_mqtt_opts sub_opts;
memset(&sub_opts, 0, sizeof(sub_opts));
sub_opts.topic = mg_str(s_config.sub);
sub_opts.qos = 2;
mg_mqtt_sub(s_mqtt, &sub_opts);
send_notification(c->mgr, "{%m:%m,%m:null}", MG_ESC("name"),
MG_ESC("config"), MG_ESC("data"));
MG_INFO(("MQTT connected, server %s", MQTT_SERVER));
} else if (ev == MG_EV_MQTT_MSG) {
struct mg_mqtt_message *mm = ev_data;
send_notification(
c->mgr, "{%m:%m,%m:{%m: %m, %m: %m, %m: %d}}", MG_ESC("name"),
MG_ESC("message"), MG_ESC("data"), MG_ESC("topic"), mg_print_esc,
(int) mm->topic.len, mm->topic.ptr, MG_ESC("data"), mg_print_esc,
(int) mm->data.len, mm->data.ptr, MG_ESC("qos"), (int) mm->qos);
} else if (ev == MG_EV_MQTT_CMD) {
struct mg_mqtt_message *mm = (struct mg_mqtt_message *) ev_data;
MG_DEBUG(("%lu cmd %d qos %d", c->id, mm->cmd, mm->qos));
} else if (ev == MG_EV_CLOSE) {
s_mqtt = NULL;
if (s_connected) {
s_connected = false;
send_notification(c->mgr, "{%m:%m,%m:null}", MG_ESC("name"),
MG_ESC("config"), MG_ESC("data"));
}
}
(void) fnd;
}
// Keep MQTT connection open - reconnect if closed
static void timer_mqtt_fn(void *param) {
struct mg_mgr *mgr = (struct mg_mgr *) param;
if (s_mqtt == NULL) {
struct mg_mqtt_opts opts;
memset(&opts, 0, sizeof(opts));
s_mqtt = mg_mqtt_connect(mgr, s_config.url, &opts, mqtt_fn, NULL);
}
}
// SNTP connection event handler. When we get a response from an SNTP server,
// adjust s_boot_timestamp. We'll get a valid time from that point on
static void sfn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_SNTP_TIME) {
uint64_t t = *(uint64_t *) ev_data;
s_boot_timestamp = (time_t) ((t - mg_millis()) / 1000);
c->is_closing = 1;
} else if (ev == MG_EV_CLOSE) {
s_sntp_conn = NULL;
}
(void) fn_data;
}
static void timer_sntp_fn(void *param) { // SNTP timer function. Sync up time
struct mg_mgr *mgr = (struct mg_mgr *) param;
if (s_sntp_conn == NULL && s_boot_timestamp == 0) {
s_sntp_conn = mg_sntp_connect(mgr, NULL, sfn, NULL);
}
}
#endif
// HTTP request handler function
void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
void *fn_data) {
if (ev == MG_EV_OPEN && c->is_listening) {
mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_metrics_fn, c->mgr);
#ifndef DISABLE_ROUTING
mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_mqtt_fn, c->mgr);
mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_sntp_fn, c->mgr);
#endif
s_config.url = strdup(MQTT_SERVER);
s_config.pub = strdup(MQTT_PUBLISH_TOPIC);
s_config.sub = strdup(MQTT_SUBSCRIBE_TOPIC);
} else if (ev == MG_EV_ACCEPT && fn_data != NULL) {
struct mg_tls_opts opts = {.cert = s_ssl_cert, .certkey = s_ssl_key};
mg_tls_init(c, &opts);
} else if (ev == MG_EV_HTTP_MSG) {
struct mg_http_message *hm = (struct mg_http_message *) ev_data;
struct user *u = getuser(hm);
// MG_INFO(("%p [%.*s] auth %s", c->fd, (int) hm->uri.len, hm->uri.ptr,
// u ? u->name : "NULL"));
if (mg_http_match_uri(hm, "/api/hi")) {
mg_http_reply(c, 200, "", "hi\n"); // Testing endpoint
} else if (mg_http_match_uri(hm, "/api/debug")) {
int level = mg_json_get_long(hm->body, "$.level", MG_LL_DEBUG);
mg_log_set(level);
mg_http_reply(c, 200, "", "Debug level set to %d\n", level);
} else if (u == NULL && mg_http_match_uri(hm, "/api/#")) {
// All URIs starting with /api/ must be authenticated
mg_http_reply(c, 403, "", "Denied\n");
} else if (mg_http_match_uri(hm, "/api/config/get")) {
#ifdef DISABLE_ROUTING
mg_http_reply(c, 200, NULL, "{%m:%m,%m:%m,%m:%m}\n", MG_ESC("url"),
MG_ESC(s_config.url), MG_ESC("pub"), MG_ESC(s_config.pub),
MG_ESC("sub"), MG_ESC(s_config.sub));
#else
mg_http_reply(c, 200, NULL, "{%m:%m,%m:%m,%m:%m,%m:%s}\n", MG_ESC("url"),
MG_ESC(s_config.url), MG_ESC("pub"), MG_ESC(s_config.pub),
MG_ESC("sub"), MG_ESC(s_config.sub), MG_ESC("connected"),
s_connected ? "true" : "false");
#endif
} else if (mg_http_match_uri(hm, "/api/config/set")) {
// Admins only
if (strcmp(u->name, "admin") == 0) {
update_config(&hm->body, "url", &s_config.url);
update_config(&hm->body, "pub", &s_config.pub);
update_config(&hm->body, "sub", &s_config.sub);
if (s_mqtt) s_mqtt->is_closing = 1; // Ask to disconnect from MQTT
send_notification(c->mgr, "{%m:%m,%m:null}", MG_ESC("name"),
MG_ESC("config"), MG_ESC("data"));
mg_http_reply(c, 200, "", "ok\n");
} else {
mg_http_reply(c, 403, "", "Denied\n");
}
} else if (mg_http_match_uri(hm, "/api/message/send")) {
char buf[256];
if (s_connected &&
mg_http_get_var(&hm->body, "message", buf, sizeof(buf)) > 0) {
struct mg_mqtt_opts pub_opts;
memset(&pub_opts, 0, sizeof(pub_opts));
pub_opts.topic = mg_str(s_config.pub);
pub_opts.message = mg_str(buf);
pub_opts.qos = 2, pub_opts.retain = false;
mg_mqtt_pub(s_mqtt, &pub_opts);
}
mg_http_reply(c, 200, "", "ok\n");
} else if (mg_http_match_uri(hm, "/api/watch")) {
c->data[0] = 'W'; // Mark ourselves as a event listener
mg_ws_upgrade(c, hm, NULL);
} else if (mg_http_match_uri(hm, "/api/login")) {
mg_http_reply(c, 200, NULL, "{%m:%m,%m:%m}\n", MG_ESC("user"),
MG_ESC(u->name), MG_ESC("token"), MG_ESC(u->token));
} else {
struct mg_http_serve_opts opts;
memset(&opts, 0, sizeof(opts));
#if 1
opts.root_dir = "/web_root";
opts.fs = &mg_fs_packed;
#else
opts.root_dir = "web_root";
#endif
mg_http_serve_dir(c, ev_data, &opts);
}
MG_DEBUG(("%lu %.*s %.*s -> %.*s", c->id, (int) hm->method.len,
hm->method.ptr, (int) hm->uri.len, hm->uri.ptr, (int) 3,
&c->send.buf[9]));
}
}
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Device Dashboard</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
</head>
<body></body>
<script type="module" src="main.js"></script>
</html>
+385
View File
@@ -0,0 +1,385 @@
'use strict';
import {Component, h, html, render, useEffect, useState, useRef} from './preact.min.js';
var devaddr = "address:port";
const MaxMetricsDataPoints = 50;
// This simple publish/subscribe is used to pass notifications that were
// received from the server, to all child components of the app.
var PubSub = (function() {
var handlers = {}, id = 0;
return {
subscribe: function(fn) {
handlers[id++] = fn;
},
unsubscribe: function(id) {
delete handlers[id];
},
publish: function(data) {
for (var k in handlers) handlers[k](data);
}
};
})();
const Nav = props => html`
<div style="background: #333; padding: 0.5em; color: #fff;">
<div class="container d-flex">
<div style="flex: 1 1 auto; display: flex; align-items: center;">
<b>Your Product</b>
</div>
<div style="display: flex; align-items: center; flex: 0 0 auto; ">
<span>Logged in as:</span>
<span style="padding: 0 0.5em;"><img src="user.png" height="22" /></span>
<span>${props.user}</span>
<a class="btn" onclick=${props.logout}
style="margin-left: 1em; font-size: 0.8em; background: #8aa;">logout</a>
</div>
</div>
</div>`;
const Hero = props => html`
<div class="section">
<div style="margin-top: 1em; background: #eee; padding: 1em; border-radius: 0.5em; color: #777; ">
<h1 style="margin: 0.2em 0;">Interactive Device Dashboard</h1>
<p>
This device dashboard is developed using the modern and compact Preact framework,
in order to fit on very small devices. This is
a <a href="https://mongoose.ws/tutorials/http-server/">hybrid server</a> which
provides both static and dynamic content. Static files, like CSS/JS/HTML
or images, are compiled into the server binary.
This UI uses the REST API implemented by the device, which you can examine
using <code>curl</code> command-line utility:
</p>
<div><code>curl -u admin:pass0 ${devaddr}/api/config/get</code> </div>
<div><code>curl -u admin:pass0 ${devaddr}/api/config/set -d 'pub=mg/topic'</code> </div>
<div><code>curl -u admin:pass0 ${devaddr}/api/message/send -d 'message=hello'</code> </div>
<p>
The device can send notifications to this dashboard at anytime. Notifications
are sent over WebSocket at URI <code>/api/watch</code> as JSON strings: <code>{"name": "..", "data": ...}</code>
<div>Try <code>wscat --auth user1:pass1 --connect ws://${devaddr}/api/watch</code></div>
</p>
</div>
</div>`;
const Login = function(props) {
const [user, setUser] = useState('');
const [pass, setPass] = useState('');
const login = ev =>
fetch(
'/api/login',
{headers: {Authorization: 'Basic ' + btoa(user + ':' + pass)}})
.then(r => r.json())
.then(r => r && props.login(r))
.catch(err => err);
return html`
<div class="rounded border" style="max-width: 480px; margin: 0 auto; margin-top: 5em; background: #eee; ">
<div style="padding: 2em; ">
<h1 style="color: #666;">Device Dashboard Login </h1>
<div style="margin: 0.5em 0;">
<input type='text' placeholder='Name' style="width: 100%;"
oninput=${ev => setUser(ev.target.value)} value=${user} />
</div>
<div style="margin: 0.5em 0;">
<input type="password" placeholder="Password" style="width: 100%;"
oninput=${ev => setPass(ev.target.value)} value=${pass}
onchange=${login} />
</div>
<div style="margin: 1em 0;">
<button class="btn" style="width: 100%; background: #8aa;"
disabled=${!user || !pass} onclick=${login}> Login </button>
</div>
<div style="color: #777; margin-top: 2em;">
Valid logins: admin:pass0, user1:pass1, user2:pass2
</div>
</div>
</div>`;
};
const Configuration = function(props) {
const [url, setUrl] = useState(props.config.url || '');
const [pub, setPub] = useState(props.config.pub || '');
const [sub, setSub] = useState(props.config.sub || '');
useEffect(() => {
setUrl(props.config.url);
setPub(props.config.pub);
setSub(props.config.sub);
}, [props.config]);
const update = (name, val) => fetch('/api/config/set', {
method: 'post',
body: `${name}=${encodeURIComponent(val)}`
}).catch(err => err);
const updateurl = ev => update('url', url);
const updatepub = ev => update('pub', pub);
const updatesub = ev => update('sub', sub);
// console.log(props, [url, pub, sub]);
return html`
<div class="section">
<h3 style="background: #c03434; color: #fff; padding: 0.4em;">
Device Configuration</h3>
<div style="margin: 0.5em 0; display: flex;">
<span class="addon nowrap">MQTT server:</span>
<input type="text" style="flex: 1 100%;"
value=${url} onchange=${updateurl}
oninput=${ev => setUrl(ev.target.value)} />
<button class="btn" disabled=${!url} onclick=${updateurl}
style="margin-left: 1em; background: #8aa;">Update</button>
</div>
<div style="margin: 0.5em 0; display: flex; ">
<span class="addon nowrap">Subscribe topic:</span>
<input type="text" style="flex: 1 100%;"
value=${sub} onchange=${updatesub}
oninput=${ev => setSub(ev.target.value)} />
<button class="btn" disabled=${!sub} onclick=${updatesub}
style="margin-left: 1em; background: #8aa;">Update</button>
</div>
<div style="margin: 0.5em 0; display: flex;">
<span class="addon nowrap">Publish topic:</span>
<input type="text" style="flex: 1 100%;"
value=${pub} onchange=${updatepub}
oninput=${ev => setPub(ev.target.value)} />
<button class="btn" disabled=${!pub} onclick=${updatepub}
style="margin-left: 1em; background: #8aa;">Update</button>
</div>
<div>
You can use <a href="http://www.hivemq.com/demos/websocket-client/">
HiveMQ Websocket web client</a> to send messages to this console.
</div>
<div class="msg">
The device keeps a persistent connection to the configured MQTT server.
Changes to this configuration are propagated to all dashboards: try
changing them in this dashboard and observe changes in other opened
dashboards.
</div><div class="msg">
Note: administrators can see this section and can change device
configuration, whilst users cannot.
</div>
</div>`;
};
const Message = m => html`<div style="margin: 0.5em 0;">
<span class="qos">qos: ${m.message.qos} </span>
<span class="topic">topic: ${m.message.topic} </span>
<span class="data">data: ${m.message.data}</span>
</div>`;
const Messages = function(props) {
const [messages, setMessages] = useState([]);
const [txt, setTxt] = useState('');
useEffect(() => {
const id = PubSub.subscribe(function(msg) {
if (msg.name == 'message') setMessages(x => x.concat([msg.data]));
});
return PubSub.unsubscribe(id);
}, []);
const sendmessage = ev => fetch('/api/message/send', {
method: 'post',
body: `message=${encodeURIComponent(txt)}`
}).then(r => setTxt(''));
const routing = "connected" in props.config;
const connstatus = !routing ? 'This device has no MQTT functionality' : props.config.connected ? 'connected' : 'disconnected';
return html`
<div class="section">
<h3 style="background: #30c040; color: #fff; padding: 0.4em;">MQTT messages</h3>
<div>
MQTT server status: <b>${connstatus}</b>
</div>
<div style="height: 10em; overflow: auto; padding: 0.5em; " class="border">
${messages.map(message => h(Message, {message}))}
</div>
<div style="margin: 0.5em 0; display: flex">
<span class="addon nowrap">Publish message:</span>
<input placeholder="type and press enter..." style="flex: 1 100%;"
value=${txt} onchange=${sendmessage} disabled=${!routing}
oninput=${ev => setTxt(ev.target.value)} />
</div>
<div class="msg">
The message gets passed to the device via REST. Then the device sends it to
the MQTT server over MQTT. All MQTT messages on a subscribed topic
received by the device, are propagated to this dashboard via /api/watch.
</div>
</div>`;
};
// Expected arguments:
// data: timeseries, e.g. [ [1654361352, 19], [1654361353, 18], ... ]
// width, height, yticks, xticks, ymin, ymax, xmin, xmax
const SVG = function(props) {
// w
// +---------------------+
// | h1 |
// | +-----------+ |
// | | | | h
// | w1 | | w2 |
// | +-----------+ |
// | h2 |
// +---------------------+
//
let w = props.width, h = props.height, w1 = 30, w2 = 0, h1 = 8, h2 = 18;
let yticks = props.yticks || 4, xticks = props.xticks || 5;
let data = props.data || [];
let ymin = props.ymin || 0;
let ymax = props.ymax || Math.max.apply(null, data.map(p => p[1]));
let xmin = props.xmin || Math.min.apply(null, data.map(p => p[0]));
let xmax = props.xmax || Math.max.apply(null, data.map(p => p[0]));
// Y-axis tick lines and labels
let yta = (new Array(yticks + 1)).fill(0).map((_, i) => i); // indices
let yti = i => h - h2 - (h - h1 - h2) * i / yticks; // index's Y
let ytv = i => (ymax - ymin) * i / yticks;
let ytl = y => html`<line x1=${w1} y1=${y} x2=${w} y2=${y} class="tick"/>`;
let ytt = (y, v) => html`<text x=0 y=${y + 5} class="label">${v}</text>`;
// X-axis tick lines and labels
let datefmt = unix => (new Date(unix * 1000)).toISOString().substr(14, 5);
let xta = (new Array(xticks + 1)).fill(0).map((_, i) => i); // indices
let xti = i => w1 + (w - w1 - w2) * i / xticks; // index's X
let xtv = i => datefmt(xmin + (xmax - xmin) * i / xticks);
let xtl = x => html`<path d="M ${x},${h1} L ${x},${h - h2}" class="tick"/>`;
let xtt = (x, v) =>
html`<text x=${x - 15} y=${h - 2} class="label">${v}</text>`;
// Transform data points array into coordinate
let dx = v => w1 + (v - xmin) / ((xmax - xmin) || 1) * (w - w1 - w2);
let dy = v => h - h2 - (v - ymin) / ((ymax - ymin) || 1) * (h - h1 - h2);
let dd = data.map(p => [Math.round(dx(p[0])), Math.round(dy(p[1]))]);
let ddl = dd.length;
// And plot the data as <path> element
let begin0 = ddl ? `M ${dd[0][0]},${dd[0][1]}` : `M 0,0`;
let begin = `M ${w1},${h - h2}`; // Initial point
let end = ddl ? `L ${dd[ddl - 1][0]},${h - h2}` : `L ${w1},${h - h2}`;
let series = ddl ? dd.map(p => `L ${p[0]} ${p[1]}`) : [];
return html`
<svg viewBox="0 0 ${w} ${h}">
<style>
.axis { stroke: #aaa; fill: none; }
.label { stroke: #aaa; font-size: 13px; }
.tick { stroke: #ccc; fill: none; stroke-dasharray: 5; }
.seriesbg { stroke: none; fill: rgba(200,225,255, 0.25)}
.series { stroke: #25a; fill: none; }
</style>
${yta.map(i => ytl(yti(i)))}
${yta.map(i => ytt(yti(i), ytv(i)))}
${xta.map(i => xtl(xti(i)))}
${data.length ? xta.map(i => xtt(xti(i), xtv(i))) : ''}
<path d="${begin} ${series.join(' ')} ${end}" class="seriesbg" />
<path d="${begin0} ${series.join(' ')}" class="series" />
</svg>`;
};
const Chart = function(props) {
const [data, setData] = useState([]);
useEffect(() => {
const id = PubSub.subscribe(function(msg) {
if (msg.name != 'metrics') return;
setData(x => x.concat([msg.data]).splice(-MaxMetricsDataPoints));
});
return PubSub.unsubscribe(id);
}, []);
let xmax = 0, missing = MaxMetricsDataPoints - data.length;
if (missing > 0) xmax = Math.round(Date.now() / 1000) + missing;
return html`
<div class="section">
<h3 style="background: #ec3; color: #fff; padding: 0.4em;">Data Chart</h3>
<div style="overflow: auto; padding: 0.5em;" class="">
<${SVG} height=240 width=600 ymin=0 ymax=20 xmax=${xmax} data=${data} />
</div>
<div class="msg">
This chart plots live sensor data, sent by the device via /api/watch.
</div>
</div>`;
};
const App = function(props) {
const [user, setUser] = useState('');
const [config, setConfig] = useState({});
const getconfig = () =>
fetch('/api/config/get', {headers: {Authorization: ''}})
.then(r => r.json())
.then(r => setConfig(r))
.catch(err => console.log(err));
// Watch for notifications. As soon as a notification arrives, pass it on
// to all subscribed components
const watch = function() {
var l = window.location, proto = l.protocol.replace('http', 'ws');
var tid, wsURI = proto + '//' + l.host + '/api/watch'
var reconnect = function() {
var ws = new WebSocket(wsURI);
// ws.onopen = () => console.log('ws connected');
ws.onmessage = function(ev) {
try {
var msg = JSON.parse(ev.data);
PubSub.publish(msg);
// if (msg.name != 'metrics') console.log('ws->', msg);
} catch (e) {
console.log('Invalid ws frame:', ev.data); // eslint-disable-line
}
};
ws.onclose = function() {
clearTimeout(tid);
tid = setTimeout(reconnect, 1000);
console.log('ws disconnected');
};
};
reconnect();
};
const login = function(u) {
document.cookie = `access_token=${u.token}; Secure, HttpOnly; SameSite=Lax; path=/; max-age=3600`;
setUser(u.user);
if (location.search.substring(1) == 'nows') {
// If query string is ?nows, then do not connect to websocket. For debug.
} else {
watch(); // Connect to websocket, receive constant graph updates
}
return getconfig();
};
const logout = ev => {
document.cookie = `access_token=; Secure, HttpOnly; SameSite=Lax; path=/; max-age=0`;
setUser('');
};
useEffect(() => {
// Called once at init time
PubSub.subscribe(msg => msg.name == 'config' && getconfig());
fetch('/api/login', {headers: {Authorization: ''}})
.then(r => r.json())
.then(r => login(r))
.catch(err => setUser(''));
}, []);
if (!user) return html`<${Login} login=${login} />`;
return html`
<${Nav} user=${user} logout=${logout} />
<div class="container">
<div class="row">
<div class="col col-6"><${Hero} /></div>
<div class="col col-6"><${Chart} /></div>
<div class="col col-6">
${user == 'admin' && h(Configuration, {config})}
</div>
<div class="col col-6"><${Messages} config=${config} /></div>
</div>
</div>`;
};
window.onload = () => render(h(App), document.body);
+1
View File
@@ -0,0 +1 @@
var e,n,_,t,o,r,u,l={},i=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(e,n){for(var _ in n)e[_]=n[_];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function a(n,_,t){var o,r,u,l={};for(u in _)"key"==u?o=_[u]:"ref"==u?r=_[u]:l[u]=_[u];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):t),"function"==typeof n&&null!=n.defaultProps)for(u in n.defaultProps)void 0===l[u]&&(l[u]=n.defaultProps[u]);return p(n,l,o,r,null)}function p(e,t,o,r,u){var l={type:e,props:t,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++_:u};return null!=n.vnode&&n.vnode(l),l}function h(e){return e.children}function d(e,n){this.props=e,this.context=n}function v(e,n){if(null==n)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var _;n<e.__k.length;n++)if(null!=(_=e.__k[n])&&null!=_.__e)return _.__e;return"function"==typeof e.type?v(e):null}function y(e){var n,_;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(_=e.__k[n])&&null!=_.__e){e.__e=e.__c.base=_.__e;break}return y(e)}}function m(e){(!e.__d&&(e.__d=!0)&&t.push(e)&&!g.__r++||r!==n.debounceRendering)&&((r=n.debounceRendering)||o)(g)}function g(){for(var e;g.__r=t.length;)e=t.sort(function(e,n){return e.__v.__b-n.__v.__b}),t=[],e.some(function(e){var n,_,t,o,r,u;e.__d&&(r=(o=(n=e).__v).__e,(u=n.__P)&&(_=[],(t=s({},o)).__v=o.__v+1,P(u,o,t,n.__n,void 0!==u.ownerSVGElement,null!=o.__h?[r]:null,_,null==r?v(o):r,o.__h),D(_,o),o.__e!=r&&y(o)))})}function k(e,n,_,t,o,r,u,c,s,f){var a,d,y,m,g,k,x,H=t&&t.__k||i,E=H.length;for(_.__k=[],a=0;a<n.length;a++)if(null!=(m=_.__k[a]=null==(m=n[a])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?p(null,m,null,null,m):Array.isArray(m)?p(h,{children:m},null,null,null):m.__b>0?p(m.type,m.props,m.key,null,m.__v):m)){if(m.__=_,m.__b=_.__b+1,null===(y=H[a])||y&&m.key==y.key&&m.type===y.type)H[a]=void 0;else for(d=0;d<E;d++){if((y=H[d])&&m.key==y.key&&m.type===y.type){H[d]=void 0;break}y=null}P(e,m,y=y||l,o,r,u,c,s,f),g=m.__e,(d=m.ref)&&y.ref!=d&&(x||(x=[]),y.ref&&x.push(y.ref,null,m),x.push(d,m.__c||g,m)),null!=g?(null==k&&(k=g),"function"==typeof m.type&&null!=m.__k&&m.__k===y.__k?m.__d=s=b(m,s,e):s=C(e,m,y,H,g,s),f||"option"!==_.type?"function"==typeof _.type&&(_.__d=s):e.value=""):s&&y.__e==s&&s.parentNode!=e&&(s=v(y))}for(_.__e=k,a=E;a--;)null!=H[a]&&("function"==typeof _.type&&null!=H[a].__e&&H[a].__e==_.__d&&(_.__d=v(t,a+1)),U(H[a],H[a]));if(x)for(a=0;a<x.length;a++)T(x[a],x[++a],x[++a])}function b(e,n,_){var t,o;for(t=0;t<e.__k.length;t++)(o=e.__k[t])&&(o.__=e,n="function"==typeof o.type?b(o,n,_):C(_,o,o,e.__k,o.__e,n));return n}function C(e,n,_,t,o,r){var u,l,i;if(void 0!==n.__d)u=n.__d,n.__d=void 0;else if(null==_||o!=r||null==o.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(o),u=null;else{for(l=r,i=0;(l=l.nextSibling)&&i<t.length;i+=2)if(l==o)break e;e.insertBefore(o,r),u=r}return void 0!==u?u:o.nextSibling}function x(e,n,_){"-"===n[0]?e.setProperty(n,_):e[n]=null==_?"":"number"!=typeof _||c.test(n)?_:_+"px"}function H(e,n,_,t,o){var r;e:if("style"===n)if("string"==typeof _)e.style.cssText=_;else{if("string"==typeof t&&(e.style.cssText=t=""),t)for(n in t)_&&n in _||x(e.style,n,"");if(_)for(n in _)t&&_[n]===t[n]||x(e.style,n,_[n])}else if("o"===n[0]&&"n"===n[1])r=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+r]=_,_?t||e.addEventListener(n,r?S:E,r):e.removeEventListener(n,r?S:E,r);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==_?"":_;break e}catch(e){}"function"==typeof _||(null!=_&&(!1!==_||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,_):e.removeAttribute(n))}}function E(e){this.l[e.type+!1](n.event?n.event(e):e)}function S(e){this.l[e.type+!0](n.event?n.event(e):e)}function P(e,_,t,o,r,u,l,i,c){var f,a,p,v,y,m,g,b,C,x,H,E=_.type;if(void 0!==_.constructor)return null;null!=t.__h&&(c=t.__h,i=_.__e=t.__e,_.__h=null,u=[i]),(f=n.__b)&&f(_);try{e:if("function"==typeof E){if(b=_.props,C=(f=E.contextType)&&o[f.__c],x=f?C?C.props.value:f.__:o,t.__c?g=(a=_.__c=t.__c).__=a.__E:("prototype"in E&&E.prototype.render?_.__c=a=new E(b,x):(_.__c=a=new d(b,x),a.constructor=E,a.render=A),C&&C.sub(a),a.props=b,a.state||(a.state={}),a.context=x,a.__n=o,p=a.__d=!0,a.__h=[]),null==a.__s&&(a.__s=a.state),null!=E.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=s({},a.__s)),s(a.__s,E.getDerivedStateFromProps(b,a.__s))),v=a.props,y=a.state,p)null==E.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==E.getDerivedStateFromProps&&b!==v&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,x),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldCompLine truncated
@@ -0,0 +1,43 @@
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font: 16px sans-serif; }
select, input, label::before, textarea { outline: none; box-shadow:none !important; border: 1px solid #ccc !important; }
code, pre { color: #373; font-family: monospace; font-weight: bolder; font-size: smaller; background: #ddd; padding: 0.1em 0.3em; border-radius: 0.2em; }
textarea, input, .addon { font-size: 15px; border: 1px solid #ccc; padding: 0.5em; }
a, a:visited, a:active { color: #55f; }
.addon { background: #eee; min-width: 9em;}
.btn {
background: #ccc; border-radius: 0.3em; border: 0; color: #fff; cursor: pointer;
display: inline-block; padding: 0.6em 2em; font-weight: bolder;
}
.btn[disabled] { opacity: 0.5; cursor: auto;}
.smooth { transition: all .2s; }
.container { margin: 0 20px; width: auto; }
.d-flex { display: flex; }
.d-none { display: none; }
.border { border: 1px solid #ddd; }
.rounded { border-radius: 0.5em; }
.nowrap { white-space: nowrap; }
.msg { background: #def; border-left: 5px solid #59d; padding: 0.5em; font-size: 90%; margin: 1em 0; }
.section { margin: 0 1em; }
.topic, .data, .qos { padding: 0.2em 0.5em; border-radius: 0.4em; margin-right: 0.5em; }
.qos { background: #efa; }
.topic { background: #fea; }
.data { background: #aef; }
/* Grid */
.row { display: flex; flex-wrap: wrap; }
.col { margin: 0; padding: 0; overflow: auto; }
.col-12 { width: 100%; }
.col-11 { width: 91.66%; }
.col-10 { width: 83.33%; }
.col-9 { width: 75%; }
.col-8 { width: 66.66%; }
.col-7 { width: 58.33%; }
.col-6 { width: 50%; }
.col-5 { width: 41.66%; }
.col-4 { width: 33.33%; }
.col-3 { width: 25%; }
.col-2 { width: 16.66%; }
.col-1 { width: 8.33%; }
@media (min-width: 1310px) { .container { margin: auto; width: 1270px; } }
@media (max-width: 920px) { .row .col { width: 100%; } }
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

+51
View File
@@ -0,0 +1,51 @@
PROG ?= example # Program we are building
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c packed_fs.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
PACK = ./pack # Utility to pack files into a packed filesystem
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
FILES_TO_EMBED ?= $(wildcard web_root/*)
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
PACK = pack.exe
endif
all: $(PROG) # Default target. Build and run program
$(RUN) ./$(PROG) $(ARGS)
$(PROG): $(SOURCES) $(FILES_TO_EMBED) # Build program from sources
$(CC) ../../test/pack.c -o $(PACK)
$(PACK) $(FILES_TO_EMBED) > packed_fs.c
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.dSYM $(PACK)
.PHONY: compress expand gzipped plain all
# See tutorial at https://mongoose.ws/tutorials/embedded-filesystem/#build-and-try
gzipped: compress
$(MAKE) all
plain: expand
$(MAKE) all
compress:
for file in $(FILES_TO_EMBED) ; do \
gzip -q $$file ; \
done
expand:
for file in $(FILES_TO_EMBED) ; do \
gunzip -q $$file ; \
done
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/embedded-filesystem/
+28
View File
@@ -0,0 +1,28 @@
// Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include "mongoose.h"
const char *s_listening_url = "http://0.0.0.0:8000";
// HTTP request handler function
void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_HTTP_MSG) {
struct mg_http_serve_opts opts = {
.root_dir = "/web_root",
.fs = &mg_fs_packed
};
mg_http_serve_dir(c, ev_data, &opts);
}
(void) fn_data;
}
int main(void) {
struct mg_mgr mgr;
mg_log_set(MG_LL_INFO);
mg_mgr_init(&mgr);
mg_http_listen(&mgr, s_listening_url, fn, NULL);
while (true) mg_mgr_poll(&mgr, 500);
mg_mgr_free(&mgr);
return 0;
}
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="Mongoose Embedded Filesytem example" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mongoose Embedded Filesytem example</title>
<link rel="stylesheet" href="style.css" />
</head>
<body></body>
<script type="module" src="main.js"></script>
</html>
@@ -0,0 +1,88 @@
'use strict';
import { h, html, render } from './preact.min.js';
const X = function () {
return html`
<div class="container">
<h2 class="section">ABOUT US</h2>
<div class="row">
<div class="col-7">
<p>
Cesanta Software Ltd. is headquartered in Dublin, Republic of Ireland.
</p>
<p></p>
Our story roots back to 2004, when Mongoose Web Server Library development started. <br>
As Mongoose Web Server grew in popularity and matured over the following years, in 2013 Cesanta was established to continue its development and
provide support to our valued customers.
</p>
<p>We are proud to have among our customers many <i>Fortune 500</i> companies as well as medium and small size businesses.
Security and quality of our solutions is a paramount for us and the fact that Mongoose Web Server is used by NASA aboard the International Space Station is
the best confirmation to it.</p>
<p>Since 2013, Cesanta has expanded its product portfolio. We develop and distribute embedded software and hardware with focus on connected products and the Internet of Things.</p>
</div>
</div>
</div>
`;
};
const Y = function () {
return html`
<div class="container">
<h3 class="section">Among our products are:</h3>
<div class="row">
<div class="col-7">
<ul>
<li>
<a href="https://mongoose.ws/">Mongoose Web Server</a>
- an embedded web server and networking library
</li>
<li>
<a href="https://vcon.io/">VCON.io</a>
- Arduino-compatible boards with built-in firmware OTA updates
and management dashboard
</li>
<li>
<a href="https://mdash.net/">mDash.net</a>
- an all-in-one IoT Platform
</li>
<li>
<a href="https://mongoose-os.com">Mongoose OS</a>
- an operating system for low-power microcontrollers
</li>
<li>
<a href="https://github.com/cesanta/mjs">mJS</a>
- an embedded JavaScript engine for C/C++
</li>
</ul>
</div>
<div class="col-6">
<p><b>Our solutions are:</b></p>
<ul>
<li>integrated into thousands of commercial products</li>
<li>deployed to hundreds of millions devices in production environments</li>
</ul>
</div>
</div>
</div>
`;
};
const App = function (props) {
return html`
<h1>Basic Embedded Filesystem demo</h1>
<div>
${h(X)}
</div>
<div>
${h(Y)}
</div>`;
};
window.onload = () => render(h(App), document.body);
+1
View File
@@ -0,0 +1 @@
var e,n,_,t,o,r,u,l={},i=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(e,n){for(var _ in n)e[_]=n[_];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function a(n,_,t){var o,r,u,l={};for(u in _)"key"==u?o=_[u]:"ref"==u?r=_[u]:l[u]=_[u];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):t),"function"==typeof n&&null!=n.defaultProps)for(u in n.defaultProps)void 0===l[u]&&(l[u]=n.defaultProps[u]);return p(n,l,o,r,null)}function p(e,t,o,r,u){var l={type:e,props:t,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++_:u};return null!=n.vnode&&n.vnode(l),l}function h(e){return e.children}function d(e,n){this.props=e,this.context=n}function v(e,n){if(null==n)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var _;n<e.__k.length;n++)if(null!=(_=e.__k[n])&&null!=_.__e)return _.__e;return"function"==typeof e.type?v(e):null}function y(e){var n,_;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(_=e.__k[n])&&null!=_.__e){e.__e=e.__c.base=_.__e;break}return y(e)}}function m(e){(!e.__d&&(e.__d=!0)&&t.push(e)&&!g.__r++||r!==n.debounceRendering)&&((r=n.debounceRendering)||o)(g)}function g(){for(var e;g.__r=t.length;)e=t.sort(function(e,n){return e.__v.__b-n.__v.__b}),t=[],e.some(function(e){var n,_,t,o,r,u;e.__d&&(r=(o=(n=e).__v).__e,(u=n.__P)&&(_=[],(t=s({},o)).__v=o.__v+1,P(u,o,t,n.__n,void 0!==u.ownerSVGElement,null!=o.__h?[r]:null,_,null==r?v(o):r,o.__h),D(_,o),o.__e!=r&&y(o)))})}function k(e,n,_,t,o,r,u,c,s,f){var a,d,y,m,g,k,x,H=t&&t.__k||i,E=H.length;for(_.__k=[],a=0;a<n.length;a++)if(null!=(m=_.__k[a]=null==(m=n[a])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?p(null,m,null,null,m):Array.isArray(m)?p(h,{children:m},null,null,null):m.__b>0?p(m.type,m.props,m.key,null,m.__v):m)){if(m.__=_,m.__b=_.__b+1,null===(y=H[a])||y&&m.key==y.key&&m.type===y.type)H[a]=void 0;else for(d=0;d<E;d++){if((y=H[d])&&m.key==y.key&&m.type===y.type){H[d]=void 0;break}y=null}P(e,m,y=y||l,o,r,u,c,s,f),g=m.__e,(d=m.ref)&&y.ref!=d&&(x||(x=[]),y.ref&&x.push(y.ref,null,m),x.push(d,m.__c||g,m)),null!=g?(null==k&&(k=g),"function"==typeof m.type&&null!=m.__k&&m.__k===y.__k?m.__d=s=b(m,s,e):s=C(e,m,y,H,g,s),f||"option"!==_.type?"function"==typeof _.type&&(_.__d=s):e.value=""):s&&y.__e==s&&s.parentNode!=e&&(s=v(y))}for(_.__e=k,a=E;a--;)null!=H[a]&&("function"==typeof _.type&&null!=H[a].__e&&H[a].__e==_.__d&&(_.__d=v(t,a+1)),U(H[a],H[a]));if(x)for(a=0;a<x.length;a++)T(x[a],x[++a],x[++a])}function b(e,n,_){var t,o;for(t=0;t<e.__k.length;t++)(o=e.__k[t])&&(o.__=e,n="function"==typeof o.type?b(o,n,_):C(_,o,o,e.__k,o.__e,n));return n}function C(e,n,_,t,o,r){var u,l,i;if(void 0!==n.__d)u=n.__d,n.__d=void 0;else if(null==_||o!=r||null==o.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(o),u=null;else{for(l=r,i=0;(l=l.nextSibling)&&i<t.length;i+=2)if(l==o)break e;e.insertBefore(o,r),u=r}return void 0!==u?u:o.nextSibling}function x(e,n,_){"-"===n[0]?e.setProperty(n,_):e[n]=null==_?"":"number"!=typeof _||c.test(n)?_:_+"px"}function H(e,n,_,t,o){var r;e:if("style"===n)if("string"==typeof _)e.style.cssText=_;else{if("string"==typeof t&&(e.style.cssText=t=""),t)for(n in t)_&&n in _||x(e.style,n,"");if(_)for(n in _)t&&_[n]===t[n]||x(e.style,n,_[n])}else if("o"===n[0]&&"n"===n[1])r=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+r]=_,_?t||e.addEventListener(n,r?S:E,r):e.removeEventListener(n,r?S:E,r);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==_?"":_;break e}catch(e){}"function"==typeof _||(null!=_&&(!1!==_||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,_):e.removeAttribute(n))}}function E(e){this.l[e.type+!1](n.event?n.event(e):e)}function S(e){this.l[e.type+!0](n.event?n.event(e):e)}function P(e,_,t,o,r,u,l,i,c){var f,a,p,v,y,m,g,b,C,x,H,E=_.type;if(void 0!==_.constructor)return null;null!=t.__h&&(c=t.__h,i=_.__e=t.__e,_.__h=null,u=[i]),(f=n.__b)&&f(_);try{e:if("function"==typeof E){if(b=_.props,C=(f=E.contextType)&&o[f.__c],x=f?C?C.props.value:f.__:o,t.__c?g=(a=_.__c=t.__c).__=a.__E:("prototype"in E&&E.prototype.render?_.__c=a=new E(b,x):(_.__c=a=new d(b,x),a.constructor=E,a.render=A),C&&C.sub(a),a.props=b,a.state||(a.state={}),a.context=x,a.__n=o,p=a.__d=!0,a.__h=[]),null==a.__s&&(a.__s=a.state),null!=E.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=s({},a.__s)),s(a.__s,E.getDerivedStateFromProps(b,a.__s))),v=a.props,y=a.state,p)null==E.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==E.getDerivedStateFromProps&&b!==v&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,x),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldCompLine truncated
@@ -0,0 +1,43 @@
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font: 16px sans-serif; }
select, input, label::before, textarea { outline: none; box-shadow:none !important; border: 1px solid #ccc !important; }
code, pre { color: #373; font-family: monospace; font-weight: bolder; font-size: smaller; background: #ddd; padding: 0.1em 0.3em; border-radius: 0.2em; }
textarea, input, .addon { font-size: 15px; border: 1px solid #ccc; padding: 0.5em; }
a, a:visited, a:active { color: #55f; }
.addon { background: #eee; min-width: 9em;}
.btn {
background: #ccc; border-radius: 0.3em; border: 0; color: #fff; cursor: pointer;
display: inline-block; padding: 0.6em 2em; font-weight: bolder;
}
.btn[disabled] { opacity: 0.5; cursor: auto;}
.smooth { transition: all .2s; }
.container { margin: 0 20px; width: auto; }
.d-flex { display: flex; }
.d-none { display: none; }
.border { border: 1px solid #ddd; }
.rounded { border-radius: 0.5em; }
.nowrap { white-space: nowrap; }
.msg { background: #def; border-left: 5px solid #59d; padding: 0.5em; font-size: 90%; margin: 1em 0; }
.section { margin: 0 1em; }
.topic, .data, .qos { padding: 0.2em 0.5em; border-radius: 0.4em; margin-right: 0.5em; }
.qos { background: #efa; }
.topic { background: #fea; }
.data { background: #aef; }
/* Grid */
.row { display: flex; flex-wrap: wrap; }
.col { margin: 0; padding: 0; overflow: auto; }
.col-12 { width: 100%; }
.col-11 { width: 91.66%; }
.col-10 { width: 83.33%; }
.col-9 { width: 75%; }
.col-8 { width: 66.66%; }
.col-7 { width: 58.33%; }
.col-6 { width: 50%; }
.col-5 { width: 41.66%; }
.col-4 { width: 33.33%; }
.col-3 { width: 25%; }
.col-2 { width: 16.66%; }
.col-1 { width: 8.33%; }
@media (min-width: 1310px) { .container { margin: auto; width: 1270px; } }
@media (max-width: 920px) { .row .col { width: 100%; } }
@@ -0,0 +1,6 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mongoose-esp32-example)
+38
View File
@@ -0,0 +1,38 @@
THISDIR = $(realpath $(CURDIR))
ROOTDIR = $(realpath $(CURDIR)/../../..)
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) espressif/idf
CMD ?= idf.py build
PORT ?= /dev/ttyUSB0
all: example
example:
true
build: Makefile $(wildcard main/*)
$(DOCKER) $(CMD)
flash:
flash: CMD = idf.py flash
flash: DA = --device $(PORT)
flash: build
.PHONY: build
dashboard.hex: build
esputil mkhex \
0x8000 build/partition_table/partition-table.bin \
0x1000 build/bootloader/bootloader.bin \
0x100000 build/mongoose-esp32-example.bin > $@
flash2: dashboard.hex
esputil -p $(PORT) -b 921600 -fp 0x220 flash dashboard.hex
esputil -p $(PORT) monitor
ESPTOOL ?= esptool.py
flash3:
cd build && $(ESPTOOL) --chip esp32 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x100000 mongoose-esp32-example.bin
clean:
test -d build && $(DOCKER) rm -rf build sdkconfig || true
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/esp32/device-dashboard
@@ -0,0 +1,7 @@
idf_component_register(SRCS "main.c"
"wifi.c"
"net.c"
"packed_fs.c"
"mongoose.c")
component_compile_options(-DMG_ENABLE_LINES)
component_compile_options(-DMG_ENABLE_PACKED_FS)
@@ -0,0 +1,35 @@
// Copyright (c) 2020 Cesanta Software Limited
// All rights reserved
#include "esp_spiffs.h"
//#include "freertos/FreeRTOS.h"
#include "mongoose.h"
const char *s_listening_url = "http://0.0.0.0:80";
void device_dashboard_fn(struct mg_connection *, int, void *, void *);
#define WIFI_SSID "YOUR_WIFI_NETWORK_NAME" // SET THIS!
#define WIFI_PASS "YOUR_WIFI_PASSWORD" // SET THIS!
#define FS_ROOT "/spiffs"
void app_main(void) {
// Mount filesystem
esp_vfs_spiffs_conf_t conf = {
.base_path = FS_ROOT, .max_files = 20, .format_if_mount_failed = true};
int res = esp_vfs_spiffs_register(&conf);
MG_INFO(("FS %s, %d", conf.base_path, res));
mg_file_printf(&mg_fs_posix, FS_ROOT "/hello.txt", "%s", "hello from ESP");
// Setup wifi. This function is implemented in wifi.c
// It blocks until connected to the configured WiFi network
void wifi_init(const char *ssid, const char *pass);
wifi_init(WIFI_SSID, WIFI_PASS);
// Connected to WiFi, now start HTTP server
struct mg_mgr mgr;
mg_log_set(MG_LL_DEBUG); // Set log level
mg_mgr_init(&mgr);
MG_INFO(("Mongoose v%s on %s", MG_VERSION, s_listening_url));
mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, NULL);
for (;;) mg_mgr_poll(&mgr, 1000); // Infinite event loop
}
+1
View File
@@ -0,0 +1 @@
../../../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../../../mongoose.h
+1
View File
@@ -0,0 +1 @@
../../../device-dashboard/net.c
+1
View File
@@ -0,0 +1 @@
../../../device-dashboard/packed_fs.c
+104
View File
@@ -0,0 +1,104 @@
// Code taken from the ESP32 IDF WiFi station Example
#include <string.h>
#include "esp_event.h"
#include "esp_log.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "freertos/task.h"
#include "nvs_flash.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#include "mongoose.h"
static EventGroupHandle_t s_wifi_event_group;
/* The event group allows multiple bits for each event, but we only care about
* two events:
* - we are connected to the AP with an IP
* - we failed to connect after the maximum amount of retries */
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
static int s_retry_num = 0;
static void event_handler(void *arg, esp_event_base_t event_base,
int32_t event_id, void *event_data) {
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
esp_wifi_connect();
} else if (event_base == WIFI_EVENT &&
event_id == WIFI_EVENT_STA_DISCONNECTED) {
if (s_retry_num < 3) {
esp_wifi_connect();
s_retry_num++;
MG_INFO(("retry to connect to the AP"));
} else {
xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT);
}
MG_ERROR(("connect to the AP fail"));
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t *event = (ip_event_got_ip_t *) event_data;
MG_INFO(("IP ADDRESS:" IPSTR, IP2STR(&event->ip_info.ip)));
s_retry_num = 0;
xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
}
}
void wifi_init(const char *ssid, const char *pass) {
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
esp_event_handler_instance_t instance_any_id;
esp_event_handler_instance_t instance_got_ip;
ESP_ERROR_CHECK(esp_event_handler_instance_register(
WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL, &instance_any_id));
ESP_ERROR_CHECK(esp_event_handler_instance_register(
IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL, &instance_got_ip));
wifi_config_t c = {.sta = {.threshold = {.authmode = WIFI_AUTH_WPA2_PSK},
.pmf_cfg = {.capable = true, .required = false}}};
snprintf((char *) c.sta.ssid, sizeof(c.sta.ssid), "%s", ssid);
snprintf((char *) c.sta.password, sizeof(c.sta.password), "%s", pass);
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &c));
ESP_ERROR_CHECK(esp_wifi_start());
MG_DEBUG(("wifi_init_sta finished."));
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
WIFI_CONNECTED_BIT | WIFI_FAIL_BIT,
pdFALSE, pdFALSE, portMAX_DELAY);
if (bits & WIFI_CONNECTED_BIT) {
MG_INFO(("connected to ap SSID:%s password:%s", ssid, pass));
} else if (bits & WIFI_FAIL_BIT) {
MG_ERROR(("Failed to connect to SSID:%s, password:%s", ssid, pass));
} else {
MG_ERROR(("UNEXPECTED EVENT"));
}
/* The event will not be processed after unregister */
ESP_ERROR_CHECK(esp_event_handler_instance_unregister(
IP_EVENT, IP_EVENT_STA_GOT_IP, instance_got_ip));
ESP_ERROR_CHECK(esp_event_handler_instance_unregister(
WIFI_EVENT, ESP_EVENT_ANY_ID, instance_any_id));
vEventGroupDelete(s_wifi_event_group);
}
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
storage, data, spiffs, 0x10000, 0x10000,
factory, app, factory, 0x100000, 1M,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x6000
3 phy_init data phy 0xf000 0x1000
4 storage data spiffs 0x10000 0x10000
5 factory app factory 0x100000 1M
@@ -0,0 +1,4 @@
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
#CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
@@ -0,0 +1,6 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mongoose-esp32-example)
+32
View File
@@ -0,0 +1,32 @@
CWD = $(realpath $(CURDIR))
MNT = $(realpath $(CURDIR)/../../..)
PORT ?= /dev/ttyUSB0
CMD ?= build
all: example
example:
true
build: Makefile $(wildcard main/*)
docker run --rm $(DA) -v $(MNT):$(MNT) -w $(CWD) espressif/idf idf.py $(CMD)
flash:
flash: CMD = flash
flash: DA = --device $(PORT)
flash: build
.PHONY: build
bridge.hex: build
esputil mkhex \
0x8000 build/partition_table/partition-table.bin \
0x1000 build/bootloader/bootloader.bin \
0x100000 build/mongoose-esp32-example.bin > $@
flash2: bridge.hex
esputil -p $(PORT) -b 921600 -fp 0x220 flash bridge.hex
esputil -p $(PORT) monitor
clean:
rm -rf build
+41
View File
@@ -0,0 +1,41 @@
# A UART to network bridge for ESP32
![](../../uart-bridge/screenshots/dashboard.png)
- See detailed tutorial at https://mongoose.ws/tutorials/esp32/uart-bridge/
## Flash pre-built firmware
You can flash a pre-built firmware to the ESP32 device using the following
instructions:
1. Connect your ESP32 device to the workstation. It should be accessible
via a serial port
2. Download and unzip ESP32 flashing tool from https://mongoose.ws/downloads/esputil.zip
3. Download a prebuilt firmware https://mongoose.ws/downloads/uart-bridge.hex into the unzipped directory
4. Start command prompt (or terminal on Mac/Linux). Run `cd
PATH/TO/esputil` to go into the unzipped `esputil/` directory. After that, run
the following command (change `COMPORT` to the board's serial port):
| OS | Command |
| ------- | ------- |
| Windows | <pre><code class="language-bash">.\windows\esputil -p COMPORT flash uart-bridge.hex</code></pre>|
| Linux | <pre><code class="language-bash">./linux/esputil -p COMPORT flash uart-bridge.hex</pre> |
| MacOS | <pre><code class="language-bash">./macos/esputil -p COMPORT flash uart-bridge.hex</code></pre> |
Next step is to monitor and follow the instructions.
```sh
esputil -p COMPORT monitor
```
Note: if monitor command shows constant restarts, the flash parameters
settings can be wrong. Reflash your device with `-fp ...` flash parameters
settings. For example, WROOM-32 based boards use `-fp 0x220`:
```sh
esputil -p COMPORT -fp 0x220 flash uart-bridge.hex
```
For more on possible options for flash parameters, see
https://github.com/cpq/esputil#flash-parameters
@@ -0,0 +1,10 @@
idf_component_register(SRCS "main.c"
"wifi.c"
"uart.c"
"cli.c"
"net.c"
"packed_fs.c"
"mongoose.c")
component_compile_options(-DMG_ENABLE_LINES=1)
component_compile_options(-DMG_ENABLE_PACKED_FS=1)
component_compile_options(-DUART_API_IMPLEMENTED=1)
+94
View File
@@ -0,0 +1,94 @@
#include "main.h"
static void cli_wifi(const char *ssid, const char *pass) {
if (wifi_init(ssid, pass)) {
mg_file_printf(&mg_fs_posix, WIFI_FILE, "{%m:%m,%m:%m}\n", mg_print_esc, 0,
"ssid", mg_print_esc, 0, ssid, mg_print_esc, 0, "pass",
mg_print_esc, 0, pass);
MG_INFO(("Reboot now"));
}
}
static void cli_ls(void) {
DIR *dirp = opendir(FS_ROOT);
struct dirent *dp;
if (dirp == NULL) {
MG_ERROR(("Cannot open FS: %d", errno));
} else {
while ((dp = readdir(dirp)) != NULL) {
/* Do not show current and parent dirs */
if (strcmp((const char *) dp->d_name, ".") == 0 ||
strcmp((const char *) dp->d_name, "..") == 0) {
continue;
} else {
printf("%s\n", dp->d_name);
}
}
closedir(dirp);
}
}
static void cli_cat(const char *fname) {
char path[MG_PATH_MAX];
snprintf(path, sizeof(path), "%s/%s", FS_ROOT, fname);
FILE *fp = fopen(path, "r");
if (fp != NULL) {
int ch;
while ((ch = fgetc(fp)) != EOF) putchar(ch);
fclose(fp);
}
}
static void cli_rm(const char *fname) {
char path[100];
snprintf(path, sizeof(path), "%s/%s", FS_ROOT, fname);
remove(path);
}
static struct mg_iobuf in;
void cli(uint8_t input_byte) {
if (input_byte == 0 || input_byte == 0xff) return;
if (in.len >= 128) in.len = 0;
mg_iobuf_add(&in, in.len, &input_byte, sizeof(input_byte));
if (input_byte == '\n') {
const char *arrow = "---";
char buf0[10], buf1[50], buf2[250];
in.buf[in.len] = '\0';
buf0[0] = buf1[0] = buf2[0] = '\0';
sscanf((char *) in.buf, "%9s %49s %249[^\r\n]", buf0, buf1, buf2);
printf("%s CLI command: '%s'\n", arrow, buf0);
if (strcmp(buf0, "reboot") == 0) {
esp_restart();
} else if (strcmp(buf0, "ls") == 0) {
cli_ls();
} else if (strcmp(buf0, "cat") == 0) {
cli_cat(buf1);
} else if (strcmp(buf0, "rm") == 0) {
cli_rm(buf1);
} else if (strcmp(buf0, "reboot") == 0) {
esp_restart();
} else if (strcmp(buf0, "ll") == 0) {
mg_log_set(atoi(buf1));
} else if (strcmp(buf0, "wifi") == 0) {
cli_wifi(buf1, buf2);
} else {
printf("%s %s\n", arrow, "Unknown command. Usage:");
printf("%s %s\n", arrow, " set NAME VALUE");
printf("%s %s\n", arrow, " rm FILENAME");
printf("%s %s\n", arrow, " cat FILENAME");
printf("%s %s\n", arrow, " ls");
printf("%s %s\n", arrow, " reboot");
printf("%s %s\n", arrow, " wifi WIFI_NET WIFI_PASS");
}
printf("%s %s\n", arrow, "CLI output end");
in.len = 0;
}
}
void cli_init(void) {
mg_iobuf_init(&in, 0, 32);
}
+50
View File
@@ -0,0 +1,50 @@
// Copyright (c) 2020 Cesanta Software Limited
// All rights reserved
#include "main.h"
const char *s_listening_url = "http://0.0.0.0:80";
char *config_read(void) {
return mg_file_read(&mg_fs_posix, FS_ROOT "/config.json", NULL);
}
void config_write(struct mg_str config) {
mg_file_write(&mg_fs_posix, FS_ROOT "/config.json", config.ptr, config.len);
}
void app_main(void) {
// Mount filesystem
esp_vfs_spiffs_conf_t conf = {
.base_path = FS_ROOT, .max_files = 20, .format_if_mount_failed = true};
int res = esp_vfs_spiffs_register(&conf);
MG_INFO(("FS at %s initialised, status: %d", conf.base_path, res));
// Try to connect to wifi by using saved WiFi credentials
char *json = mg_file_read(&mg_fs_posix, WIFI_FILE, NULL);
if (json != NULL) {
char *ssid = mg_json_get_str(mg_str(json), "$.ssid");
char *pass = mg_json_get_str(mg_str(json), "$.pass");
while (!wifi_init(ssid, pass)) (void) 0;
free(ssid);
free(pass);
free(json);
} else {
// If WiFi is not configured, run CLI until configured
MG_INFO(("WiFi is not configured, running CLI. Press enter"));
cli_init();
for (;;) {
uint8_t ch = getchar();
cli(ch);
usleep(10000);
}
}
// Connected to WiFi, now start HTTP server
struct mg_mgr mgr;
mg_mgr_init(&mgr);
mg_log_set(MG_LL_DEBUG); // Set log level
MG_INFO(("Mongoose v%s on %s", MG_VERSION, s_listening_url));
mg_http_listen(&mgr, s_listening_url, uart_bridge_fn, &mgr);
for (;;) mg_mgr_poll(&mgr, 10); // Infinite event loop
}
+18
View File
@@ -0,0 +1,18 @@
#pragma once
#include "mongoose.h"
#include "driver/gpio.h"
#include "driver/uart.h"
#include "esp_spiffs.h"
#include "freertos/FreeRTOS.h"
#define FS_ROOT "/spiffs"
#define WIFI_FILE FS_ROOT "/wifi.json"
#define UART_NO 1
void uart_bridge_fn(struct mg_connection *, int, void *, void *);
int uart_read(void *buf, size_t len);
bool wifi_init(const char *ssid, const char *pass);
void cli(uint8_t ch);
void cli_init(void);
+1
View File
@@ -0,0 +1 @@
../../../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../../../mongoose.h
+1
View File
@@ -0,0 +1 @@
../../../uart-bridge/net.c
+1
View File
@@ -0,0 +1 @@
../../../uart-bridge/packed_fs.c
+44
View File
@@ -0,0 +1,44 @@
#include "main.h"
int uart_close(int no) {
return uart_driver_delete(no);
}
int uart_open(int no, int rx, int tx, int cts, int rts, int baud) {
uart_config_t uart_config = {
.baud_rate = baud,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = cts > 0 && rts > 0 ? UART_HW_FLOWCTRL_CTS_RTS
: cts > 0 ? UART_HW_FLOWCTRL_CTS
: rts > 0 ? UART_HW_FLOWCTRL_RTS
: UART_HW_FLOWCTRL_DISABLE,
};
int e1 = uart_param_config(no, &uart_config);
int e2 = uart_set_pin(no, tx, rx, rts, cts);
int e3 =
uart_driver_install(no, UART_FIFO_LEN * 2, UART_FIFO_LEN * 2, 0, NULL, 0);
MG_INFO(("%d: %d/%d/%d, %d %d %d", no, rx, tx, baud, e1, e2, e3));
if (e1 != ESP_OK || e2 != ESP_OK || e3 != ESP_OK) return -1;
return no;
}
void uart_init(int tx, int rx, int baud) {
uart_open(UART_NO, rx, tx, -1, -1, baud);
}
int uart_read(void *buf, size_t len) {
size_t x = 0;
int no = UART_NO;
if (uart_get_buffered_data_len(no, &x) != ESP_OK || x == 0) return 0;
int n = uart_read_bytes(no, buf, len, 10 / portTICK_PERIOD_MS);
MG_DEBUG(("%d bytes: [%.*s]", n, n, (char *) buf));
return n;
}
int uart_write(const void *buf, int len) {
int no = UART_NO;
MG_DEBUG(("%d bytes: [%.*s]", len, len, (char *) buf));
return uart_write_bytes(no, (const char *) buf, len);
}
+108
View File
@@ -0,0 +1,108 @@
// Code taken from the ESP32 IDF WiFi station Example
#include <string.h>
#include "esp_event.h"
#include "esp_log.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "freertos/task.h"
#include "nvs_flash.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#include "mongoose.h"
static EventGroupHandle_t s_wifi_event_group;
/* The event group allows multiple bits for each event, but we only care about
* two events:
* - we are connected to the AP with an IP
* - we failed to connect after the maximum amount of retries */
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
static int s_retry_num = 0;
static void event_handler(void *arg, esp_event_base_t event_base,
int32_t event_id, void *event_data) {
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
esp_wifi_connect();
} else if (event_base == WIFI_EVENT &&
event_id == WIFI_EVENT_STA_DISCONNECTED) {
if (s_retry_num < 3) {
esp_wifi_connect();
s_retry_num++;
MG_INFO(("retry to connect to the AP"));
} else {
xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT);
}
MG_ERROR(("connect to the AP fail"));
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t *event = (ip_event_got_ip_t *) event_data;
MG_INFO(("IP ADDRESS: " IPSTR ". Go to:", IP2STR(&event->ip_info.ip)));
MG_INFO(("http://" IPSTR, IP2STR(&event->ip_info.ip)));
s_retry_num = 0;
xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
}
}
bool wifi_init(const char *ssid, const char *pass) {
bool result = false;
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
esp_event_handler_instance_t instance_any_id;
esp_event_handler_instance_t instance_got_ip;
ESP_ERROR_CHECK(esp_event_handler_instance_register(
WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL, &instance_any_id));
ESP_ERROR_CHECK(esp_event_handler_instance_register(
IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL, &instance_got_ip));
wifi_config_t c = {.sta = {.threshold = {.authmode = WIFI_AUTH_WPA2_PSK},
.pmf_cfg = {.capable = true, .required = false}}};
snprintf((char *) c.sta.ssid, sizeof(c.sta.ssid), "%s", ssid);
snprintf((char *) c.sta.password, sizeof(c.sta.password), "%s", pass);
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &c));
ESP_ERROR_CHECK(esp_wifi_start());
MG_DEBUG(("wifi_init_sta finished."));
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
WIFI_CONNECTED_BIT | WIFI_FAIL_BIT,
pdFALSE, pdFALSE, portMAX_DELAY);
if (bits & WIFI_CONNECTED_BIT) {
MG_INFO(("connected to ap SSID:%s", ssid));
result = true;
} else if (bits & WIFI_FAIL_BIT) {
MG_ERROR(("Failed to connect to SSID:%s, password:%s", ssid, pass));
} else {
MG_ERROR(("UNEXPECTED EVENT"));
}
/* The event will not be processed after unregister */
ESP_ERROR_CHECK(esp_event_handler_instance_unregister(
IP_EVENT, IP_EVENT_STA_GOT_IP, instance_got_ip));
ESP_ERROR_CHECK(esp_event_handler_instance_unregister(
WIFI_EVENT, ESP_EVENT_ANY_ID, instance_any_id));
vEventGroupDelete(s_wifi_event_group);
return result;
}
View File
Whitespace-only changes.
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
storage, data, spiffs, 0x10000, 0x10000,
factory, app, factory, 0x100000, 1M,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x6000
3 phy_init data phy 0xf000 0x1000
4 storage data spiffs 0x10000 0x10000
5 factory app factory 0x100000 1M
@@ -0,0 +1,4 @@
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
#CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
@@ -0,0 +1,45 @@
THISDIR = $(realpath $(CURDIR))
ROOTDIR = $(realpath $(CURDIR)/../../..)
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266
CMD ?= make -C src defconfig app
PORT ?= /dev/ttyUSB0
all: example
example:
true
build: Makefile $(wildcard src/main/*)
$(DOCKER) $(CMD)
flash:
flash: CMD = python /esp/components/esptool_py/esptool/esptool.py \
--chip esp8266 --port $(PORT) --baud 115200 --before default_reset \
--after hard_reset write_flash -z --flash_mode dio --flash_freq 40m \
--flash_size 2MB 0x10000 $(THISDIR)/src/build/mongoose-example.bin
flash: DA = --device $(PORT)
flash: build
buildall:
buildall: CMD = make -C src all
buildall: build
flashall:
flashall: CMD = python /esp/components/esptool_py/esptool/esptool.py \
--chip esp8266 --port $(PORT) --baud 115200 --before default_reset \
--after hard_reset write_flash -z --flash_mode dio --flash_freq 40m \
--flash_size 2MB 0x0 $(THISDIR)/src/build/bootloader/bootloader.bin \
0x10000 $(THISDIR)/src/build/mongoose-example.bin \
0x8000 $(THISDIR)/src/build/partitions_singleapp.bin
flashall: DA = --device $(PORT)
flashall: build
monitor:
monitor: CMD = /esp/tools/idf_monitor.py --port $(PORT) $(THISDIR)/src/build/mongoose-example.elf
monitor: build
.PHONY: build
clean:
test -d src/build && $(DOCKER) rm -rf src/build || true
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/esp8266/http-client-server/
Loaded 100 of 1731 files, more files were not shown because too many files have changed in this diff. Show more