# File lib/thin/connection.rb, line 70 def post_process(result) return unless result # Set the Content-Length header if possible 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? # Send the response @response.each do |chunk| trace { chunk } send_data chunk end # If no more request on that same connection, we close it. close_connection_after_writing unless persistent? rescue Exception handle_error ensure terminate_request end