Commit Graph
238 Commits
Author SHA1 Message Date
Sergio R. Caprile 9d6d064b39 Merge commit from fork
Check header table bounds
2026-11-09 09:56:57 -03:00
Sergio R. Caprile 26b971b4a8 harden root_dir 2026-10-27 11:09:08 -03:00
cpq 25e2a99d8e Make mg_http_ota_cb public, add /ota endpoints to MCU examples 2026-10-22 14:30:10 +01:00
cpq 71e0176944 Remove c->is_resp, keep it private to http.c 2026-09-30 15:12:54 +01:00
cpq a419e16f26 Remove MG_ENABLE_DIRLIST, add mg_http_serve_opts :: enable_dir_listing 2026-09-26 15:40:43 +01:00
cpq d1060d247b Directory listing as JSON 2026-09-23 15:54:04 +01:00
cpq fa34b7439a Replace mg_http_start_* with streaming uploads 2026-09-22 11:18:48 +01:00
cpq b93cbbeb13 Add mg_http_stream_body() helper for generic streaming uploads 2026-09-21 08:55:04 +01:00
robert 9ddac8faa7 Terminate destination buffer in mg_url_decode 2026-09-01 17:33:56 +03:00
robert 9123330f72 Avoid computing offset twice 2026-09-01 16:39:56 +03:00
robert 07e580d956 Check header table bounds 2026-08-21 15:07:11 +03:00
Sergio R. Caprile 4faa3d5bf1 remove redundant checks 2026-07-29 13:50:32 -03:00
robert 9d3926a25a Improve OTA boundary handling 2026-07-02 12:22:39 +03:00
Sergio R. Caprile a9df523f76 assorted patches 2026-06-23 13:38:35 -03:00
Sergio R. Caprile 07a49a7a2d fix for new path_is_sane treatment of nul 2026-06-23 13:38:16 -03:00
Sergio R. Caprile 74a381ce04 unbreak tests 2026-06-12 14:13:33 -03:00
cpq 27459efc61 Dash OTA dogfooding nits 2026-06-09 11:56:40 +01:00
cpq 67f249c58a Add MG_OTA_{ROLLBACK,STATE_SET,STATE_GET} 2026-05-31 11:02:38 +01:00
cpq 621f893bbc Unify upload API 2026-05-29 07:35:31 +01:00
cpq 8534053e57 Event log 2026-04-25 09:37:09 +01:00
Sergio R. Caprile 9210a762de fix unit tests 2026-04-01 10:30:59 -03:00
Sergio R. Caprile 0d882f1b43 patch 2026-03-31 17:38:04 -03:00
robert 81b61d335f Content-length not required if request body is empty 2026-03-12 05:54:21 -04:00
Sergio R. Caprile 4e8965cce5 do not serve files when closing 2025-12-03 14:25:55 -03:00
Sergio R. Caprile c8291e4ae9 add OOM handling to apps 2025-11-05 14:01:49 -03:00
Sergey Lyubka 9ac09da1d2 Remove mg_http_run_simple_server - move to docs 2025-07-21 14:03:12 +01:00
Sergey Lyubka 24a330c750 Nits 2025-07-20 12:49:58 +01:00
Sergey Lyubka 13a9c773f2 mg_hello -> mg_http_run_simple_server() 2025-07-20 09:36:34 +01:00
Sergio R. Caprile 8bf9d09d96 fix SNTP through proper protocol handler setup 2025-07-11 16:56:12 -03:00
Sergey Lyubka 3a0fe5288c Add MG_ARCH_TREADX 2025-06-16 11:09:41 +01:00
Sergio R. Caprile a801160bc0 collaterals #3140
We prepend current path to the URI, so a tilde could not be the first
char in a path. However, the same would happen for double dots, and
since we're already checking for that, it doesn't hurt to be on the safe
side for future's sake.
2025-05-21 10:43:14 -03:00
Sergey Lyubka 93f36927ca Add .mjs mime type 2025-02-27 16:50:04 +00:00
robert c493d3a4ce Validate HTTP version 2024-12-04 06:34:24 -05:00
Sergio R. Caprile 5c305e7fa8 Fix issuing 411 responses as a client
15.5.12. 411 Length Required

The 411 (Length Required) status code indicates that the server refuses to accept the request without a defined Content-Length (Section 8.6). The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the request content.

fixes #2969
2024-11-21 18:55:16 -03:00
Sergio R. Caprile d37c300d87 Honor c->is_resp with Connection:close 2024-10-10 19:44:09 -03:00
Sergey Lyubka c1b703a039 Detach HTTP handler if MG_EV_HTTP_HDRS changes c->recv 2024-09-18 13:30:27 +01:00
Sergey Lyubka eeecbbcff9 Fix #2871 - accept * in mg_http_serve_opts::mime_types 2024-09-02 06:12:02 +01:00
Sergio R. Caprile be8dbb0dc7 fix 411 not draining header data 2024-07-01 14:38:27 -03:00
Sergio R. Caprile 0356bf6092 resume pipelined reqs after serving a file 2024-06-25 18:30:14 -03:00
Sergio R. Caprile 9974be3fdc handle 'Connection: close' 2024-06-18 10:38:41 -03:00
Sergey Lyubka f9bcffcbd5 Fix #2790 - allow tabs as the HTTP header whitespace 2024-06-17 12:01:32 +01:00
Sergio R. Caprile c911c9ad19 Merge pull request #2752 from cesanta/strip
add mg_str_to_num
2024-05-16 10:58:54 -03:00
Sergey Lyubka ac0e6f3377 Squash warnings on gcc 9.4 2024-05-16 11:13:21 +01:00
Sergio R. Caprile b5443f10c5 add mg_str_to_num 2024-05-15 16:46:31 -03:00
Sergio R. Caprile 23c68e2677 silence fuzzer 2024-05-10 11:12:12 -03:00
Sergio R. Caprile 3c531897b6 cleanup 'str' API 2024-05-09 14:10:27 -03:00
Sergio R. Caprile 6697a2cfaa change mg_path_is_sane() 2024-04-22 11:27:22 -03:00
Sergio R. Caprile ef61d6ea48 remove http_match_uri() 2024-04-17 16:13:10 -03:00
Sergey Lyubka e0e599ffa1 Fix #2612 - struct mg_str::ptr -> buf 2024-04-16 22:42:45 +01:00
Sergey Lyubka 309668ccbc Increase local file buffer size in mg_http_upload() 2024-03-02 10:56:06 +00:00