code: public String getHeader(String name) {
          name += ":";
          for (String header : headers) {
              if (name.regionMatches(true, 0, header, 0, name.length())) {
                  return header.substring(name.length()).trim();
              }
          }
          return null;
      }
docs: Returns the first header named {@code name}, or null if no such header
  exists.