Commit Graph

93 Commits (90f38a66942426066dfc870172fe33b5f5ea0e11)

Author SHA1 Message Date
Jianhui Zhao 90f38a6694 Lua template: Improve and optimize
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-09 16:50:23 +08:00
Jianhui Zhao 93705e0853 Fix doc format
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-06 23:22:48 +08:00
Jianhui Zhao 2ab93c9680 Lua template: Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 23:26:36 +08:00
Jianhui Zhao 52f6309844 Lua template: Add the headers variable
Example:

<%for k, v in pairs(_UHTTP["HEADERS"]) do%>
<h1><%=k%>: <%=v%></h1>
<%end%>

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 23:01:44 +08:00
Jianhui Zhao e5e3fcc5dc template.c: Convert the document format to UNIX format.
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 22:57:52 +08:00
Jianhui Zhao 9fea273c7e Update README_ZH.md
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 17:35:24 +08:00
Jianhui Zhao d38f1d1f4b Add test file for Lua template
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 16:53:19 +08:00
Jianhui Zhao e4d8ce13ef Support Lua template
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 16:46:57 +08:00
Jianhui Zhao 4d27dc49ac Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 16:15:55 +08:00
Jianhui Zhao 6bc0e5fa16 new function: uh_get_method(), uh_get_method_str()
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 16:12:37 +08:00
Jianhui Zhao 519559c12f uh_get_con_sock(): New function
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-05 15:52:27 +08:00
Jianhui Zhao cb5cfff75b Update README
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-01 16:50:37 +08:00
Jianhui Zhao 84c0e8eecf Update README
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-01 16:49:02 +08:00
Jianhui Zhao 3cf95b2bc8 Optimizing performance by less memory allocation times
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-12-01 14:17:58 +08:00
Jianhui Zhao 7da483cb1e uh_send_head: fix wrong description
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-30 16:07:28 +08:00
Jianhui Zhao e6ab115754 str.h: Convert its document format to UNIX
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-30 15:00:53 +08:00
Jianhui Zhao 564a545ce8 Fix typo
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-30 08:49:43 +08:00
Jianhui Zhao 5200f78b4c Update README
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-30 08:46:38 +08:00
Jianhui Zhao 3a89216f19 Update README.md
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-30 07:57:56 +08:00
Jianhui Zhao 070c27e1ad Update CONTRIBUTING.md
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-30 07:48:24 +08:00
Jianhui Zhao edd9efc2e5 Bump version to 0.2.1
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-29 17:25:38 +08:00
Jianhui Zhao 7298b27103 Add License to all source files.
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-29 15:48:07 +08:00
Jianhui Zhao 65a66eba9b rename http_parser.c(h) -> parser.c(h)
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-29 14:55:27 +08:00
Jianhui Zhao b0c3acbc13 uh_unescape(): More security
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-29 14:48:50 +08:00
Jianhui Zhao bec72d277d Optimize the function 'uh_get_var()'
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-29 14:42:46 +08:00
Jianhui Zhao 0206340491 Bump version to 0.2.0
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-28 09:57:39 +08:00
Jianhui Zhao 5c9a6a6c80 Remove some debug code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-28 09:56:59 +08:00
Jianhui Zhao a3a2d7bdcb Fix Bug: http parser error
After realloc memory, forgot to correct the mark of the http_parser.

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 22:47:04 +08:00
Jianhui Zhao 52b351f32e Update README
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 13:18:59 +08:00
Jianhui Zhao 257c6a09a6 New function: uh_register_default_hook
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 13:03:47 +08:00
Jianhui Zhao 7ec4490eae Change the names of variables and functions to make them more readable.
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 12:50:38 +08:00
Jianhui Zhao 2f8176bf14 Update README.MD
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 00:11:25 +08:00
Jianhui Zhao 589df6a85b Fix bug: not destroy connection when peer closed
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 00:01:07 +08:00
Jianhui Zhao 6e58dab2b8 More debug
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-27 00:00:51 +08:00
Jianhui Zhao 3f6d941eba More debug
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-26 23:55:42 +08:00
Jianhui Zhao 34d052d4c0 Optimizing http-parser
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-26 23:52:41 +08:00
Jianhui Zhao 650f545c20 Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-26 15:52:39 +08:00
Jianhui Zhao c347496f7b Fix compile error
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-26 15:36:18 +08:00
Jianhui Zhao af2c594e09 Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-26 15:30:37 +08:00
Jianhui Zhao b4ab19016d Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-26 14:19:09 +08:00
Jianhui Zhao 372716a277 Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-25 23:48:09 +08:00
Jianhui Zhao d66de88dfa Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-25 23:31:50 +08:00
Jianhui Zhao 9702ab5851 Optimize code
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-22 23:04:28 +08:00
Jianhui Zhao 32f478f370 Optimize directory organization structure
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-22 22:57:38 +08:00
Jianhui Zhao 9cc3836868 Perfect version information
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-22 21:49:12 +08:00
Jianhui Zhao 6ef276ed77 Perfect version information
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-22 21:43:03 +08:00
Jianhui Zhao 09c950bbac Direct use the source code of http-parser
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-22 14:11:31 +08:00
Jianhui Zhao 2ad01f73ce Update README
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-15 13:21:02 +08:00
Jianhui Zhao 3112b9477e optimize performance
Reduce memory allocation times

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-14 22:17:06 +08:00
Jianhui Zhao f9184839ff New function: uh_unescape()
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2017-11-14 22:16:26 +08:00