code: private static String match(String headerLine, String token) {
      if (headerLine == null) {
        return null;
      }
  
      int match = headerLine.indexOf(token);
      if (match <= 0) {
        return null;
      }
  
      // = to skip
      match += token.length() + 1;
      int trailingComa = headerLine.indexOf(",", match);
      String value = headerLine.substring(match, trailingComa > 0 ? trailingComa : headerLine.length());
      value = value.length() > 0 && value.charAt(value.length() - 1) == '"'
              ? value.substring(0, value.length() - 1)
              : value;
      return value.charAt(0) == '"' ? value.substring(1) : value;
    }
docs: TODO: A Pattern/Matcher may be better.