fix memory leaks in HTTPPOST handling