move response header parsing into a function
request_header refactoring
almost compiling now