Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mime: jxl images are served with incorrect mimetype #70165

Closed
akmittal opened this issue Nov 2, 2024 · 5 comments · May be fixed by #70166
Closed

mime: jxl images are served with incorrect mimetype #70165

akmittal opened this issue Nov 2, 2024 · 5 comments · May be fixed by #70166

Comments

@akmittal
Copy link
Contributor

akmittal commented Nov 2, 2024

Go version

go version go1.23.2 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/akmittal/Library/Caches/go-build'
GOENV='/Users/akmittal/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/akmittal/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/akmittal/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.23.2/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.23.2/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/akmittal/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/akmittal/projects/jxl-mime/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/wx/s01xd6j11bqcs00cdnfq45wm0000gn/T/go-build3034666034=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

I served a directory with images using go static server. I am serving 2 files, 1 is .jpg another is .jxl. A repo with code is here https://github.com/akmittal/jxl-mime

What did you see happen?

.jxl files are not served with the correct mimetype. Which prevents the browser to display images.

What did you expect to see?

Browser prompts to download image instead of displaying in-browser. .jxl is supported file extension as per https://www.iana.org/assignments/media-types/media-types.xhtml#image

@gabyhelp
Copy link

gabyhelp commented Nov 2, 2024

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@ianlancetaylor
Copy link
Contributor

We expect your system /etc/mime.types file to have mappings like this. What type of system are you deploying to? What do you see in the /etc/mime.types file?

@akmittal
Copy link
Contributor Author

akmittal commented Nov 2, 2024

@ianlancetaylor I'm doing this on my dev machine, which is running Mac OS 15.1. I don't see any /etc/mime.types file in my system. This looks like a Linux file. Is there a Mac equivalent?

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/624596 mentions this issue: mime: add mimetype for .jxl files

@odeke-em odeke-em changed the title mime: jxl images are served with correct mimetype mime: jxl images are served with incorrect mimetype Nov 2, 2024
@seankhliao
Copy link
Member

Duplicate of #69530

@seankhliao seankhliao marked this as a duplicate of #69530 Nov 2, 2024
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants