[httpserver] fixed a memory leak