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 recognize json #10630

Closed
henrikbjorn opened this issue Apr 30, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@henrikbjorn
Copy link

commented Apr 30, 2015

DetectContentType does not have a sniffer for application/json and therefor fails to guess it. This means it falls back to text/plain.

@mdempsky

This comment has been minimized.

Copy link
Member

commented Apr 30, 2015

DetectContentType applies the algorithm from https://mimesniff.spec.whatwg.org/#rules-for-identifying-an-unknown-mime-type, which doesn't contain any rules for recognizing JSON.

@mdempsky mdempsky closed this Apr 30, 2015

@golang golang locked and limited conversation to collaborators Jun 25, 2016

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.