Commit Graph

943 Commits

Author SHA1 Message Date
fantasy-peak
0a889e921d
Add registerMiddleware (#2052) 2024-06-04 17:05:52 +08:00
TYUTthelastone
9a96a20c6e
Add regex support for websocket controller (#1779) 2024-06-04 11:27:00 +08:00
Nitromelon
f37a1d036f
Fix pg client name; Add testcase. (#2043) 2024-05-29 00:23:43 +08:00
Nitromelon
c4c95918bf
Fix wrong parameter order. (#2040) 2024-05-27 19:10:05 +08:00
Martin Chang
6726df139d
fix codespell error (#2038) 2024-05-26 14:08:18 +08:00
Nitromelon
155ae9ad65
Support postgresql connection options (#1972) 2024-05-23 14:03:28 +08:00
Nitromelon
5b7cefd32c Support per-method middlewares. (#2015) 2024-05-10 10:59:32 +08:00
Nitromelon
439ddd8dbe
Bypass clang thread_local error. (#2016) 2024-04-29 11:32:30 +08:00
Muhammad
519398c159
Avoid string copy and lowercasing on every request (#2008) 2024-04-22 17:52:36 +08:00
lirunjie
96919df488
Fix typo in HttpAppFrameworkImpl.cc (#1992) 2024-04-09 10:15:47 +08:00
Muhammad
46ac53adb3
Add JSON send overloads for WebSocket connections (#1970) 2024-04-02 15:41:47 +08:00
An Tao
9f2872639a
Remove the request shared_ptr from the multipart parser (#1984) 2024-03-27 16:02:37 +08:00
I-LOVE-C2H5OH
4cbac301fb
add client cert support for websocket (#1967) 2024-03-04 16:50:33 +08:00
itrofimow
88d06684f2
Minor enhancement: move some smart pointers around instead of copying them (#1954) 2024-02-15 14:52:10 +08:00
Greisberger Christophe
aa04d33e02
Enhancement: extend drogon::ContentType for file handling (#1921) 2024-02-09 15:30:50 +08:00
Muhammad
1a9ad1a2c9
Use std::string_view for WebSockets (#1949) 2024-02-08 13:44:08 +08:00
Ken Matsui
22f4b4fad6
Simplify traits in utils (#1952) 2024-02-08 00:25:31 +08:00
An Tao
99d97df25f
Alias the safe hashmap template (#1947) 2024-02-04 23:13:01 +08:00
Muhammad
6aed658fab
Change drogon::MultiPartParser's parameters data type from std::map to std::unordered_map (#1946) 2024-02-04 21:32:12 +08:00
Ken Matsui
f63480674f
Enable build/storage_class for cpplint (#1937) 2024-01-31 19:21:46 +08:00
Ken Matsui
0d178877f0
Enable build/header_guard for cpplint (#1936) 2024-01-31 19:05:20 +08:00
Ken Matsui
3c8c273582
Enable build/explicit_make_pair for cpplint (#1935) 2024-01-31 11:21:39 +08:00
Ken Matsui
c2b8e7c624
Enable readability/inheritance for cpplint (#1934) 2024-01-31 11:21:18 +08:00
Ken Matsui
56a53165b6
Add newline at EOF (#1932) 2024-01-31 10:43:30 +08:00
Ken Matsui
674137e89d
Use clang-format-17 (#1931) 2024-01-30 09:57:58 +08:00
Greisberger Christophe
baea2dce47
Added getParameter() and getOptionalParameter() (#1923) 2024-01-27 13:37:58 +08:00
Greisberger Christophe
cca1c8f262
Fix drogon::util::fromString() (#1925) 2024-01-26 08:27:14 +08:00
Nitromelon
aeed963915
Fix a wrong place of return. (#1922) 2024-01-25 19:13:28 +08:00
MWX
af29e25b03
Fix name issue when cross-compiling (#1906) 2024-01-18 13:38:27 +08:00
An Tao
d745cfe765
Move the RealIpResolver plugin to the PreRouting join point (#1904) 2024-01-16 11:18:13 +08:00
tripleslash
6b36b3a4f9
Support asynchronous sending of chunked responses (trantors new API) (#1886)
Co-authored-by: fantasy-peak <1356346239@qq.com>
Co-authored-by: Michael Bleis <michael.bleis@aracom.de>
2024-01-15 23:26:27 +08:00
Nitromelon
f4443dce44
Refine request routing process (#1871)
Code structure changes:
* Combine HttpSimpleControllersRouter, HttpControllersRouter and WebsocketControllersRouter, saving a lot of repetitive codes.
* Extract ControllerBinder classes from three Router classes.
* Extract aop advices and logics into AopAdvice class. Flatten the callback hells of AOPs. Prevent aop vectors from being passed into every router.
* Extract request handling process out of Router class. Let router class do its own work (routing only). Put them in HttpServer class. Now all http process logic stays in HttpServer class, no need to jump around to follow the code flow.
* Adjust doFilters() and doAdviceChain(), save a few lambda construction.
Fixed logic bugs (behavior changing):
* Fix inconsistent session handling (callCallback() vs. callback directly)
* Fix inconsistent aop path between SimpleController and HttpController
* Remove router if simple controller class not found.
2023-12-28 11:53:10 +08:00
An Tao
021c89ec78
Add -k option to the drogon_ctl when running the press command (#1887)
* Add -k option to the drogon_ctl when running the press command

* Fix some warnings

* Fix a bug of bytes statistics in HttpClient
2023-12-25 09:39:16 +08:00
Christian Clauss
e76bf08eb2
GitHub Action to find typos in the codebase using codespell (#1876)
GitHub Action to find typos in the codebase using codespell
https://github.com/codespell-project/codespell
2023-12-09 13:48:24 +08:00
Greisberger Christophe
8026790e1a
Feature: Integrate spdlog as logging backend (#1771) 2023-12-04 23:42:35 +08:00
An Tao
4e890f52d6
Fix a error of coroutines on Windows (#1870) 2023-12-04 15:13:09 +08:00
Muhammad
6b20a9fa8d
Return HttpAppFramework by setExceptionHandler (#1866) 2023-11-27 17:43:56 +08:00
Muhammad
830ced8c5b
Remove unused and undefined overloads of isBase64 (#1865) 2023-11-27 17:08:01 +08:00
Martin Chang
f21b899e63
Simplify drogon test with c++17 (#1862) 2023-11-24 18:17:30 +08:00
Vinicius
26840aa056
Fix: uuid formatting (#1854)
Co-authored-by: root <vinicts@protonmail.com>
Co-authored-by: an-tao <antao2002@gmail.com>
2023-11-18 16:23:13 +08:00
Muhammad
2000a4279e
Make id generator consistent (#1851) 2023-11-18 15:46:59 +08:00
An Tao
1ec3c96cbb
Use the constexpr if instead of std::enable_if (#1843) 2023-11-15 11:22:14 +08:00
Muhammad
56f0102cfe
Custom sessions (#1841) 2023-11-09 21:38:41 +08:00
antores
a76c11cc34
Pass HttpRequestPtr to custom error handlers (#1830) 2023-11-09 12:49:11 +08:00
An Tao
e5daba6bf5
Fix a bug of the GlobalFilters plugin (#1842) 2023-11-09 12:47:02 +08:00
Vincent Le Quang
8586874c87
Fix build due to trantor commit out of date and address warnings. (#1839) 2023-11-08 15:10:50 +08:00
An Tao
7599ae98a0
Change logs in the AccessLogger plugin to TRACE level (#1829) 2023-10-29 11:30:44 +08:00
An Tao
9ffe1b267b
Fix an error in the secureRandomString function (#1816) 2023-10-19 19:38:17 +08:00
An Tao
ab76e80089
Make & and * directly adjacent to variable names (#1810) 2023-10-12 11:27:25 +08:00
TheEnigmist
d9afdf279a
Added isTopicEmpty function (#1808)
Co-authored-by: TheEnigmist <lthenigmistl@gmail.com>
2023-10-10 11:03:27 +08:00