Fix handling of chunked responses.