Skip to content
Browse files

Set Content-Length or Rack::Lint will bark

  • Loading branch information...
1 parent d485ec8 commit 1f6c4cd7600815d4b7a096bd81fc89bf40aeaa7b @manveru manveru committed Nov 22, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/sin/application.rb
View
1 lib/sin/application.rb
@@ -172,6 +172,7 @@ def dispatch(env)
body = '' unless body.respond_to?(:each)
body = '' if request.env["REQUEST_METHOD"].upcase == 'HEAD'
context.body = body.kind_of?(String) ? [*body] : body
+ context.response['Content-Length'] ||= body.size.to_s
context.finish
end

0 comments on commit 1f6c4cd

Please sign in to comment.
Something went wrong with that request. Please try again.