0.34.6_repo_cleanup

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-22 09:31:15 +02:00
1 parent ce1a90397c
commit 133d2f0f91
273 files changed
+5969 -6926

No files matched your search

-8
View File
@@ -21,8 +21,6 @@ use tokio::io::{AsyncReadExt, AsyncSeekExt};
use tokio_util::io::ReaderStream;
pub(super) fn status_response(status: StatusCode, detail: &'static str) -> Response {
// Keep implementation diagnostics in logs; use the existing embedded
// application-style pages for every Web Server-generated error.
if status.is_server_error() {
tracing::warn!(
status = status.as_u16(),
@@ -30,16 +28,10 @@ pub(super) fn status_response(status: StatusCode, detail: &'static str) -> Respo
"Web Server error"
);
}
// The public serve() facade strips bodies from HEAD responses while
// retaining the same Content-Length as the corresponding GET.
builtin_error_response(status, &Method::GET)
}
pub(super) fn builtin_error_response(status: StatusCode, method: &Method) -> Response {
// Reuse the bundled pages wherever one exists. For statuses such as 405,
// use the shared styled application fallback instead of a plain-text or
// unstyled generic error. Do not mark these as PageServed so normal Vhost
// error-page policy can still replace them.
let (body, length) = match crate::pages::builtin_gateway_error(status) {
Some(html) => (
if *method == Method::HEAD {