fixed handling of Transfer-Encoding header during streaming; wrote tests for streaming support