From b61603e6ccba27d7e36befeed79c766744188c30 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 25 Jan 2026 14:54:02 -0500 Subject: [PATCH] Comments. --- src/protocols/protocol_explore.cpp | 1 + src/protocols/protocol_html.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/protocols/protocol_explore.cpp b/src/protocols/protocol_explore.cpp index 40d6f30a..b9885850 100644 --- a/src/protocols/protocol_explore.cpp +++ b/src/protocols/protocol_explore.cpp @@ -400,6 +400,7 @@ bool protocol_explore::handle_get_block_header_context(const code& ec, }; } + // TODO: move to system serializer. // All modern configurable forks. object["forks"] = boost::json::object { diff --git a/src/protocols/protocol_html.cpp b/src/protocols/protocol_html.cpp index 37b57e62..a7b1eb5f 100644 --- a/src/protocols/protocol_html.cpp +++ b/src/protocols/protocol_html.cpp @@ -96,6 +96,9 @@ bool protocol_html::try_dispatch_object(const request&) NOEXCEPT return false; } +// Accept field (RFC 7231) and ?format= parameter are ignored. +// Return embedded page based on file extension only (defaulting to html). +// The content-type field is determined by the requested file extension. void protocol_html::dispatch_embedded(const request& request) NOEXCEPT { const auto& pages = server_settings().explore.pages; @@ -125,6 +128,10 @@ void protocol_html::dispatch_embedded(const request& request) NOEXCEPT } } +// Accept field (media type) and ?format= parameter are ignored. +// Return requested page only if there is a path file extension (.*). +// Otherwise return the sanitized home page (configured or default). +// The content-type field is determined by the requested file extension. void protocol_html::dispatch_file(const request& request) NOEXCEPT { // Empty path implies malformed target (terminal).