Stream: fixed processing buffered data in body filter.

Previously, when data was proxied to upstream, it may be partially
written and is left in upstream connection buffer.  Later, when
writing becomes possible again, the body filter is called but it
fails to call the next filter in the chain. This resulted in hanging
connection.

The fix is to take the buffered data in upstream connection into account.

This fixes #368 issue on Github.
1 file changed