From cd2bc4e84c38dd20ff1ffbdbe3561290806bff11 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Wed, 29 Apr 2026 16:59:59 -0500 Subject: [PATCH] Auto-detect HTML responses in http_serve, serve with text/html content type --- bin/el/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/el/src/main.rs b/bin/el/src/main.rs index b1b5395..e8d31be 100644 --- a/bin/el/src/main.rs +++ b/bin/el/src/main.rs @@ -3915,9 +3915,13 @@ fn dispatch_builtin( method, path, _http_status, _req_latency_ms, request_id )); + // Auto-detect HTML responses and serve with text/html content type. + let trimmed = response_body.trim_start(); + let is_html = trimmed.starts_with("