refactor http server
merged