code: public static long findInstanceLengthForTrial(FileDownloadConnection connection) {
          long length = findInstanceLengthFromContentRange(connection);
          if (length < 0) {
              length = TOTAL_VALUE_IN_CHUNKED_RESOURCE;
              FileDownloadLog.w(FileDownloadUtils.class, "don't get instance length from"
                      + "Content-Range header");
          }
          // the response of HEAD method is not very canonical sometimes(it depends on server
          // implementation)
          // so that it's uncertain the content-length is the same as the response of GET method if
          // content-length=0, so we have to filter this case in here.
          if (length == 0 && FileDownloadProperties.getImpl().trialConnectionHeadMethod) {
              length = TOTAL_VALUE_IN_CHUNKED_RESOURCE;
          }
  
          return length;
      }
docs: content-length.