Commit Graph

13 Commits

Author SHA1 Message Date
Martin Chang
113d23494a
Fix CI to actually build in C++14 (#1100) 2021-12-01 21:55:38 +08:00
Martin Chang
56cb305ae3
Support custom MIME types and extensions (#1024)
* Drogon now support custom extension and MIME types
* Added contentTypeString() to retrieve the string version of content type (in case the content type is not in the ContentType enum)
* setCustomContentTypeAndString() also accepts MIME as input (instead of the full content-type header string),
* Remove webContentTypeToString()
* Added app().registerCustomExtensionMime()
* Added support to load custom extension from JSON config
2021-09-24 22:51:09 +08:00
An Tao
6a3f72f2e5
Fix 'build.sh -tshared' (#882) 2021-06-04 18:45:21 +08:00
Martin Chang
0b5075bfa9
Drogon test framework (#869) 2021-05-27 20:09:57 +08:00
An Tao
ab5eb955b4
Fix unused parameter errors/warnings (#805) 2021-04-15 23:26:58 +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
urlordjames
260c9a547f
set make job count to number of threads in GitHub Actions workflow (#788) 2021-04-06 22:02:56 +08:00
An Tao
6d9aa3b44c
Add redis support (#719) 2021-03-13 19:13:54 +08:00
Martin Chang
4210dbce07
Revert OS X CI fix (#721) 2021-02-17 09:58:33 +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
Martin Chang
a060351f7a
Fix CI fail on OS X (#699) 2021-02-03 13:10:08 +08:00
An Tao
66fbb33956
Add format check to actions (#668) 2020-12-26 14:39:38 +08:00
An Tao
566297d4df
Create cmake.yml (#653) 2020-12-13 18:12:30 +08:00