@Nullable
    private static MediaType guessFromPath(String path) {
        requireNonNull(path, "path");
        final int dotIdx = path.lastIndexOf('.');
        final int slashIdx = path.lastIndexOf('/');
        if (dotIdx < 0 || slashIdx > dotIdx) {
            // No extension
            return null;
        }

        final String extension = Ascii.toLowerCase(path.substring(dotIdx + 1));
        final MediaType mediaType = EXTENSION_TO_MEDIA_TYPE.get(extension);
        if (mediaType != null) {
            return mediaType;
        }
        final String guessedContentType = URLConnection.guessContentTypeFromName(path);
        return guessedContentType != null ? MediaType.parse(guessedContentType) : null;
    }
A map from extension to the {@link MediaType}, which is queried before
{@link URLConnection#guessContentTypeFromName(String)}, so that
important extensions are always mapped to the right {@link MediaType}.
core/src/main/java/com/linecorp/armeria/server/file/DefaultMediaTypeResolver.java