diff options
| author | Rutger Broekhoff | 2026-11-30 11:47:36 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2026-11-30 11:47:36 +0100 |
| commit | 02475e05ccd1aa15c6a6163834f28bfebbef796f (patch) | |
| tree | 6bc6f453f07dc76f763310e1e5eade9a3e1115b7 /server/src/http_server.cppm | |
| parent | 5732f6c14618f50ffaf315b93795340219a67c66 (diff) | |
| download | routemon-02475e05ccd1aa15c6a6163834f28bfebbef796f.tar.gz routemon-02475e05ccd1aa15c6a6163834f28bfebbef796f.zip | |
RWGPS webhook and such
Diffstat (limited to 'server/src/http_server.cppm')
| -rw-r--r-- | server/src/http_server.cppm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/http_server.cppm b/server/src/http_server.cppm index c111118..b75ada3 100644 --- a/server/src/http_server.cppm +++ b/server/src/http_server.cppm | |||
| @@ -264,12 +264,13 @@ auto make_preflight_rsp(preflight_response res, keep_alive ka) | |||
| 264 | // Using base_ctx instead of a template here since that saves you | 264 | // Using base_ctx instead of a template here since that saves you |
| 265 | // typing on invocation (and we do not care about the context type | 265 | // typing on invocation (and we do not care about the context type |
| 266 | // anyway, but all context types should derive from base_ctx). | 266 | // anyway, but all context types should derive from base_ctx). |
| 267 | template <bhttp::concepts::body_reader Body> | 267 | template <bhttp::concepts::body_reader Body, typename... Args> |
| 268 | auto read_request(base_ctx const& ctx, readable_request&& r) | 268 | auto read_request(base_ctx const& ctx, readable_request&& r, Args&&... args) |
| 269 | -> net::awaitable<bhttp::request<Body>> | 269 | -> net::awaitable<bhttp::request<Body>> |
| 270 | { | 270 | { |
| 271 | std::ignore = ctx; | 271 | std::ignore = ctx; |
| 272 | auto p = bhttp::request_parser<Body>{std::move(*r.p)}; | 272 | auto p = |
| 273 | bhttp::request_parser<Body>{std::move(*r.p), std::forward<Args>(args)...}; | ||
| 273 | co_await bhttp::async_read(*r.strm, *r.buf, p); | 274 | co_await bhttp::async_read(*r.strm, *r.buf, p); |
| 274 | co_return std::move(p.release()); | 275 | co_return std::move(p.release()); |
| 275 | } | 276 | } |