From b72da954ee6276f282b02a86678201301692a3ac Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Tue, 16 Apr 2024 07:44:22 -0700 Subject: [PATCH] Adds Date response header. Fixes #1863 (#1866) --- src/lucky/text_response.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lucky/text_response.cr b/src/lucky/text_response.cr index dce1fa8f5..56cb6974d 100644 --- a/src/lucky/text_response.cr +++ b/src/lucky/text_response.cr @@ -28,6 +28,7 @@ class Lucky::TextResponse < Lucky::Response end context.response.content_type = content_type context.response.status_code = status + context.response.headers.add "Date", HTTP.format_time(Time.utc) gzip if should_gzip? context.response.print(body) if should_print? rescue e : IO::Error