Permalink
Browse files

Fix 404 running locally and atom mime type

  • Loading branch information...
1 parent 5b561eb commit 5c16707da3efd6b19e4ed9026993eeeffc09e879 @tomafro committed Nov 11, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 config.ru
View
@@ -7,13 +7,14 @@ module Tomafro
if ::File.exist?(path)
[200, {"Content-Type" => content_type_for(path)}, [::File.read(path)]]
else
- [400, {"Content-Type" => "text/html"}, [::File.read("html/404.html")]]
+ [400, {"Content-Type" => "text/html"}, [::File.read("public/404.html")]]
end
end
-
+
def content_type_for(path)
case path
when /\.css\Z/ then "text/css"
+ when /\.xml\Z/ then "application/atom+xml"
else "text/html"
end
end

0 comments on commit 5c16707

Please sign in to comment.