# File test/test_request.rb, line 357
    def test_set_reader
      @request.method = 'POST'
      @request.path = '/'
      @request.version = 'HTTP/1.1'
      @request.set_header('Connection', 'close')
      assert(@request.conn_closed?)

      # closed connection
      assert_exception(RuntimeError) { @request.each_body{} }
      assert_exception(RuntimeError) { @request.fetch_body }
      assert_exception(RuntimeError) { @request.each_line{} }
      assert_exception(RuntimeError) { @request.fetch_lines }
      @request.set_reader(PseudoIO.new)
      @request.each_body{}      # no exception!
      @request.set_reader(PseudoIO.new)
      @request.fetch_body       # no exception!
      @request.set_reader(PseudoIO.new)
      @request.each_line{}      # no exception!
      @request.set_reader(PseudoIO.new)
      @request.fetch_lines      # no exception!

      @request.delete_header('Connection')
      assert(! @request.conn_closed?)

      # keep-alive connection
      assert_exception(Rucy::HTTPError) { @request.set_reader(PseudoIO.new) }
      @request.set_header('Content-Length', '-1')
      assert_exception(Rucy::HTTPError) { @request.set_reader(PseudoIO.new) }
      @request.set_header('Content-Length', '0')
      @request.set_reader(PseudoIO.new) # no exception!
      
    end