From 0c003fc2985c5ce0a2d04026d63ab7265ce9af94 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 5 Mar 2016 20:26:23 -0500 Subject: add minimal not found handler --- src/guff/not-found-handler.cr | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/guff/not-found-handler.cr (limited to 'src/guff/not-found-handler.cr') diff --git a/src/guff/not-found-handler.cr b/src/guff/not-found-handler.cr new file mode 100644 index 0000000..b15b1dc --- /dev/null +++ b/src/guff/not-found-handler.cr @@ -0,0 +1,10 @@ +require "./handler" + +module Guff + class NotFoundHandler < Handler + def call(context : HTTP::Server::Context) + context.response.status_code = 404 + context.response.puts "not found" + end + end +end -- cgit v1.2.3