Imported HTTP parse code, commented out; find_newline, rtrim