docs: private static String guessMimeTypeFromUri(final String uri) {
      final int questionmark = uri.indexOf('?', 1);  // 1 => skip the initial /
      final int end = (questionmark > 0 ? questionmark : uri.length()) - 1;
      if (end < 5) {  // Need at least: "/a.js"
        return null;
      }
      final char a = uri.charAt(end - 3);
      final char b = uri.charAt(end - 2);
      final char c = uri.charAt(end - 1);
      switch (uri.charAt(end)) {
        case 'g':
          return a == '.' && b == 'p' && c == 'n' ? "image/png" : null;
        case 'l':
          return a == 'h' && b == 't' && c == 'm' ? HTML_CONTENT_TYPE : null;
        case 's':
          if (a == '.' && b == 'c' && c == 's') {
            return "text/css";
          } else if (b == '.' && c == 'j') {
            return "text/javascript";
          } else {
            break;
          }
        case 'f':
          return a == '.' && b == 'g' && c == 'i' ? "image/gif" : null;
        case 'o':
          return a == '.' && b == 'i' && c == 'c' ? "image/x-icon" : null;
      }
      return null;
    }