diff options
author | Stormwind <stormwind@stormwinds-page.de> | 2012-11-23 17:59:33 +0100 |
---|---|---|
committer | Stormwind <stormwind@stormwinds-page.de> | 2012-11-23 17:59:33 +0100 |
commit | b4e56c6868125af8e5c773140da0775a831779d2 (patch) | |
tree | b29d4ad889b91a059493b5031e4ee0d7082b2bd3 /lib | |
parent | 22cf93d0027190c10ee24372dd2d35ce87fd6d84 (diff) |
Sets Content-Length to body string length
It joins the body array to a string and sets the Content-Length header
to its length.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zero/response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zero/response.rb b/lib/zero/response.rb index cfd1148..2886a0d 100644 --- a/lib/zero/response.rb +++ b/lib/zero/response.rb @@ -42,7 +42,7 @@ module Zero # Also creates one, if it does not exists # def content_length - header['Content-Length'] = 0 + header['Content-Length'] = body.join.length end end |