Martin Chang
6bfbf97eea
Print error before terminating in AsyncTask ( #841 )
2021-05-06 17:50:11 +08:00
Tommy Chiang
cb1876f26b
Remove duplicated inclusion ( #838 )
...
This remove the duplicated `#include "HttpClientImpl.h"` in `lib/src/HttpAppFrameworkImpl.cc`.
2021-05-04 22:36:59 +08:00
An Tao
74d57ab7fa
Add the validateCert parameter to the newWebSocketClient method ( #835 )
2021-05-02 20:15:27 +08:00
An Tao
51814b76da
Add the setTimeout() method to the ReidsClient class ( #830 )
2021-04-30 08:00:11 +08:00
An Tao
685aaaa3da
Add the setTimeout() method to the DbClient class ( #823 )
2021-04-29 10:13:34 +08:00
An Tao
a33bf2bf34
Send the content-length header even if the body(POST,PUT,OPTIONS,PATCH) is empty ( #825 )
2021-04-28 18:04:57 +08:00
Martin Chang
88c6b6e7d4
Disallow coroutines to be resolved as plain subroutine handlers ( #827 )
2021-04-28 16:58:03 +08:00
An Tao
87d8123276
[HttpClientImpl] Remove the related request from the buffer if it's not sent after the timeout ( #818 )
2021-04-24 21:05:13 +08:00
An Tao
e83026230a
Little changes ( #810 )
...
1. Put parameters in query string if the content-type is not 'application/x-www-form-urlencoded'
2. Parse the mulitpart form data if the method is POST or PUT
3. Send query string when the passThrough flag is set
2021-04-18 21:00:20 +08:00
0rangeFox
df51674792
Enhancements on files part. ( #803 )
...
Co-authored-by: an-tao <antao2002@gmail.com>
2021-04-17 14:01:06 +08:00
Bertrand Darbon
0ec2f51fbf
Add option to set default handler ( #802 )
2021-04-16 18:49:39 +08:00
An Tao
ab5eb955b4
Fix unused parameter errors/warnings ( #805 )
2021-04-15 23:26:58 +08:00
Bertrand Darbon
44a8a2d5f7
Add GNU -Werror & fix warnings ( #801 )
2021-04-15 19:27:15 +08:00
An Tao
4eeba18088
Improve the MultiPartParser class ( #800 )
2021-04-14 23:26:38 +08:00
An Tao
ba8c7b5bca
Fix a bug of reflection failure introduced by #745 ( #793 )
2021-04-10 20:18:51 +08:00
Bertrand Darbon
54727a5dbe
Add exports macro to allow Shared Library with hidden symbols by default (e.g. Windows) ( #745 )
...
Co-authored-by: an-tao <antao2002@gmail.com>
2021-04-09 10:17:28 +08:00
Martin Chang
a81a5fa63e
Use lambda instead of std::bind in HttpServer ( #787 )
2021-04-06 23:13:53 +08:00
Martin Chang
a19d0427ed
Catch exceptions thrown by handlers ( #773 )
2021-03-28 10:56:23 +08:00
An Tao
564fc67649
Add a method to HttpRequest to set the user_agent header ( #772 )
2021-03-26 20:37:46 +08:00
mekashef
686068065a
Added newFileResponse Support for buffers in memory ( #770 )
2021-03-26 20:37:05 +08:00
interfector18
49181a22b2
Use canonical cmakelogic for cross compilation, ( #768 )
...
Fix clang c++20 build
2021-03-25 04:27:52 +08:00
An Tao
5f60c9fc6c
Send ping messages by default for websockets ( #767 )
2021-03-24 22:59:57 +08:00
An Tao
0bf37c6052
Remove an assertion statement in the HttpClientImpl class ( #764 )
2021-03-23 14:36:20 +08:00
klaus triendl
bd9a149059
Use canonical way of calling max() function on Windows ( #763 )
2021-03-23 08:37:26 +08:00
Martin Chang
9da122a189
print error and exit when IP parsing failed in server startup ( #758 )
2021-03-20 00:13:58 +08:00
Martin Chang
490948bb38
remove 'SSL validation' comment from HttpClient ( #752 )
2021-03-14 13:55:21 +08:00
An Tao
6d9aa3b44c
Add redis support ( #719 )
2021-03-13 19:13:54 +08:00
Bertrand Darbon
bcd8e27a36
feature(signal): Add option to disable signal handling ( #742 )
2021-03-11 22:03:02 +08:00
Martin Chang
98da3490e7
return awaiter from coroutine instead of resumable ( #733 )
2021-03-05 22:21:02 +08:00
Martin Chang
8bd1f5684e
Fix drogon::Task<> not destructing internal object ( #729 )
2021-03-01 13:36:03 +08:00
JuergenGleiss
af2bd6ba69
HttpRequest: add feature to avoid url encoding of path ( #730 )
2021-02-28 23:42:15 +08:00
Martin Chang
cde19a1f57
Valivate certificate in HttpClient ( #726 )
...
Co-authored-by: an-tao <antao2002@gmail.com>
2021-02-22 11:45:33 +08:00
An Tao
0f5721119c
Support SNI in the HttpClient class ( #724 )
2021-02-21 16:05:58 +08:00
An Tao
eb2d24197a
Fix the error when SSL handshake fails ( #717 )
2021-02-15 09:15:26 +08:00
interfector18
12cfdd5916
Lowercase all http headers, add webp and avif types ( #718 )
2021-02-15 09:14:54 +08:00
An Tao
3b8b63d17d
Add drogon::orm::CoroMapper<T> template ( #712 )
...
Co-authored-by: marty1885 <marty188586@gmail.com>
2021-02-13 18:22:17 +08:00
interfector18
6542236b20
Add default value interface to sqlbinder for mysql and postgresql ( #704 )
2021-02-07 10:34:49 +08:00
An Tao
4c577e6fa9
Fix compilation errors on vs2019 ( #706 )
...
Fix compilation errors on VS2019 when coroutines are enabled
2021-02-06 19:53:30 +08:00
Martin Chang
a2142dd93e
Coroutine support ( #693 )
...
* app().registerHttpHandler() accepts coroutine as handlers
* HttpController can use coroutine as handlers'
* Http request handlers with coroutine catches exception instead of crashing the entire app
* DbClient now has execSqlCoro that is awaitable
* DbClient now has newTransactionCoro that is awaitable
* HttpClient have awaitable sendRequestCoro
* WebSocketClient have awaitable connectToServerCoro
* WebSocketClient have setAsyncMessageHandler and setAsyncConnectionClosedHandler
* drogon::AsyncTask and drogon::Task<T> as our corutine types
* Related tests
* Misc
Future work
* Coroutine for WebSocket server
* Known issues
co_future() and sync_wait may crash. It looks like GCC bug but I'm not sure.
Workarround: Make an coroutine of AsyncTask. Then launch said coroutine.
Not sure why wrapping the exact same thing in function crashes things.
Co-authored-by: an-tao <antao2002@gmail.com>
2021-02-06 17:05:58 +08:00
An Tao
7ce5768372
Return 404 or 405 responses correctly ( #705 )
2021-02-06 15:16:44 +08:00
An Tao
5426100bde
Fix a error in the HttpClient class when a response has no content-length header ( #698 )
2021-02-03 14:54:45 +08:00
Jiannan Liu
4b5885e3c0
Serve wasm files with the correct MIME type ( #667 )
2020-12-26 12:21:43 +08:00
An Tao
ec59dbbc3d
Add option for setting float precision in Json string ( #666 )
2020-12-24 20:00:29 +08:00
An Tao
ce704aff5b
Update trantor ( #656 )
...
* Update trantor
* Make some minor modifications.
2020-12-14 08:49:33 +08:00
ivanka2012
1abd8b3506
Add implicit page resolving capability (a-directory -> a-directory/index.html) ( #647 )
...
Co-authored-by: an-tao <antao2002@gmail.com>
2020-12-11 14:02:47 +08:00
An Tao
8b7ffb28d7
Add support in the SqlBinder class and the Session class ( #644 )
2020-12-06 11:41:06 +08:00
An Tao
7dd2d6123b
Add the reuse_port option ( #634 )
2020-11-25 19:47:36 +08:00
Martin Chang
4ca90f2415
Don't send content type in a 304 response ( #630 )
2020-11-18 22:31:55 +08:00
An Tao
4ce2d25d55
Return 400 if the content-length is invalid ( #629 )
2020-11-18 15:09:25 +08:00
Joakim L. Gilje
886dfc3648
Support OpenBSD ( #626 )
...
Co-authored-by: an-tao <antao2002@gmail.com>
2020-11-15 12:18:01 +08:00