Commit Graph

481 Commits

Author SHA1 Message Date
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
antao
dd313ab293 Remove a mutex 2018-12-31 12:57:31 +08:00
an-tao
9d8ace0b98 Remove unused variables 2018-12-30 23:45:21 +08:00
antao
bfe07bb79c Modify HttpResponseImpl.cc 2018-12-30 22:37:26 +08:00
antao
f58d73991f Improve transmission efficiency 2018-12-30 22:18:20 +08:00
an-tao
ed70959fe5 Modify the HttpResponseImpl class 2018-12-30 21:08:20 +08:00
antao
b0dd2d4b75 Add the mutex protection for http response 2018-12-30 20:56:52 +08:00
antao
bc52c121d5 Add sqlite3 support to the configuration file 2018-12-29 17:17:50 +08:00
antao
bd5cd65c6a Promote performance 2018-12-29 13:12:03 +08:00
antao
7e0dcceff1 Recover accidentally deleted files 2018-12-26 11:09:25 +08:00
antao
47eee286c2 Add some comments 2018-12-25 18:23:33 +08:00
antao
fd4b414a17 Remove a unused file 2018-12-25 17:21:44 +08:00
antao
a64980f12f Remove unused variables 2018-12-25 16:12:29 +08:00
antao
21be428e51 Add mutex protection to the pushRquestToPipeLine() method 2018-12-25 11:26:44 +08:00
antao
fb5bbde277 Modify something to improve performance 2018-12-24 15:06:05 +08:00
antao
e69697466d Update the submodule trantor 2018-12-24 10:47:20 +08:00
antao
e18206304d Fix a compiler warning on 32bit linux 2018-12-21 18:34:05 +08:00
Charlie Root
da13938f51 Adapt to FreeBSD 2018-12-21 22:23:24 +08:00
antao
2126d1a394 Update trantor using kqueue in MacOS 2018-12-19 13:58:35 +08:00
antao
8b461326d8 Modify the ConfigLoader.cc file 2018-12-17 14:22:25 +08:00
antao
327a7a2f75 Add benchmark code to the examples path 2018-12-15 20:05:19 +08:00
antao
032aa19a53 Modify file formats and comments 2018-12-07 15:50:18 +08:00
antao
a72fc5e433 Update the configuration file 2018-12-04 17:11:39 +08:00
antao
458d14591b Modify some strings 2018-12-03 10:13:31 +08:00
antao
5b26d4587b Fix a bug of the Transaction class 2018-12-03 10:13:31 +08:00
antao
21cb1b482a Start adding mysql(mariadb) support 2018-12-03 10:13:31 +08:00
an-tao
c9c5d2b647 Fix a compiler warning 2018-12-03 10:03:05 +08:00
antao
ba8138ba60 Modify the HttpFile class 2018-11-30 17:34:02 +08:00
antao
20f97a78a2 Modify tests path 2018-11-27 18:29:23 +08:00
antao
d356d38319 Add the findAndFetch method to the CacheMap class 2018-11-27 09:40:20 +08:00
antao
cd1139cf83 Update save methods of uploaded files 2018-11-26 16:36:57 +08:00
antao
5edd4498a4 Modify the FileUpload class 2018-11-24 22:26:36 +08:00
miaogen
807c58b550
fix-folder-create 2018-11-24 20:17:13 +08:00
antao
f829e10dfa Modify the signature of some functions 2018-11-20 14:54:51 +08:00
antao
fe16066a4b Add the toJson() method to the database model 2018-11-20 14:08:08 +08:00
antao
ad37969535 1.Fix a memory bug;
2.Support for bytea type of postgreSQL;
2018-11-19 18:15:41 +08:00
antao
fbe757444f Modify the newHttpClient() method 2018-11-17 17:33:05 +08:00
antao
7523d6c6f1 Add loop() method to HttpAppFramework 2018-11-17 12:07:38 +08:00
an-tao
6698929a70 Add the quit() method to HttpAppFramework 2018-11-17 00:10:15 +08:00
antao
c94fcccfe5 Modify HttpClient.h file format 2018-11-16 15:50:29 +08:00
antao
13d13ed240 Organize the format of files 2018-11-16 13:26:14 +08:00
antao
b077d1f308 Merge branch 'master' into with_orm 2018-11-16 10:59:51 +08:00
antao
4cd58b3165 Add some comments 2018-11-16 10:59:03 +08:00
an-tao
e54aba423c Merge branch 'master' into with_orm 2018-11-15 22:01:30 +08:00
an-tao
e14bc9b41f Split HttpContext class 2018-11-15 22:00:23 +08:00
antao
43b7633df4 Merge branch 'master' into with_orm 2018-11-15 19:43:41 +08:00
antao
38f61de9fa Fix a bug of HttpResponseImpl 2018-11-15 19:42:25 +08:00
antao
cd7dd660e4 Merge branch 'master' into with_orm 2018-11-15 18:28:13 +08:00
an-tao
73507a6375 Add a header file including 2018-11-15 18:25:13 +08:00
antao
035c50eb9c Add genRandomString method 2018-11-15 18:21:14 +08:00
antao
7611573153 Merge branch 'master' into with_orm 2018-11-15 15:04:42 +08:00
antao
fd58a419a9 Rename HttpApiController to HttpController 2018-11-15 14:31:10 +08:00
antao
b61e94548e Update drogon_ctl 2018-11-15 09:17:08 +08:00
an-tao
a45bc0c0a7 Fix a bug in the system without database 2018-11-12 15:30:44 +08:00
antao
d3931c73fd Add database client options to the configuration file 2018-11-12 13:39:22 +08:00
antao
882a8f8090 Change the registerHttpApiMethod method to a non-static method 2018-11-09 15:21:53 +08:00
antao
7e36c92281 Optimize CacheMap 2018-10-25 18:07:29 +08:00
antao
93b69d8daa Kick off idle connections 2018-10-24 16:10:28 +08:00
antao
af53337a6a Add configuration options to the configuration file for simple controller mapping 2018-10-21 14:52:41 +08:00
antao
1433fc0509 Fix a trivial problem 2018-10-20 16:39:38 +08:00
antao
fcb2ab7880 HttpMethod 2018-10-20 13:45:17 +08:00
antao
eef0ee8729 Use 'any' to support two types of constraints 2018-10-20 12:40:30 +08:00
antao
6745d703db Modify HttpSimpleController.h 2018-10-20 11:50:56 +08:00
antao
acc26c0776 Add Http method constraints 2018-10-20 11:20:06 +08:00
antao
d283ba193a Fix a bug of Http HEAD method 2018-10-20 11:19:16 +08:00
antao
3246587375 Update a header file 2018-10-18 16:20:46 +08:00
antao
2008b1fce6 Add drogon.h for drogon users 2018-10-18 15:54:57 +08:00
antao
3c57efe5b6 Delete an unused function 2018-10-17 19:45:17 +08:00
antao
40a116193c Modify path matching 2018-10-17 15:06:24 +08:00
antao
4f8dbfa5d9 Add DrTemplate class implementing a simple but powerful template language for C++ 2018-10-17 10:50:51 +08:00
antao
8e92c42c29 Optimize regular expressions 2018-10-17 09:40:15 +08:00
an-tao
a50ba92ee0
Merge pull request #4 from an-tao/remove_boost_any
Use std::experimental::any to instead of boost::any in early version gcc
2018-10-16 13:01:57 +08:00
antao
112a541044 Change version to 0.9.4 2018-10-16 11:18:29 +08:00
an-tao
b217644ba9 Fix a bug of any_cast 2018-10-16 11:07:50 +08:00
antao
23b8d7447a Remove boost::any 2018-10-16 10:59:32 +08:00
an-tao
e3ee8873c5 Modify drogon_ctl 2018-10-15 22:46:53 +08:00
antao
a5bdadc3a3 Modify the policy of using the sendfile() system call 2018-10-15 18:18:45 +08:00
antao
5362de9a58 Modify log output 2018-10-15 16:17:13 +08:00
an-tao
b81584ff2e Modify log output 2018-10-15 16:13:45 +08:00
antao
4ac5544a54 Optimize files caching 2018-10-15 15:58:11 +08:00
antao
944c981393 Modify framework for request header 'If-Modified-Since' (please refer to rfc2616-14.25) 2018-10-15 15:32:00 +08:00
antao
0787f63922 Modify HttpAppFrameworkImpl for static files cache 2018-10-15 14:01:18 +08:00
antao
b539b5231c Modify drogon_ctl 2018-10-15 13:34:38 +08:00
antao
af8a1ef15a Adjust critical area protected by _staticFilesCacheMutex 2018-10-15 11:31:30 +08:00
antao
9181721679 Cache the static files response 2018-10-15 11:13:14 +08:00
an-tao
30ab9e09b1 Handle the details of the OpenSSL library 2018-10-14 19:57:17 +08:00
antao
c9b3dcd9c2 Format all files 2018-10-14 15:56:54 +08:00
antao
93a07ed17a 1.Add gzip option in config file;
2.rename config example file's name
2018-10-14 11:53:05 +08:00
antao
0a3d27a5b0 Optimize response caching 2018-10-13 21:49:37 +08:00
antao
4d46b77ea4 Modify ConfigLoader 2018-10-12 18:42:00 +08:00
an-tao
79c6bb4e0a Fix a timer bug for daemon mode 2018-10-12 18:38:17 +08:00
antao
60fae7d1c1 Make a copy of cached response to send 2018-10-12 11:11:48 +08:00
an-tao
9322fcbc54 Simplify the response caching logic 2018-10-11 22:09:59 +08:00
antao
5317982625 Modify HttpAppFrameworkImpl 2018-10-11 19:11:49 +08:00
antao
d5202f11fa Add test method in simple_example 2018-10-11 17:57:24 +08:00
an-tao
520c004259 Decrease map searching 2018-10-11 16:55:41 +08:00
antao
16f7af90d3 Add response cache 2018-10-11 11:20:40 +08:00
an-tao
4171f54c41 Fix a compiling warning 2018-10-09 20:12:47 +08:00
antao
94b76120a5 Optimize function getHttpFullDate() 2018-10-09 19:59:02 +08:00
antao
efb7fce2b9 Update HttpResponseImpl 2018-10-09 19:06:44 +08:00
antao
bc0a844892 Modify HttpResponseImpl 2018-10-09 19:00:00 +08:00
antao
c0a0e74414 Make CacheMap safely destruct 2018-10-09 09:37:41 +08:00
an-tao
b87276f4e4 Modify CacheMap to avoid race conditions 2018-10-09 01:22:17 +08:00
antao
36f18875ec Update trantor 2018-10-08 18:44:23 +08:00
an-tao
171140938e Fix some warnings 2018-10-08 13:32:12 +08:00
antao
9c8604cc95 Fix some bugs in CacheMap 2018-10-08 13:13:10 +08:00
antao
c0ad2c3470 Use multiple wheels in CacheMap 2018-10-07 22:59:22 +08:00
an-tao
a05b846fe3 Including some header files for linux 2018-10-06 23:32:53 +08:00
antao
900cc62306 Add 'log_level' config option 2018-10-06 10:15:46 +08:00
antao
0a0cb2cb76 Add formattedString method 2018-10-06 09:28:53 +08:00
antao
b192790ddf Add some methods in class HttpViewData 2018-10-05 22:43:51 +08:00
antao
0c6f39c34d Modify create view command of drogon_ctl 2018-10-05 19:17:12 +08:00
antao
d04efa98b2 1.Simplify the FunctionTraits;
2.Fix simple_example's bugs
2018-09-29 17:33:19 +08:00
antao
0cd9a2cee3 Add config option max_connections_per_ip 2018-09-29 15:30:27 +08:00
an-tao
0d3e9e6e74 Fix some compilation warnings 2018-09-25 21:46:26 +08:00
antao
5238da4df7 Use sendfile() system-call 2018-09-25 18:07:29 +08:00
antao
735d423fa5 Fix bugs of non-virtual destructor 2018-09-18 16:46:02 +08:00
an-tao
c1c0170c63 Add annotation 2018-09-16 12:47:35 +08:00
an-tao
6eb3663076 Fix a destructor bug 2018-09-16 12:38:40 +08:00
an-tao
da5270f259 Modify enableDynamicViewsLoading 2018-09-16 11:41:01 +08:00
antao
1db4e6bcd5 Modify drogon_ctl 2018-09-15 22:18:06 +08:00
antao
1f5ab069f9 Modify sha1 method 2018-09-15 21:43:38 +08:00
antao
8444c58e64 Add SHA1 function when no openssl 2018-09-15 19:40:24 +08:00
an-tao
d20caa2dbb Fix a bug for jsoncpp1.7 version 2018-09-15 19:09:19 +08:00
antao
4897c29a67 Update trantor 2018-09-14 18:33:37 +08:00
antao
f1f41201b9 Optimization 2018-09-14 14:59:03 +08:00
antao
d2dcff2208 Optimization 2018-09-14 14:19:43 +08:00
antao
535f22cd26 Modify HttpAppFrameworkImpl 2018-09-14 10:46:56 +08:00
an-tao
0860e122ca Add header file including 2018-09-14 10:18:06 +08:00
antao
c71f0810b2 Add configuration file for drogon 2018-09-13 18:25:30 +08:00
antao
332ba33b5b Disable session by default 2018-09-12 08:46:51 +08:00
antao
66ec3fbb08 Change std::map to std::unordered_map in CacheMap 2018-09-12 08:22:23 +08:00
antao
135a015323 Move header file including to Utilities.cc 2018-09-11 19:09:45 +08:00
an-tao
363f003d2b Add a log output 2018-09-11 17:53:23 +08:00
antao
67e62a743b Modify date format(rfc2616-3.3.1) 2018-09-11 17:31:10 +08:00
antao
2afb875d86 Merge branch 'master' of https://github.com/an-tao/drogon 2018-09-11 16:50:18 +08:00
antao
1caf2b6be1 Modify CacheMap 2018-09-11 16:49:22 +08:00
an-tao
fde29c9e83 Missing a header file,fix it 2018-09-11 14:13:19 +08:00
antao
9240105804 Modify CacheMap 2018-09-11 11:03:47 +08:00
antao
77f511a7a3 Change log output 2018-09-11 09:24:40 +08:00
antao
2c1fd4cee0 Modify drogon_ctl 2018-09-10 18:06:00 +08:00
antao
2391cc1484 Fix HTTP response parsing bug 2018-09-10 15:50:44 +08:00
root
e6bcded66f Fix atomic bug for older gcc 2018-09-09 22:09:22 +08:00
antao
5ba328f40a Fix including error 2018-09-09 21:38:37 +08:00
antao
e0bdc59f16 Handle connection error in HttpClient 2018-09-09 11:08:58 +08:00
antao
8f5a8ad20c Add a new factory method to create HttpClientPtr by host string(like 'https://www.xxx.com:9090') 2018-09-09 00:44:51 +08:00
antao
b44c2f9b9e Add the function of setting the maximum number of connections 2018-09-08 11:39:36 +08:00
antao
f3e74a05de Add header file including 2018-09-07 18:52:02 +08:00
antao
26773ff81f Support 100-continue expact(rfc2616-8.2.3) 2018-09-07 16:07:41 +08:00
antao
7e3cac5c35 Fix a bug 2018-09-07 15:19:36 +08:00
antao
734866b22f 1.Update trantor;
2.Support client pipelining(rfc2616-8.1.2.2)
3.Fix a cookie bug
2018-09-07 14:14:06 +08:00
antao
31150ab32d Add file uploading example 2018-09-07 09:53:37 +08:00
antao
6fbfe28506 Update status code 2018-09-06 19:06:25 +08:00
antao
b2d0595c60 1.Use 405 Method Not Allowed;2.Support HEAD method 2018-09-06 17:34:13 +08:00
antao
739c875d95 Header field name should be case-insensitive 2018-09-06 16:41:40 +08:00
antao
e5d72a1d45 Add 'set character-set' method 2018-09-06 14:45:29 +08:00
antao
e6a488f83a Change names of some methods 2018-09-04 13:33:01 +08:00
antao
b0546e1277 Change some code 2018-09-04 11:19:12 +08:00
antao
108d26ac18 Format file 2018-09-03 14:07:28 +08:00
an-tao
1c5651e2f8 Fix gzip bug 2018-09-03 14:04:26 +08:00
antao
6315dd85ee Update HttpServer 2018-09-03 11:25:03 +08:00
antao
790867d1e3 Add gzip compressing 2018-09-03 10:56:11 +08:00
antao
44bdc8ecbc Change a method name 2018-09-02 16:21:12 +08:00
antao
2ad97c5f56 Add InnerIpFilter 2018-08-31 16:38:46 +08:00
antao
1011d5211d Add LocalHostFilter 2018-08-31 15:17:09 +08:00
antao
6c444ec6ca Modify log output 2018-08-30 16:55:29 +08:00
antao
2cff4a3457 Update METHOD_ADD macro 2018-08-30 10:18:04 +08:00