@@ -228,7 +228,7 @@ void webserver::request_completed(void *cls, struct MHD_Connection *connection,
228228 std::ignore = connection;
229229 std::ignore = toe;
230230
231- delete static_cast <details ::modded_request*>(*con_cls);
231+ delete static_cast <detail ::modded_request*>(*con_cls);
232232}
233233
234234bool webserver::register_resource (const std::string& resource, http_resource* hrm, bool family) {
@@ -240,18 +240,18 @@ bool webserver::register_resource(const std::string& resource, http_resource* hr
240240 throw std::invalid_argument (" The resource should be '' or '/' and be marked as family when using a single_resource server" );
241241 }
242242
243- details ::http_endpoint idx (resource, family, true , regex_checking);
243+ detail ::http_endpoint idx (resource, family, true , regex_checking);
244244
245245 std::unique_lock registered_resources_lock (registered_resources_mutex);
246- pair<map<details ::http_endpoint, http_resource*>::iterator, bool > result = registered_resources.insert (map<details ::http_endpoint, http_resource*>::value_type (idx, hrm));
246+ pair<map<detail ::http_endpoint, http_resource*>::iterator, bool > result = registered_resources.insert (map<detail ::http_endpoint, http_resource*>::value_type (idx, hrm));
247247
248248 if (result.second ) {
249249 bool is_exact = !family && idx.get_url_pars ().empty ();
250250 if (is_exact) {
251251 registered_resources_str.insert (pair<string, http_resource*>(idx.get_url_complete (), result.first ->second ));
252252 }
253253 if (idx.is_regex_compiled ()) {
254- registered_resources_regex.insert (map<details ::http_endpoint, http_resource*>::value_type (idx, hrm));
254+ registered_resources_regex.insert (map<detail ::http_endpoint, http_resource*>::value_type (idx, hrm));
255255 }
256256 registered_resources_lock.unlock ();
257257 invalidate_route_cache ();
@@ -572,7 +572,7 @@ void webserver::invalidate_route_cache() {
572572
573573void webserver::unregister_resource (const string& resource) {
574574 // family does not matter - it just checks the url_normalized anyhow
575- details ::http_endpoint he (resource, false , true , regex_checking);
575+ detail ::http_endpoint he (resource, false , true , regex_checking);
576576 std::unique_lock registered_resources_lock (registered_resources_mutex);
577577
578578 // Invalidate cache while holding registered_resources_mutex to prevent
@@ -775,7 +775,7 @@ void* uri_log(void* cls, const char* uri, struct MHD_Connection *con) {
775775 std::ignore = cls;
776776 std::ignore = con;
777777
778- auto mr = std::make_unique<details ::modded_request>();
778+ auto mr = std::make_unique<detail ::modded_request>();
779779 // MHD may invoke this callback with a null uri before the request line
780780 // has been parsed (e.g. port scans, half-open connections, or non-HTTP
781781 // traffic on the listening port). Treat that as an empty URI so the
@@ -830,7 +830,7 @@ MHD_Result webserver::post_iterator(void *cls, enum MHD_ValueKind kind,
830830 // Parameter needed to respect MHD interface, but not needed here.
831831 std::ignore = kind;
832832
833- struct details ::modded_request* mr = (struct details ::modded_request*) cls;
833+ struct detail ::modded_request* mr = (struct detail ::modded_request*) cls;
834834
835835 if (!filename) {
836836 // There is no actual file, just set the arg key/value and return.
@@ -1016,23 +1016,23 @@ void webserver::upgrade_handler(void *cls, struct MHD_Connection* connection,
10161016}
10171017#endif // HAVE_WEBSOCKET
10181018
1019- std::shared_ptr<http_response> webserver::not_found_page (details ::modded_request* mr) const {
1019+ std::shared_ptr<http_response> webserver::not_found_page (detail ::modded_request* mr) const {
10201020 if (not_found_resource != nullptr ) {
10211021 return not_found_resource (*mr->dhr );
10221022 } else {
10231023 return std::make_shared<string_response>(std::string{constants::NOT_FOUND_ERROR}, http_utils::http_not_found);
10241024 }
10251025}
10261026
1027- std::shared_ptr<http_response> webserver::method_not_allowed_page (details ::modded_request* mr) const {
1027+ std::shared_ptr<http_response> webserver::method_not_allowed_page (detail ::modded_request* mr) const {
10281028 if (method_not_allowed_resource != nullptr ) {
10291029 return method_not_allowed_resource (*mr->dhr );
10301030 } else {
10311031 return std::make_shared<string_response>(std::string{constants::METHOD_ERROR}, http_utils::http_method_not_allowed);
10321032 }
10331033}
10341034
1035- std::shared_ptr<http_response> webserver::internal_error_page (details ::modded_request* mr, bool force_our) const {
1035+ std::shared_ptr<http_response> webserver::internal_error_page (detail ::modded_request* mr, bool force_our) const {
10361036 if (internal_error_resource != nullptr && !force_our) {
10371037 return internal_error_resource (*mr->dhr );
10381038 } else {
@@ -1081,7 +1081,7 @@ bool webserver::should_skip_auth(const std::string& path) const {
10811081 return false ;
10821082}
10831083
1084- MHD_Result webserver::requests_answer_first_step (MHD_Connection* connection, struct details ::modded_request* mr) {
1084+ MHD_Result webserver::requests_answer_first_step (MHD_Connection* connection, struct detail ::modded_request* mr) {
10851085 mr->dhr .reset (new http_request (connection, unescaper));
10861086 mr->dhr ->set_file_cleanup_callback (file_cleanup_callback);
10871087
@@ -1106,7 +1106,7 @@ MHD_Result webserver::requests_answer_first_step(MHD_Connection* connection, str
11061106
11071107MHD_Result webserver::requests_answer_second_step (MHD_Connection* connection, const char * method,
11081108 const char * version, const char * upload_data,
1109- size_t * upload_data_size, struct details ::modded_request* mr) {
1109+ size_t * upload_data_size, struct detail ::modded_request* mr) {
11101110 if (0 == *upload_data_size) return complete_request (connection, mr, version, method);
11111111
11121112 if (mr->has_body ) {
@@ -1134,7 +1134,7 @@ MHD_Result webserver::requests_answer_second_step(MHD_Connection* connection, co
11341134 return MHD_YES;
11351135}
11361136
1137- struct MHD_Response * webserver::get_raw_response_with_fallback (details ::modded_request* mr) {
1137+ struct MHD_Response * webserver::get_raw_response_with_fallback (detail ::modded_request* mr) {
11381138 try {
11391139 struct MHD_Response * raw = mr->dhrs ->get_raw_response ();
11401140 if (raw == nullptr ) {
@@ -1159,7 +1159,7 @@ struct MHD_Response* webserver::get_raw_response_with_fallback(details::modded_r
11591159 }
11601160}
11611161
1162- MHD_Result webserver::finalize_answer (MHD_Connection* connection, struct details ::modded_request* mr, const char * method) {
1162+ MHD_Result webserver::finalize_answer (MHD_Connection* connection, struct detail ::modded_request* mr, const char * method) {
11631163 int to_ret = MHD_NO;
11641164
11651165#ifdef HAVE_WEBSOCKET
@@ -1231,7 +1231,7 @@ MHD_Result webserver::finalize_answer(MHD_Connection* connection, struct details
12311231 fe = registered_resources_str.find (st_url);
12321232 if (fe == registered_resources_str.end ()) {
12331233 if (regex_checking) {
1234- details ::http_endpoint endpoint (st_url, false , false , false );
1234+ detail ::http_endpoint endpoint (st_url, false , false , false );
12351235
12361236 // Data needed for parameter extraction after match.
12371237 // On cache hit, we copy these while holding the cache lock
@@ -1256,7 +1256,7 @@ MHD_Result webserver::finalize_answer(MHD_Connection* connection, struct details
12561256
12571257 if (!found) {
12581258 // Cache miss — perform regex scan
1259- map<details ::http_endpoint, http_resource*>::iterator found_endpoint;
1259+ map<detail ::http_endpoint, http_resource*>::iterator found_endpoint;
12601260
12611261 size_t len = 0 ;
12621262 size_t tot_len = 0 ;
@@ -1368,7 +1368,7 @@ MHD_Result webserver::finalize_answer(MHD_Connection* connection, struct details
13681368 return (MHD_Result) to_ret;
13691369}
13701370
1371- MHD_Result webserver::complete_request (MHD_Connection* connection, struct details ::modded_request* mr, const char * version, const char * method) {
1371+ MHD_Result webserver::complete_request (MHD_Connection* connection, struct detail ::modded_request* mr, const char * version, const char * method) {
13721372 mr->ws = this ;
13731373
13741374 mr->dhr ->set_path (mr->standardized_url );
@@ -1380,7 +1380,7 @@ MHD_Result webserver::complete_request(MHD_Connection* connection, struct detail
13801380
13811381MHD_Result webserver::answer_to_connection (void * cls, MHD_Connection* connection, const char * url, const char * method,
13821382 const char * version, const char * upload_data, size_t * upload_data_size, void ** con_cls) {
1383- struct details ::modded_request* mr = static_cast <struct details ::modded_request*>(*con_cls);
1383+ struct detail ::modded_request* mr = static_cast <struct detail ::modded_request*>(*con_cls);
13841384
13851385 if (mr->dhr ) {
13861386 return static_cast <webserver*>(cls)->requests_answer_second_step (connection, method, version, upload_data, upload_data_size, mr);
0 commit comments