]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 3192: comm.cc:216: "fd_table[fd].halfClosedReader != NULL"
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 9 Apr 2011 04:01:00 +0000 (22:01 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sat, 9 Apr 2011 04:01:00 +0000 (22:01 -0600)
commitf35961af7dae85e86487f6afffc55c32293e8c7f
tree40ea8127a7283db674824492dbc9d9b4ccff20e3
parentfb151769246bdcf4fd6317a38b1392464f3c1d45
Bug 3192: comm.cc:216: "fd_table[fd].halfClosedReader != NULL"
Polished request reading code to fix CONNECT double-read assertion.

ConnStateData::flags.readMoreRequests, do_next_read variables, and
ClientSocketContext::mayUseConnection() methods were used (or unused!)
incorrectly or inconsistently.

This change removes all do_next_read variables to simplify the state. Instead,
the renamed ConnStateData::flags.readMore indicates whether client_side.cc
should call comm_read. The mayUseConnection() methods are now used to indicate
whether the next client-sent byte (buffered or read) should be reserved for
the current request rather than being interpreted as the beginning of the next
request.

Usually,
                      flags.readMore  mayUseConnection
      basic requests:     true             false
requests with bodies:     true             true
  malformed requests:     false            false
             tunnels:     false            true
src/client_side.cc
src/client_side.h