# File lib/sinatra/async.rb, line 82
      def body(value = nil)
        if @async_running && (value || block_given?)
          if block_given?
            super { async_handle_exception { yield } }
          else
            super
          end

          if response.body.respond_to?(:call)
            response.body = Array(async_handle_exception {response.body.call})
          end

          # Taken from Base#call
          unless @response['Content-Type']
            if Array === body and body[0].respond_to? :content_type
              content_type body[0].content_type
            else
              content_type :html
            end
          end

          result = response.finish

          # We don't get the HEAD middleware, so just do something convenient
          # here.
          result[-1] = [] if request.head?

          request.env['async.callback'][ result ]
          body
        else
          super
        end
      end