diff options
| author | Zousar Shaker <[email protected]> | 2021-11-25 14:24:37 -0700 |
|---|---|---|
| committer | Zousar Shaker <[email protected]> | 2021-11-25 14:24:37 -0700 |
| commit | 81dac5b9548d5f300d3a504b0db8a3623a65d2e5 (patch) | |
| tree | 6e3fb718b79d4c6dcfcea0cc89368b2283d1e315 /zenhttp/httpasio.cpp | |
| parent | Fix asio request routing so that a url of "/cas" will route to the service fo... (diff) | |
| download | zen-81dac5b9548d5f300d3a504b0db8a3623a65d2e5.tar.xz zen-81dac5b9548d5f300d3a504b0db8a3623a65d2e5.zip | |
Fix handling of packages/offers in asio mode to match http.sys mode.
Diffstat (limited to 'zenhttp/httpasio.cpp')
| -rw-r--r-- | zenhttp/httpasio.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp index ad0f7fefa..c9432d197 100644 --- a/zenhttp/httpasio.cpp +++ b/zenhttp/httpasio.cpp @@ -318,6 +318,7 @@ private: std::unique_ptr<asio::ip::tcp::socket> m_Socket; std::atomic<uint32_t> m_RequestCounter{0}; uint32_t m_ConnectionId = 0; + Ref<IHttpPackageHandler> m_PackageHandler; RwLock m_ResponsesLock; std::deque<std::unique_ptr<HttpResponse>> m_Responses; @@ -485,9 +486,13 @@ HttpServerConnection::HandleRequest() { HttpAsioServerRequest Request(m_RequestData, *Service, m_RequestData.Body()); + ZEN_TRACE("handle request, connection '{}' request '{}'", m_ConnectionId, m_RequestCounter.load(std::memory_order_relaxed)); - Service->HandleRequest(Request); + if (!HandlePackageOffers(*Service, Request, m_PackageHandler)) + { + Service->HandleRequest(Request); + } if (std::unique_ptr<HttpResponse> Response = std::move(Request.m_Response)) { |