Commit Graph

647 Commits

Author SHA1 Message Date
An Tao
043c484a64
Make the framework API support chained calls (#223) 2019-08-24 14:44:25 +08:00
An Tao
c3cb70f415
Optimize performance (#222) 2019-08-24 13:12:04 +08:00
An Tao
b5a142a10e
Fix bugs in default return values of functions (#220) 2019-08-22 22:23:50 +08:00
An Tao
f940b6f2cd
Modify some stuff (#216) 2019-08-17 20:05:32 +08:00
An Tao
a6e2d4f007
Modify the drogon_ctl (#213) 2019-08-16 13:11:21 +08:00
An Tao
da285cd4d2
Reduce dependencies between declarations (#212) 2019-08-15 20:59:16 +08:00
An Tao
673d74191e
Optimize DNS in HttpClient and WebSocketClient (#211) 2019-08-14 04:03:29 +08:00
An Tao
a0f5570f8b
Modify HttpClient and WebSocketClient (#210) 2019-08-13 17:32:52 +08:00
An Tao
982e272703
Modify HttpClient and WebSocketClient, using the asynchronous DNS method (#209) 2019-08-13 10:35:01 +08:00
An Tao
c705990fe5
Add the DrogonConfig.cmake (#207)
Add DrogonConfig.cmake so that users can use drogon with the `find_package(Drogon)` command.
2019-08-08 15:17:09 +08:00
An Tao
60ecbb945e
Optimizations (#206) 2019-08-03 01:59:54 +08:00
An Tao
e566d9c451
Support PostgreSQL batch mode (#203) 2019-08-01 13:01:54 +08:00
An Tao
ba7d788184
Add options for 'Server' header and 'Date' header (#202) 2019-07-31 19:44:32 +08:00
antao
40087fba9c Remove config.h
Modify the CMakeLists.txt

Remove the USE_ORM macro

Update trantor

Remove some std::dynamic_pointer_cast calls
2019-07-29 14:53:41 +08:00
VayuDev
c8a22127d5 Added missing wasm ContentType (#198) 2019-07-27 00:42:19 +08:00
An Tao
986ef8dda7
Optimize pipelining (#197)
* Optimize pipelining

* Optimize the DbClientLockFree class
2019-07-25 16:30:42 +08:00
An Tao
33577b9666
Format some files for good code style (#196) 2019-07-16 20:00:20 +08:00
An Tao
9af87bb1c0
Add some managers to reduce the size of the HttpAppFrameworkImpl code (#194) 2019-07-12 16:47:21 +08:00
An Tao
6e8c718a52
Modify some comments in simple_example (#193) 2019-07-11 19:39:23 +08:00
antao
7d7537b562 Make all listeners share IO threads in the MacOS system 2019-07-09 17:23:06 +08:00
antao
7b31671576 Add the setContentTypeCodeAndCustomString() method to the HttpResponse class 2019-07-09 09:37:04 +08:00
antao
bcac1d4899 Make the number of the connections of Fast DB Clients configurable 2019-07-08 18:21:18 +08:00
antao
47c6bc20f4 Optimize the htmlTranslate method 2019-07-08 13:49:01 +08:00
antao
07c0f7571b Modify the handling of CORS 2019-07-04 19:51:28 +08:00
moneroexamples
5618fdaee8 uses default constructor of string_view to reset _statusMessage 2019-06-29 19:20:42 +08:00
antao
65173e7e97 Update trantor 2019-06-27 15:37:41 +08:00
antao
eafe88cef1 Modify the parser of HTTP requests 2019-06-27 12:51:32 +08:00
antao
a84b559ae9 Add some comments to the WebSocketConnection class 2019-06-18 17:00:03 +08:00
antao
bcc46e12ea Fix a bug of the IsPlugin class 2019-06-17 14:36:42 +08:00
antao
ad2a27e849 Add stress testing command to drogon_ctl 2019-06-14 09:04:59 +08:00
an-tao
7c518594d0 Add setBody methods to the HttpRequest class 2019-06-11 21:48:16 +08:00
antao
9f779f2636 Update CacheFile class to adapt linux 2019-06-06 16:51:12 +08:00
antao
e714ae875e Use a temporary file instead of memory to store a large Http body recieved by drogon 2019-06-06 14:59:49 +08:00
antao
cdcddc8ddb Modify containers of AOP 2019-06-05 09:28:39 +08:00
antao
335f852aab Add some necessary headers in preflight responses for CORS 2019-06-01 07:11:47 +08:00
antao
01b1fb32d6 Add some new overload versions of the getHandlerArgumentValue() function 2019-05-31 16:44:19 +08:00
antao
92e64a79ec Fix a bug that occurs when a path argument contains spaces 2019-05-31 09:43:23 +08:00
antao
3452a2fa1c Modify some code to get a good style 2019-05-23 18:57:45 +08:00
antao
fc7505122f Update the submodule trantor 2019-05-23 16:07:08 +08:00
antao
c17591ef49 Make some inline functions out-line 2019-05-23 10:47:15 +08:00
antao
a4c0e33782 Make the HttpClient class support cookies 2019-05-21 22:10:05 +08:00
antao
bf7a612069 Add the StaticFileRouter class 2019-05-20 15:16:28 +08:00
antao
11b6d20a69 clang-format 2019-05-18 20:39:57 +08:00
antao
e5fe92c67a Change the line length limit to 80 characters 2019-05-18 11:11:45 +08:00
antao
be08aba9d1 Add .clang-format 2019-05-17 22:49:09 +08:00
antao
bb0acd341f Modify the HttpRequestParser class to improve performance 2019-05-16 17:29:37 +08:00
antao
04a92f2b54 Remove unused InnerIpFilter.cc 2019-05-16 16:39:36 +08:00
antao
3e1886a84e Add the forward() method to the framework 2019-05-09 16:27:39 +08:00
antao
e696553b3d Change the callback type in Filters and AOP Advices to the r-reference type 2019-05-09 13:57:33 +08:00
antao
00049c0d23 Change the type of the callback in HTTP request handlers to r-reference type 2019-05-09 11:25:25 +08:00
antao
66c6441c96 Return index.html to the client requesting '/' 2019-05-07 23:19:26 +08:00
antao
c48f2ca118 Disable cookies on 404 pages 2019-05-07 22:08:05 +08:00
antao
a85c64ac69 Add two configuration options: the client_max_body_size and the client_max_websocket_message_size 2019-05-07 14:04:37 +08:00
antao
0a27394cca Change version to 0.9.33 2019-05-05 15:43:17 +08:00
antao
2efa183b93 Implement gzip_static 2019-05-03 14:44:20 +08:00
antao
e48692939c Modify some interfaces 2019-04-29 14:47:23 +08:00
antao
78ff8a1837 Add the content() method into the HttpRequest class 2019-04-28 18:14:39 +08:00
an-tao
87c51d1b53 Check whether the port is in use 2019-04-27 14:45:06 +08:00
antao
0b96089a0a Update the submodule trantor 2019-04-27 12:17:46 +08:00
antao
0e14406b31 Modify shared library loading 2019-04-26 13:43:59 +08:00
antao
4116888880 Handle demangle error 2019-04-26 11:02:20 +08:00
antao
8d1617d1a7 Update the submodule trantor 2019-04-24 18:04:32 +08:00
antao
189c537c29 Support host strings with IPv6 address in the HttpClient class 2019-04-24 16:48:03 +08:00
antao
32c14631fa Add the getHandlersInfo() method 2019-04-24 14:38:07 +08:00
antao
863084f26a Add a diagram for AOP join points 2019-04-22 16:11:28 +08:00
an-tao
f6411812d5 Modify AOP 2019-04-18 23:18:13 +08:00
antao
1bc07c5197 Add support for AOP 2019-04-18 18:37:31 +08:00
antao
e517f07685 Add some methods using std::chrono_literals 2019-04-14 14:02:37 +08:00
antao
d5e8bd0b73 Add the OPTIONS method for CORS 2019-04-12 21:45:43 +08:00
antao
1e6a532ed3 Add the setCustom404Page() method 2019-04-09 11:03:16 +08:00
antao
e87c9a75f6 Modify the implementation of WebSocket 2019-04-08 16:37:24 +08:00
antao
6af398ff5a Add FastDbClient instances into the main event loop 2019-04-07 13:49:35 +08:00
antao
3a587ab90b Modify the pipeling test 2019-04-07 12:15:02 +08:00
antao
b96eb04859 Add WebSocket client support 2019-04-07 00:46:22 +08:00
antao
66c518949d Make WebSocket suitable for Firefox browser 2019-04-05 13:33:02 +08:00
antao
d2bb1c10a7 Fix a websocket issue in Linux 2019-04-05 11:36:04 +08:00
antao
62fad73bc9 Enhance HttpClient to support pipelining 2019-04-05 01:50:29 +08:00
an-tao
e128a27c58 Modifying URL encoding of HTTP requests 2019-04-03 00:17:30 +08:00
antao
d216a663aa Modify the HttpController template to be able to specify absolute paths in HttpController 2019-03-31 19:32:16 +08:00
antao
737c9bba8b Provides a way for users to create and initialize controllers and filters with non-default constructors. 2019-03-30 23:09:22 +08:00
antao
aad06fdc3a Add support for plugins 2019-03-29 15:34:14 +08:00
antao
65c101bee0 Add the getLoop() method to the HttpAppFramework class 2019-03-26 10:45:39 +08:00
antao
d12b49cab0 Remove the loop() interface 2019-03-25 20:32:35 +08:00
antao
66456eae1a 1. Add the getCustomCOnfig() method.
2. Add some comments.
2019-03-25 17:44:22 +08:00
antao
894b634b22 Adjust the execution order inside the run() method
Modify the configuration of fast database clients
Modify the ConfigLoader class
2019-03-23 11:26:21 +08:00
antao
db72840fc2 Move utility functions to the utils namespace 2019-03-21 17:47:45 +08:00
antao
fecec81975 1.Remove an unnecessary null pointer check
2.Fix a compilation error for older g++
    3.Update README.md
2019-03-20 11:46:27 +08:00
antao
7ae533671c Add matchedPathPattern() interface in the HttpRequest class
Change version to 0.9.31
2019-03-18 10:44:38 +08:00
antao
afdb7d26da Fix a compilation warning 2019-03-17 21:09:05 +08:00
antao
db266d9aad Modify HttpRequestParser to handle invalid requests 2019-03-15 16:55:36 +08:00
antao
053c760d27 Rename the InnerIpFilter class 2019-03-14 11:25:12 +08:00
an-tao
0e447a1f9e Adapt ipv6 2019-03-13 23:44:53 +08:00
antao
250781ac08 Add configuration options that limit the number of keep-alive requests 2019-03-12 18:22:13 +08:00
antao
aa539f85cd Modify some functions 2019-03-12 13:52:10 +08:00
antao
801cb8aa35 Modify some database classes 2019-03-07 11:56:20 +08:00
antao
b39dd52a87 Modify some comments 2019-03-06 15:57:05 +08:00
antao
2e24d8c7f5 Optimize the 'setMethod' function in the HttpRequestImpl class 2019-03-06 12:51:29 +08:00
antao
1e1bcbf781 Remove unnecessary comparisons from regular expression matching and change version to 0.9.28 2019-03-05 11:19:10 +08:00
antao
7232536aee Delay parsing parameters untils needed 2019-03-05 11:08:14 +08:00
an-tao
bbd840bd3b Modify the httpserver class to support processing multiple requests at once 2019-03-04 23:17:29 +08:00
antao
56ae5f459f Do some optimization 2019-03-02 12:25:08 +08:00
antao
e0147fac8b Add an interface to set the 'Server' header field 2019-03-02 09:27:45 +08:00
an-tao
0f51ac56c0 Fix a new bug in last commit 2019-03-01 18:30:51 +08:00
antao
c06affed2a Update the submodule trantor 2019-03-01 18:12:20 +08:00
antao
6d16877e7b Add the getParameter() method into the HttpRequest class 2019-02-27 14:29:50 +08:00
antao
49c03ee707 Add htmlTranslate() method 2019-02-27 10:36:03 +08:00
antao
bb686d41d8 Use experimental::basic_string_view on gcc5 2019-02-23 01:02:14 +08:00
antao
4d46ebed9b Add some comments 2019-02-22 18:00:25 +08:00
antao
70e7089e7d Process the HEAD method request 2019-02-22 14:03:34 +08:00
antao
aab31ba64e Modify the HttpServer class 2019-02-21 14:02:05 +08:00
an-tao
450e5c5e0c Use std::string_view to improve performance 2019-02-20 23:32:00 +08:00
antao
4d1c0ffe06 Optimize content-type and status in http header 2019-02-20 18:16:55 +08:00
antao
7f21f45a1b Add the fast db client enablation option 2019-02-20 13:23:50 +08:00
antao
ca98eccdfe Disable db fast clients 2019-02-19 10:08:00 +08:00
antao
358e45598b Add lock-free db client class 2019-02-18 18:42:10 +08:00
antao
8829203d04 Modify the Session class and the HttpViewData class 2019-02-12 15:47:32 +08:00
antao
2d3ff02e03 Add some comments 2019-02-12 13:18:59 +08:00
antao
a44a0fc3e8 Add some comments 2019-02-04 14:48:36 +08:00
antao
e7dbb3bbc5 Remove 'using namespace drogon' from public headers 2019-02-02 13:45:40 +08:00
antao
bdcb42ce55 Merge branch 'master' of https://github.com/an-tao/drogon 2019-02-02 13:31:10 +08:00
antao
e77b558a71 Modify urlDecode() method 2019-02-02 13:26:19 +08:00
an-tao
287a7b5208 Add a header including in linux 2019-02-02 12:09:14 +08:00
antao
7b6211f2ce Modify code style 2019-02-02 11:47:28 +08:00
antao
7041783579 Modify code style 2019-02-02 11:34:00 +08:00
antao
5b24e90f94 Modify README 2019-02-02 10:12:57 +08:00
antao
82100926e5 Change version to 0.9.24 2019-02-01 18:59:13 +08:00
antao
d16287c9dd Remove spin-locks 2019-02-01 18:00:34 +08:00
antao
ad86c8f66e Modify the SpinLock 2019-02-01 00:32:35 +08:00
antao
7bdd421917 Format code 2019-01-31 15:48:04 +08:00
antao
1746e36eb4 1.Update the submodule trantor;
2.Optimize the logic of connection counting;
2019-01-31 14:12:01 +08:00
antao
022132c33e Add json format response benchmark 2019-01-31 10:23:12 +08:00
antao
5b3049e854 Add a macro 2019-01-30 15:08:35 +08:00
an-tao
acd56f2cee Add memory order to the list of clear() parameters 2019-01-30 13:09:48 +08:00
antao
245faabfce Use the user space spinlock for performance reasons 2019-01-30 12:27:16 +08:00
antao
6ebae287a3 Make the 'any' works correctly with either C++17 or C++14 2019-01-30 09:37:30 +08:00
an-tao
cbbee440ea Compatible with older versions of gcc 2019-01-29 22:24:32 +08:00
antao
35d98576f1 Change version to 0.9.22 2019-01-29 18:03:15 +08:00
antao
55ba4c5196 Support file upload requests 2019-01-29 17:38:55 +08:00
antao
075e3cc6b3 Modify the newFileResponse method 2019-01-29 10:49:37 +08:00
antao
cdd8ba380e 1. Modify the HttpClientImpl class to fix some bugs;
2. Support attachment download;
2019-01-28 18:25:04 +08:00
antao
cef7dc177e Optimize file upload 2019-01-27 15:59:56 +08:00
antao
a5684c66d3 Fix reference count error in HttpClientImpl class 2019-01-25 19:48:24 +08:00
antao
3f4baf15f1 Optimize filters and controllers 2019-01-25 16:46:20 +08:00
antao
a22fe4ff51 Split filter processing from HttpAppFrameworkImpl class;Change version 2019-01-25 13:14:22 +08:00
antao
5e8c8a6666 Change some variable names;Use reference capture instead of value capture 2019-01-24 18:37:32 +08:00
antao
a3f03df1d4 Update the submodule trantor; optimize the HttpSimpleControllerRouter 2019-01-24 16:20:44 +08:00
antao
4204ad733f Update the submodule trantor 2019-01-23 19:05:15 +08:00
antao
8b2bb4796d Use the lock-free queue in the submodule trantor 2019-01-23 17:05:43 +08:00
antao
615924c889 Debug form post request 2019-01-23 11:32:55 +08:00
antao
7c8432add0 Support http request in json format 2019-01-22 23:00:14 +08:00
antao
c62840e712 Modify setMethod of the HttpRequest class 2019-01-22 14:24:52 +08:00
antao
8b7d5465cd Modify HttpRequestImpl 2019-01-22 13:38:55 +08:00
an-tao
d5d90d2f6f Modify code style 2019-01-21 23:59:28 +08:00
an-tao
ef389b6ec9 Organize code style 2019-01-21 22:25:20 +08:00
an-tao
b20114a9d5 Organize code style 2019-01-21 21:28:46 +08:00
antao
a9e9ced331 Use references instead of values in range-based for loop 2019-01-21 17:39:31 +08:00
an-tao
827a60f8de Add a header file including 2019-01-21 13:44:50 +08:00
antao
856aedbf47 Support gzip on the client side 2019-01-21 13:37:53 +08:00
antao
c4591fc11d Remove an unused file 2019-01-20 12:11:39 +08:00
antao
ec7e8a1040 Forbid to download files from the parent folder 2019-01-19 22:57:07 +08:00
antao
38e8148b56 Add a test client for the simple example 2019-01-19 12:26:03 +08:00
antao
2094ce217a Optimize routing 2019-01-19 01:31:14 +08:00
antao
c4987f690b Optimize routing algorithm 2019-01-18 17:42:46 +08:00
antao
89c5e4e6e6 Minor edits 2019-01-18 10:30:39 +08:00
antao
ab6faf3376 Add some comments 2019-01-18 10:30:39 +08:00
antao
38966e09d4 Split the HttpAppFrameworkImpl class 2019-01-17 13:51:25 +08:00
an-tao
5c96c4e6a2 Modifying the routing algorithm of HTTP controllers 2019-01-17 00:12:58 +08:00
antao
f36ccf851d Modify the getObj() function template 2019-01-16 19:26:45 +08:00
antao
0b53021358 Modify the HttpBinder class template 2019-01-16 18:39:48 +08:00
antao
01de7f4f1e Remove expired filter classes 2019-01-16 10:03:11 +08:00
antao
0b4fd04228 Modify the genRandomString() function 2019-01-14 17:11:32 +08:00
an-tao
2d80158152 Modify the createDbClient method 2019-01-12 11:10:51 +08:00
antao
e8c7cf3c72 Modify the createDbClient() method 2019-01-10 13:24:03 +08:00
antao
5f108b510d Name threads 2019-01-09 16:23:34 +08:00
antao
ac90c80710 Use multiple event loops in the db client 2019-01-09 10:46:58 +08:00
antao
fe079a4f7e Fix a bug in the HttpServer class 2019-01-08 09:41:38 +08:00
an-tao
6a4f38bdaf Use any::reset() 2019-01-07 21:19:51 +08:00
an-tao
ee2517c52b Fix a bug of Null ptr 2019-01-07 18:50:56 +08:00
antao
5ea972e5b3 Modify the signature of the createDbClient() method 2019-01-07 16:26:58 +08:00
an-tao
8cfdd0424f Fix a compiler warning 2019-01-07 15:25:29 +08:00
antao
1ae7ec6058 Optimize the urlDecode() method 2019-01-07 14:43:06 +08:00
antao
6b854ffe6f Fix a bug on COW of the std::string class 2019-01-07 13:34:37 +08:00
an-tao
299ea8d408 Fix a compiler bug in CentOS 2019-01-06 12:26:34 +08:00
an-tao
fc8e92e131 Modify setPath() 2019-01-04 18:34:27 +08:00
antao
70b0828c17 Optimize the parseParameter() method 2019-01-04 17:30:37 +08:00
antao
c2cf4a7fe7 Format files 2019-01-03 22:15:59 +08:00
an-tao
8908c021a9 Fix compiler warnings in Linux 2019-01-03 22:07:35 +08:00
antao
b71f3c43d9 Optimize the getHeader method 2019-01-03 21:27:09 +08:00
antao
680fc28967 Rename some variables 2019-01-03 15:00:08 +08:00
antao
f7b853e96c Update the submodule trantor 2019-01-03 13:31:12 +08:00
antao
f35ff6347a Format some files 2019-01-02 18:49:37 +08:00
antao
159b5cebdd Adjustment critical section 2019-01-02 18:33:18 +08:00
antao
1afb027f2f Modify HttpAppFrameworkImpl 2019-01-02 17:46:16 +08:00
an-tao
87b6d571fd Fix a compiler warning 2019-01-02 17:07:34 +08:00
antao
5c9799c15a Modify http client for cookies 2019-01-02 16:13:36 +08:00
antao
784eb81014 Use unordered_map 2019-01-02 13:11:19 +08:00
an-tao
1943ad9e12 Fix a compiler warning 2018-12-31 20:06:44 +08:00
antao
38936bde81 Modify Date header strategy 2018-12-31 19:59:57 +08:00
antao
7c15196bac Small adjustment 2018-12-31 19:13:44 +08:00
an-tao
d7aaa3726f Fix a race condition 2018-12-31 18:46:04 +08:00