49 Commits
Author SHA1 Message Date
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
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
Dmitry Frank 0fc3370859 First step towards separate userdata argument
PUBLISHED_FROM=93fe1cc2c5e2513509511a81e5919cbd37056b10
2017-03-15 00:52:59 +00:00
Marko Mikulicic 1889e12b54 Support username:pass authority in HTTP/WS urls
PUBLISHED_FROM=39a1c2a271c5cd961670e11c830105c17ba0b2e4
2016-11-10 11:21:43 +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 7f4e2a93d0 Sort docs API entries alphabetically
PUBLISHED_FROM=73ef8ae768585d3c204e6e022848f49e8f4a8de2
2016-10-26 08:28:07 +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
Sergey Lyubka 12437fd7fe Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
2016-09-01 14:35:02 +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
Dmitry Frank 849ec1684a Apply Mongoose docs edits by Ev
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
2016-07-26 15:06:04 +00: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
Sergey Lyubka 810eab9a58 Add SSI doc string
PUBLISHED_FROM=73540bf103672916eae35959d5e992a3616a6604
2016-07-20 11:07:37 +00: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 4ac688e560 Make mg_http_check_digest_auth() public
PUBLISHED_FROM=f00b94cabc2a89d27d5bc78d68d67db0930811b4
2016-05-16 13:57: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
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 afa5e3f469 Enable SSL in SJ/WS
PUBLISHED_FROM=d7b3e083c7a7d5095c8e61bb6183ae7e6e068858
2016-04-05 23:50:16 +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
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