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

net/http: DetectContentType does not detect ttf fonts #20808

Closed
watermelonjuice opened this issue Jun 27, 2017 · 4 comments
Closed

net/http: DetectContentType does not detect ttf fonts #20808

watermelonjuice opened this issue Jun 27, 2017 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@watermelonjuice
Copy link

Go's DetectContentType is detecting ttf fonts as application/octet-stream. Acceptable content types for tff fonts would be:
font/ttf
application/ttf
application/x-ttf
application/truetype
application/font
application/font-sfnt

Related: caddyserver/caddy#1729
Tagging: @mholt

@bradfitz bradfitz changed the title DetectContentType does not detect ttf fonts net/http: DetectContentType does not detect ttf fonts Jun 27, 2017
@bradfitz
Copy link
Contributor

It does seem that the mimesniff spec includes fonts:
https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern

/cc @odeke-em

@bradfitz bradfitz added this to the Go1.10 milestone Jun 27, 2017
@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 27, 2017
@odeke-em
Copy link
Member

Thanks @watermelonjuice and @bradfitz, I'll work on it.

@gopherbot
Copy link

CL https://golang.org/cl/47553 mentions this issue.

@odeke-em
Copy link
Member

odeke-em commented Nov 4, 2017

@watermelonjuice @mholt could someone help me with an MS FontObject sample?

@golang golang locked and limited conversation to collaborators Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants