Commit Graph
227 Commits
Author SHA1 Message Date
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
Sergey Lyubka cec06eb25c Introduce MG_EV_HTTP_HDRS 2024-03-01 23:29:12 +00:00
robert c59bf6613a HTTP: respond to messages which have no explicit lengths 2024-02-28 04:01:39 -05:00
Sergio R. Caprile 1c114a279e fix wrong MIME type for custom 404 2024-02-20 19:08:07 -03:00
Sergey Lyubka 2419f02766 Fix #2592: do not close pipelined connection prematurely 2024-02-11 09:05:19 +00:00
Sergey Lyubka 936e7bbc88 mg_split -> mg_span. Remove mg_commalist 2024-02-04 09:26:42 +00:00
Sergey Lyubka e0668bc1c0 Allow user specify file in mg_http_upload 2024-02-04 08:56:32 +00:00
Sergey Lyubka 6b0e4a425d Fix #2552 - reject requests with invalid/absent chunk length 2024-01-20 09:35:01 +00:00
Sergio R. Caprile deca1aaf46 remove fn_data from event handler signature 2024-01-09 14:51:19 -03:00
Sergey Lyubka 744df7b244 Better checks in skip_chunk() 2023-12-29 11:59:02 +00:00
Sergey Lyubka a0e66fb9e6 Add built-in TLS 1.3 stack: server side, EC support 2023-12-20 11:04:31 +00:00
cpq 4c445453d3 Fix #2460 - sanity check of the Transfer-Encoding: chunked header 2023-12-01 11:24:32 +00:00