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

fix #2203: omit the charset attribute when Content-Type is text/html #6743

Merged
merged 7 commits into from
Dec 2, 2019

Conversation

djalilhebal
Copy link
Contributor

@djalilhebal djalilhebal commented Nov 2, 2019

fixes #2203

License: MIT
Signed-off-by: Abdeldjalil Hebal <dreamski21@gmail.com>
@djalilhebal
Copy link
Contributor Author

Grrr... I PR'ed the wrong code. I have actually converted content from io.ReadSeeker to []byte as in http.ServeContent.

It was ugly and feels redundant. Should I recommit it or is there a better way to convert to []byte or detect the content type?

core/corehttp/gateway_handler.go Outdated Show resolved Hide resolved
core/corehttp/gateway_handler.go Show resolved Hide resolved
core/corehttp/gateway_handler.go Outdated Show resolved Hide resolved
License: MIT
Signed-off-by: Abdeldjalil Hebal <dreamski21@gmail.com>
@djalilhebal
Copy link
Contributor Author

Again, I'm horribly sorry for the annoyance. I shouldn't have opened this pull request in the first place as I have zero knowledge of Go. This won't happen again (not here, not on another project).

You can either close this PR or just maybe fix, either way is fine. I'm just tired of it.

*Tipped IPFS 20 BATs*

@Stebalien
Copy link
Member

This is not annoying at all. Fixing small bugs like this is a great way to learn a language and start contributing to a project.

@Stebalien Stebalien merged commit c19bc36 into ipfs:master Dec 2, 2019
hacdias pushed a commit to ipfs/boxo that referenced this pull request Jan 27, 2023
…-type-header

fix #2203: omit the charset attribute when Content-Type is text/html

This commit was moved from ipfs/kubo@c19bc36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Including charset in HTTP breaks non UTF-8 sites
2 participants