Skip to content

mime: Add mime type for avif image file format #44602

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

Closed
amittal-quot opened this issue Feb 25, 2021 · 7 comments
Closed

mime: Add mime type for avif image file format #44602

amittal-quot opened this issue Feb 25, 2021 · 7 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.

Comments

@amittal-quot
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.16 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/amittal/Library/Caches/go-build" GOENV="/Users/amittal/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/amittal/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/amittal/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.16" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xt/2rbf0kx520745mdw84t5ztldq8b1dr/T/go-build1199050817=/tmp/go-build -gno-record-gcc-switches -fno-common"
$ go env

What did you do?

Build static server to serve images

What did you expect to see?

AVIF images should have correct mime-type

What did you see instead?

AVIF images do not have correct mime-type

I had created a Code review for change at https://go-review.googlesource.com/c/go/+/256478. At the time IANA list(https://www.iana.org/assignments/media-types/media-types.xhtml#image) did not include AVIF, but is included now.

I don't understand Gerrit well, So recreating here.

@seankhliao seankhliao changed the title Add support for AVIF mime-type mime: Add mime type for avif image file format Feb 25, 2021
@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 25, 2021
@odeke-em
Copy link
Member

Thank you for filing this bug @amittal-quot, and welcome to the Go project! Thanks for the triage @seankhliao.

@amittal-quot we only add mime patterns that are included officially included and tabled up by the Web Hypertext Application Technology Working Group (WHATWG) and in https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern. There isn’t much the Go project can do before that pattern is sniff specified by the WHATWG, and you can take a look at their issues per https://github.com/whatwg/mimesniff.

@seankhliao
Copy link
Member

@odeke-em I assumed this would be accepted based on the activity today in the linked CL 256478

@odeke-em
Copy link
Member

odeke-em commented Feb 25, 2021 via email

@amittal-quot
Copy link
Author

My change is getting the mime type for file using file using extension. In the patchset it was mentioned that mime need to be included by IANA list.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/256478 mentions this issue: mime: Add mime type for avif image file format Fixes #44602

@amittal-quot
Copy link
Author

I have changes the commit message, Is there any other change needed

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/310034 mentions this issue: mime: keep builtinTypesLower sorted alphabetically

gopherbot pushed a commit that referenced this issue Apr 15, 2021
Updates #44602

Change-Id: I2c32e388143e56928850821587f57d9729434220
Reviewed-on: https://go-review.googlesource.com/c/go/+/310034
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants