Instead of completely removing the "response.reset()" call, might it be simpler to replace it with a "response.resetBuffer()" call instead? This will still allow the response body to be reset, but will not clear any header/cookie information.