added a response buffer to browser so that on end the response data is provided in full