From 9a298f12daf60b50be4762b1cc4b06be6337d2ea Mon Sep 17 00:00:00 2001 From: Corin Langosch Date: Wed, 27 Jul 2011 12:14:05 +0200 Subject: [PATCH] fixed #11, properly set content-lenght header when serving assets --- lib/rack/webconsole/assets.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/webconsole/assets.rb b/lib/rack/webconsole/assets.rb index bada324..ed581bd 100644 --- a/lib/rack/webconsole/assets.rb +++ b/lib/rack/webconsole/assets.rb @@ -41,7 +41,7 @@ def call(env) # Inject the html, css and js code to the view response_body.gsub!('', "#{code}") - headers['Content-Length'] = (response_body.length + 2).to_s + headers['Content-Length'] = response_body.length.to_s [status, headers, [response_body]] end