fixed a lot of bugs, added chunked encoding support, made http store dynamic and use realloc