Fixed _parse_header to take error as a parameter.