diff options
author | Stormwind <stormwind@stormwinds-page.de> | 2012-11-23 20:05:58 +0100 |
---|---|---|
committer | Stormwind <stormwind@stormwinds-page.de> | 2012-11-23 20:05:58 +0100 |
commit | fea8ac2bbd04fd4abea929fef1b7e8ac305b4ca1 (patch) | |
tree | 76a0b11d30d8a60621ab057a999f188586276cfc /lib | |
parent | 16eef08688a50b31239cd67080439e8e6dead4a2 (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.rb | 3 |
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 |