do not free() cookie header
move free_request() to inside request handler loop
set request to NULL after free
updating tests
do not return NULL from http_read_request()
refactor connection handler