aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStormwind <stormwind@stormwinds-page.de>2012-11-23 19:39:56 +0100
committerStormwind <stormwind@stormwinds-page.de>2012-11-23 19:39:56 +0100
commit78121c6eea9cc6d2a669c93f0b89557b5c59babc (patch)
treec494118faf6ff793a9ebe352cbf81360f7428040 /lib
parentc15e8bdacb5d85b5ccfd154015473674fa8971dc (diff)
Sets the Content-Length in to_a unless it is already set before
Diffstat (limited to 'lib')
-rw-r--r--lib/zero/response.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/zero/response.rb b/lib/zero/response.rb
index 2660924..eec4559 100644
--- a/lib/zero/response.rb
+++ b/lib/zero/response.rb
@@ -32,8 +32,8 @@ module Zero
#
def to_a()
# TODO Remove content length and body, on certain status codes
- # TODO Set content length, if not already set
- content_length
+ # Set content length, if not already set
+ content_length unless header.has_key? 'Content-Length'
# TODO Set content type, if not already set
[status, header, body]