fix http server memory leak