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

Comments

Projects
None yet
4 participants
@watermelonjuice
Copy link

commented Jun 27, 2017

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: mholt/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

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

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

@odeke-em

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

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

@gopherbot

This comment has been minimized.

Copy link

commented Jul 6, 2017

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

@odeke-em

This comment has been minimized.

Copy link
Member

commented Nov 4, 2017

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

@gopherbot gopherbot closed this in 1490cf6 Nov 22, 2017

@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.
You can’t perform that action at this time.