implement chunked encoding handling, finally the http proxy works