|
21 | 21 | #include "httpserver/webserver.hpp" |
22 | 22 | #include "httpserver/detail/webserver_impl.hpp" |
23 | 23 |
|
24 | | -#if defined(_WIN32) && !defined(__CYGWIN__) |
25 | | -#include <winsock2.h> |
26 | | -#include <ws2tcpip.h> |
27 | | -#define _WINDOWS |
28 | | -#else |
29 | | -#if defined(__CYGWIN__) |
30 | | -#include <sys/select.h> |
31 | | -#endif |
32 | | -#include <netinet/in.h> |
33 | | -#include <netinet/tcp.h> |
34 | | -#endif |
35 | | - |
36 | | -#include <errno.h> |
37 | 24 | #include <microhttpd.h> |
38 | | -#ifdef HAVE_WEBSOCKET |
39 | | -#include <microhttpd_ws.h> |
40 | | -#endif // HAVE_WEBSOCKET |
41 | | -#include <signal.h> |
42 | | -#include <stdint.h> |
43 | | -#include <stdio.h> |
44 | | -#include <stdlib.h> |
45 | | -#include <strings.h> |
46 | | -#include <algorithm> |
47 | | -#include <chrono> |
48 | | -#include <cstring> |
49 | | -#include <iosfwd> |
50 | | -#include <iostream> |
51 | | -#include <memory> |
52 | | -#include <mutex> |
53 | 25 | #include <optional> |
54 | | -#include <regex> |
55 | | -#include <set> |
56 | | -#include <shared_mutex> |
57 | 26 | #include <stdexcept> |
58 | 27 | #include <string> |
59 | | -#include <string_view> |
60 | 28 | #include <utility> |
61 | | -#include <vector> |
62 | 29 |
|
63 | | -#include "httpserver/constants.hpp" |
64 | | -#include "httpserver/create_webserver.hpp" |
65 | | -#include "httpserver/feature_unavailable.hpp" |
66 | | -#include "httpserver/websocket_handler.hpp" |
67 | | -#include "httpserver/detail/http_endpoint.hpp" |
68 | | -#include "httpserver/detail/lambda_resource.hpp" |
| 30 | +#include "httpserver/detail/body.hpp" |
69 | 31 | #include "httpserver/detail/modded_request.hpp" |
70 | | -#include "httpserver/detail/path_normalize.hpp" |
71 | | -#include "httpserver/detail/resource_hook_table.hpp" |
72 | | -#include "httpserver/http_request.hpp" |
73 | | -#include "httpserver/http_resource.hpp" |
74 | 32 | #include "httpserver/http_response.hpp" |
75 | 33 | #include "httpserver/http_utils.hpp" |
76 | | -#include "httpserver/string_utilities.hpp" |
77 | | -#include "httpserver/detail/body.hpp" |
78 | | - |
79 | | -#ifdef HAVE_GNUTLS |
80 | | -#include <gnutls/gnutls.h> |
81 | | -#include <gnutls/x509.h> |
82 | | -#endif // HAVE_GNUTLS |
83 | | - |
84 | | -using std::string; |
85 | | -using std::pair; |
86 | | -using std::vector; |
87 | | -using std::map; |
88 | | -using std::set; |
89 | 34 |
|
90 | 35 | namespace httpserver { |
91 | 36 |
|
92 | | -using httpserver::http::http_utils; |
93 | | -using httpserver::http::ip_representation; |
94 | | -using httpserver::http::base_unescaper; |
95 | | - |
96 | | - |
97 | 37 | namespace detail { |
98 | 38 |
|
99 | 39 | // webserver_response_queue.cpp -- response materialization and queueing. |
@@ -329,21 +269,6 @@ MHD_Result webserver_impl::materialize_and_queue_response(MHD_Connection* connec |
329 | 269 | return (MHD_Result) to_ret; |
330 | 270 | } |
331 | 271 |
|
332 | | -// TASK-048: gated fire of the route_resolved phase. Built as a small |
333 | | -// helper so finalize_answer stays under the per-function CCN ceiling |
334 | | -// (CCN_MAX in scripts/check-complexity.sh) after the addition of the |
335 | | -// hook firing site. Observation-only per DR-012 §4.10. |
336 | | -// |
337 | | -// LIFETIME NOTE: desc.path_template is a string_view into |
338 | | -// mr->matched_path_template (a per-request std::string on modded_request). |
339 | | -// The view is only valid for the duration of fire_route_resolved — hooks |
340 | | -// must not capture it past their return. See route_descriptor::path_template |
341 | | -// Doxygen in hook_context.hpp for the full contract. |
342 | | -// |
343 | | -// hrm may be null for lambda-route hits; the 'found && hrm' gate covers |
344 | | -// both the miss path (found==false) and the lambda-route hit (found==true |
345 | | -// but no http_resource*), both of which produce desc==nullopt. |
346 | | - |
347 | 272 | } // namespace detail |
348 | 273 |
|
349 | 274 | } // namespace httpserver |
0 commit comments