From 278a99aede1da58170aca6832353c5125423f12f Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Sat, 2 Aug 2008 16:02:04 +0300 Subject: [PATCH] Log a warning if Rack application returns nil body. --- lib/thin/connection.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/thin/connection.rb b/lib/thin/connection.rb index 48c57528..1f87eb73 100644 --- a/lib/thin/connection.rb +++ b/lib/thin/connection.rb @@ -74,7 +74,8 @@ def post_process(result) set_content_length(result) if need_content_length?(result) @response.status, @response.headers, @response.body = result - + + log "!! Rack application returned nil body. Probably you wanted it to be an empty string?" if @response.body.nil? # Make the response persistent if requested by the client @response.persistent! if @request.persistent?