summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStormwind <stormwind@stormwinds-page.de>2012-11-23 20:05:58 +0100
committerStormwind <stormwind@stormwinds-page.de>2012-11-23 20:05:58 +0100
commitfea8ac2bbd04fd4abea929fef1b7e8ac305b4ca1 (patch)
tree76a0b11d30d8a60621ab057a999f188586276cfc /lib
parent16eef08688a50b31239cd67080439e8e6dead4a2 (diff)
Sets the Content-Type in to_a unless it is already set before
The default value is 'text/html'.
Diffstat (limited to 'lib')
-rw-r--r--lib/zero/response.rb3
1 files changed, 2 insertions, 1 deletions
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