Added terrible function for parsing HTTP headers