summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStormwind <stormwind@stormwinds-page.de>2012-11-23 19:54:17 +0100
committerStormwind <stormwind@stormwinds-page.de>2012-11-23 19:54:17 +0100
commit16eef08688a50b31239cd67080439e8e6dead4a2 (patch)
treeaf7cee737de4344708441ea3456d8af986acf15c /lib
parent78121c6eea9cc6d2a669c93f0b89557b5c59babc (diff)
content_type sets the Content-Type header to the given value
Diffstat (limited to 'lib')
-rw-r--r--lib/zero/response.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/zero/response.rb b/lib/zero/response.rb
index eec4559..0d23194 100644
--- a/lib/zero/response.rb
+++ b/lib/zero/response.rb
@@ -46,5 +46,12 @@ module Zero
header['Content-Length'] = body.join.bytesize
end
+ # Sets the content type to the given value
+ # Also creates it, if it does not exists
+ #
+ def content_type(value)
+ header['Content-Type'] = value
+ end
+
end
end