Commit Graph

82 Commits (b2ce003bcc9d96c566e478eba487c6a362b4c505)

Author SHA1 Message Date
Jianhui Zhao 9ae7b25f84 example.c: Worker processes number is configurable
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-01-03 18:19:44 +08:00
Jianhui Zhao d6868b6ab3 multi-process model: Improve
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-01-03 18:15:06 +08:00
Jianhui Zhao ffa199a647 Support multi-process model
The same multi-process model as Nginx

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-01-03 16:22:47 +08:00
Jianhui Zhao 01bfeb620b OOP: Only expose APIs
Hide the implementation details of the structure

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-01-01 18:16:07 +08:00
Jianhui Zhao 2fd658c347 configure the docroot and index page globally.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-01-01 16:53:14 +08:00
Jianhui Zhao 06e3d76dc9 handler: add new event: UH_EV_HEAD_COMPLETE
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-12-26 17:30:28 +08:00
Jianhui Zhao bdd7727d48 Support IPv6
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-12-20 17:47:45 +08:00
Jianhui Zhao bb9a1d2a34 example.c: fix load plugin path
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-12-18 11:17:14 +08:00
Jianhui Zhao e571a34385 new features: path handler and upload large file
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-12-17 23:32:36 +08:00
Jianhui Zhao ee4dbb367f canonical header files
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-12-12 14:52:27 +08:00
Jianhui Zhao 0b2c2f4a3b Optimizing source tree
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-12-12 14:32:57 +08:00
Jianhui Zhao 28c7e74aa8 Fix memory leak
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-10-06 17:56:01 +08:00
Jianhui Zhao 15c2b53bcb example: ignore SIGPIPE
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-09-08 22:41:03 +08:00
Jianhui Zhao 9410e7eca9 Support reply data defered
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-09-08 22:37:36 +08:00
zhaojh329 96ef9bcda0 Don't const for 'struct uh_str'
Signed-off-by: zhaojh329 <zhaojh329@gmail.com>
2020-09-07 14:31:21 +08:00
zhaojh329 28c8146740 Optimize code and fix gzip encoding
Signed-off-by: zhaojh329 <zhaojh329@gmail.com>
2020-09-07 14:03:01 +08:00
Jianhui Zhao 2844706996 connection: New api: serve_file
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-07-02 10:32:19 +08:00
Jianhui Zhao 2c1b2840b1 example.c: Fix parse argument error
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-07-02 10:09:12 +08:00
Jianhui Zhao 2674d6c9cb Optimize code by use HTTP_STATUS_xx
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-07-01 22:37:58 +08:00
Jianhui Zhao 758b5875c2 connection: New api: get_method and get_method_str
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-07-01 22:25:32 +08:00
Jianhui Zhao 8a9f29958f example.c: Fix code style
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-07-01 17:31:35 +08:00
Jianhui Zhao 43b7160cd9 Fix install path of http_parser.h
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-07-01 14:49:43 +08:00
Fabrice Fontaine 4d0f435e0b fix static build
Add BUILD_SHARED_LIBS and BUILD_STATIC_LIBS to allow the user to build a
static only version

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-04-06 19:01:30 +02:00
Jianhui Zhao 040763a64a Support parse url
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-03-14 14:03:48 +08:00
Jianhui Zhao 5f4f6e0d97 support plugin
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-03-14 00:25:42 +08:00
Jianhui Zhao 2ff3be7dc1 beautify code style
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-03-13 23:09:48 +08:00
Jianhui Zhao 563ad01821 Change the license information
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2019-09-03 15:03:35 +08:00
Jianhui Zhao 471e4fe436 Use libev instead of libubox
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2019-08-31 16:33:08 +08:00
Jianhui Zhao 34e94f6d5e Lua binding: Make the code more robust
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-25 13:19:38 +08:00
Jianhui Zhao deaec21076 Lua binding: Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-25 11:08:59 +08:00
Jianhui Zhao ddf6e8dd86 libuhttpd: New callback: on_accept
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-23 23:42:16 +08:00
Jianhui Zhao f21e2001e1 Lua binding: Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-23 23:29:12 +08:00
Jianhui Zhao 6f756b6d99 Optimization function name
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-23 23:11:43 +08:00
Jianhui Zhao 52f35b9109 Lua binding: Improve performance
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-21 17:37:14 +08:00
Jianhui Zhao 3b1d425d07 More simplly to use
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-21 16:41:19 +08:00
Jianhui Zhao abd7dbb17a example/template.c: dos2unix
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-21 16:09:19 +08:00
Jianhui Zhao 4ae06b8150 Lua binding: New API: `set_log_threshold` and `log`
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-21 13:26:02 +08:00
Jianhui Zhao 8f8a29adc5 Lua binding: New API: set_options
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-19 21:27:51 +08:00
Jianhui Zhao c6441851f6 Lua API: New API: set_error404_cb
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-19 14:03:14 +08:00
Jianhui Zhao dcb397a62c libuhttpd: New API
int uh_server_open(const char *host, int port);
void uh_server_init(struct uh_server *srv, int sock);

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-19 13:35:30 +08:00
Jianhui Zhao 90fad37a4c example:helloworld.c: Fix bug: May be reference a NULL pointer.
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-18 21:51:11 +08:00
Jianhui Zhao f03acc8b5c Lua API: Add function: ssl_init
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-18 16:58:29 +08:00
Jianhui Zhao 64d3036347 Lua API: example: Check whether the query is nil
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-18 14:15:48 +08:00
Jianhui Zhao 87c00d2291 Lua API: Add path field
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-18 14:13:12 +08:00
Jianhui Zhao 365e84fec3 Lua api: Support
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-07-18 14:06:21 +08:00
Jianhui Zhao f6d609dded chmod 644
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-03-18 10:48:32 +08:00
Jianhui Zhao 2210378a91 Fix compile errr when not enable Lua.
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-03-12 10:57:50 +08:00
Jianhui Zhao 379bfd2479 change license to LGPL2
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-03-03 17:33:49 +08:00
Jianhui Zhao 81de054b07 Support Lua template
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-02-13 21:43:35 +08:00
Jianhui Zhao 60e052c6b8 Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2018-01-17 12:57:23 +08:00