From fea8ac2bbd04fd4abea929fef1b7e8ac305b4ca1 Mon Sep 17 00:00:00 2001 From: Stormwind Date: Fri, 23 Nov 2012 20:05:58 +0100 Subject: Sets the Content-Type in to_a unless it is already set before The default value is 'text/html'. --- lib/zero/response.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/zero/response.rb b/lib/zero/response.rb index 0d23194..fefa320 100644 --- a/lib/zero/response.rb +++ b/lib/zero/response.rb @@ -34,7 +34,8 @@ module Zero # TODO Remove content length and body, on certain status codes # Set content length, if not already set content_length unless header.has_key? 'Content-Length' - # TODO Set content type, if not already set + # Set content type, if not already set + content_type 'text/html' unless header.has_key? 'Content-Type' [status, header, body] end -- cgit v1.2.3-70-g09d2