Since when deflate-stream extension is enabled, DEFLATE compressor adds some
empty DEFLATE block to flush data to octet boundary, some data may left in
receive buffer even after seeing a close frame. If we close a socket without
draining this data, TCP may send out TCP RST packet to the other peer to
prevent it from receive data correctly.
This CL tries to drain unread data by using non-blocking read. Because mp_conn
of mod_python doesn't provide non-blocking read, we only perform this in
standalone mode.
Thanks Patrick of Mozilla for bug report and basic idea for fixing it.
Original issue reported on code.google.com by tyoshino@chromium.org on 7 Jul 2011 at 5:02
Original issue reported on code.google.com by
tyoshino@chromium.org
on 7 Jul 2011 at 5:02