Commit 2a37e9e
TASK-069: remove transitional two-arg http_request_impl ctor
The two-arg http_request_impl(MHD_Connection*, unescaper_ptr) overload
was preserved during the M3 PIMPL split (TASK-015 / TASK-016) "for
source compatibility" with callers not yet ported to the allocator-
taking form. The v2 cutover is complete and detail/ headers do not
require a deprecation cycle, so the overload comes out now.
Changes:
- src/httpserver/detail/http_request_impl.hpp: delete the two-arg
delegating constructor and its comment block. The default ctor
(test-request path) and the canonical three-arg allocator-aware
ctor remain.
- src/http_request.cpp: migrate the sole live caller (the
heap-fallback branch when pick_resource returns the default
resource) to pass std::pmr::polymorphic_allocator<>(get_default_
resource()) explicitly. Semantically identical to what the
delegating ctor did internally; byte-for-byte heap behaviour is
unchanged.
- test/unit/http_request_pimpl_test.cpp: add three static_asserts
pinning the construction surface:
1. default-constructible (test-request path);
2. canonical three-arg (MHD_Connection*, unescaper_ptr, alloc)
remains constructible;
3. negative: !is_constructible from (MHD_Connection*,
unescaper_ptr) -- the TASK-069 sentinel. If the two-arg
overload ever returns, the build breaks here.
Verification:
- `make check -j1` (release): 98/98 pass.
- `make check -j1` (--enable-debug, -Werror -Wextra): 98/98 pass.
- Header-only cross-flag sweep compiles the sentinel TU under each
of -UHAVE_BAUTH / -UHAVE_DAUTH / -UHAVE_GNUTLS / -UHAVE_WEBSOCKET
cleanly (proves the canonical ctor's #ifdef-conditioned member-
init list still works under every flag-off permutation, per the
plan's Step B).
Pre-existing on feature/v2.0, NOT introduced by this task:
- check-doxygen.sh fails with 7 warnings (4 @security + start()
refs + stale arguments_accumulator refs) in
create_webserver.hpp / hook_context.hpp / webserver_websocket.hpp.
None of those files are in this diff; tracked separately for a
future cleanup.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 2a397a8 commit 2a37e9e
3 files changed
Lines changed: 23 additions & 9 deletions
File tree
- src
- httpserver/detail
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 94 | | |
103 | 95 | | |
104 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
135 | 155 | | |
0 commit comments