add unit test for http.c