diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zero/response.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/zero/response.rb b/lib/zero/response.rb index 74b2e28..85e7469 100644 --- a/lib/zero/response.rb +++ b/lib/zero/response.rb @@ -38,5 +38,12 @@ module Zero [@status, @header, @body] end + # Sets the content length header to the current length of the body + # Also creates one, if it does not exists + # + def content_length + header['Content-Length'] = 0 + end + end end |