cdm/src/main/java/ucar/nc2/dataset/DatasetUrl.java
@Urlencoded
  static private ServiceType disambiguateHttp(String location) throws IOException {
    boolean checkDap2 = false, checkDap4 = false, checkCdmr = false;

    // some TDS specific tests
    if (location.contains("cdmremote")) {
      ServiceType result = checkIfCdmr(location);
      if (result != null) return result;
      checkCdmr = true;
    }
    if (location.contains("dodsC")) {
      ServiceType result = checkIfDods(location);
      if (result != null) return result;
      checkDap2 = true;
    }

    if (location.contains("dap4")) {
      ServiceType result = checkIfDap4(location);
      if (result != null) return result;
      checkDap4 = true;
    }

    if (!checkDap2) {
      ServiceType result = checkIfDods(location);
      if (result != null)
        return result;
    }

    if (!checkDap4) {
      ServiceType result = checkIfDap4(location);
      if (result != null)
        return result;
    }

    if (!checkCdmr) {
      ServiceType result = checkIfCdmr(location);
      if (result != null)
        return result;
    }
    return null;
  }
@Urlencoded
  static private ServiceType disambiguateHttp(String location) throws IOException {
    boolean checkDap2 = false, checkDap4 = false, checkCdmr = false;

    // some TDS specific tests
    if (location.contains("cdmremote")) {
      ServiceType result = checkIfCdmr(location);
      if (result != null) return result;
      checkCdmr = true;
    }
    if (location.contains("dodsC")) {
      ServiceType result = checkIfDods(location);
      if (result != null) return result;
      checkDap2 = true;
    }

    if (location.contains("dap4")) {
      ServiceType result = checkIfDap4(location);
      if (result != null) return result;
      checkDap4 = true;
    }

    if (!checkDap2) {
      ServiceType result = checkIfDods(location);
      if (result != null)
        return result;
    }

    if (!checkDap4) {
      ServiceType result = checkIfDap4(location);
      if (result != null)
        return result;
    }

    if (!checkCdmr) {
      ServiceType result = checkIfCdmr(location);
      if (result != null)
        return result;
    }
    return null;
  }
If the URL alone is not sufficient to disambiguate the location,
then this method will attempt to do a specific kind of request on
the server, typically a HEAD call using the URL.
It finds the header "Content-Description"
and uses it value (e.g. "ncstream" or "dods", etc)
in order to disambiguate.

@param location the url to disambiguate
@return ServiceType indicating how to handle the url