@Nullable
    @Override
    public MediaType guessFromPath(String path, @Nullable String contentEncoding) {
        if (contentEncoding == null || Ascii.equalsIgnoreCase(contentEncoding, "identity")) {
            return guessFromPath(path);
        }

        requireNonNull(path, "path");
        // If the path is for a precompressed file, it will have an additional extension indicating the
        // encoding, which we don't want to use when determining content type.
        return guessFromPath(path.substring(0, path.lastIndexOf('.')));
    }
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