improvements in http
fixed tests