You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/architecture/04-components/http-request.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
**Responsibility:** Carry per-request inputs from MHD's worker thread to the user handler. Lazily-cache derived data (path pieces, parsed args, basic-auth credentials, client cert fields).
4
4
5
-
**Implementation:** PIMPL via `std::unique_ptr<http_request_impl>`. The impl is **arena-allocated** from a `std::pmr::monotonic_buffer_resource` that lives on the connection (one arena per MHD connection, reset between requests on the same keep-alive connection). The arena also backs the impl's owned strings and lazy-cache containers where practical, eliminating per-request `malloc` on the hot path.
5
+
**Implementation:** PIMPL via `std::unique_ptr<http_request_impl>` (with a custom deleter that supports both heap and arena lifetimes). The impl is **arena-allocated** from a `std::pmr::monotonic_buffer_resource` that lives on the connection (one arena per MHD connection, reset between requests on the same keep-alive connection). The arena also backs the impl's owned strings and lazy-cache containers where practical, eliminating per-request `malloc` on the hot path.*[Historical note: the PIMPL boundary was introduced in TASK-015 using `std::make_unique` as a temporary heap allocation; the per-connection arena plumbing was wired in TASK-016, completing the DR-003b Option 2 decision.]*
Copy file name to clipboardExpand all lines: specs/architecture/11-decisions/DR-003b.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,8 @@
21
21
-`webserver` constructor takes the arena allocator out of band (request constructor receives it implicitly via the dispatch path; not a public API surface).
22
22
-`std::pmr::polymorphic_allocator` plumbed through `webserver_impl` → connection state → request ctor.
23
23
24
+
**Implementation phasing:**
25
+
-*TASK-015* introduced the PIMPL boundary with `std::make_unique<http_request_impl>()` (plain heap allocation) as an incremental step to split the public header from the backend-coupled impl. This was an intentional temporary deviation from the full Option 2 design.
26
+
-*TASK-016* wired the per-connection `std::pmr::monotonic_buffer_resource` arena through `webserver_impl::connection_notify` and the `pick_resource()` helper in `http_request.cpp`, completing the DR-003b Option 2 decision. The `http_request_impl` constructor and all its container members are PMR-aware as of TASK-016.
Copy file name to clipboardExpand all lines: specs/unworked_review_issues/2026-05-04_013108_task-013.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,10 @@
20
20
The unauthorized() factory drops the v1 digest-auth nonce/opaque state-machine (previously using MHD_queue_auth_required_response3) in favour of a static WWW-Authenticate challenge. This is a meaningful behavioural regression for callers relying on full MHD digest-auth. The commit message and the http_response.hpp doc-comment (line 183-188) acknowledge the trade-off, but no Decision Record captures it. DR-005 covers body representation; no DR covers the auth-flow simplification. The architecture doc §4.3 lists unauthorized(scheme, realm, ...) as the factory without mentioning the state-machine loss.
21
21
*Recommendation:* Create a new DR (e.g. DR-012) documenting: (a) the decision to replace MHD_queue_auth_required_response3 with a static WWW-Authenticate challenge, (b) the rationale (removes dependency on connection-time state / MHD internal nonce tracking from the response value type), and (c) the consequence that callers wanting full RFC 7616 digest auth must reach MHD APIs directly. Reference PRD-RSP-REQ-005. This brings the arch record into sync with the implementation without changing any code.
http_request.hpp still includes <microhttpd.h> directly (line 28), leaking MHD types into the public umbrella header via httpserver.hpp. Like the webserver.hpp case this predates TASK-013 (M3 / TASK-015 is assigned to fix it). TASK-013's stated acceptance check was narrowly scoped to http_response.hpp, and that file is now clean — no struct MHD_Connection or struct MHD_Response forward declarations remain in http_response.hpp (confirmed). No regression was introduced by this commit.
25
25
*Recommendation:* Track alongside finding #2 as a pre-M3 accepted deviation. Verify that the M3 PIMPL tasks (TASK-014, TASK-015) clear both headers.
26
+
*Status:* fixed — TASK-015 removed `#include <microhttpd.h>` from http_request.hpp; confirmed absent (grep returns nothing for the include in the public header, which now carries only a comment at lines 28-38 explaining the deliberate absence). Closed by TASK-015 review cleanup batch (2026-05-27).
webserver.hpp includes <microhttpd.h>, <pthread.h>, and <sys/socket.h> in the public header, which conflicts with the documented architecture goal in §4.1: 'Public header <httpserver/webserver.hpp> includes only <httpserver/create_webserver.hpp> and standard library, never <microhttpd.h> or <pthread.h>.' This pre-dates TASK-013 and is tracked as deferred work (TASK-014 PIMPL split, M3 milestone per specs/tasks/_index.md), but the constraint remains unmet in the post-TASK-013 state.
0 commit comments