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

SVG images are served with wrong MIME type #4553

Open
2 of 7 tasks
edgar-bonet opened this issue Jun 9, 2017 · 1 comment
Open
2 of 7 tasks

SVG images are served with wrong MIME type #4553

edgar-bonet opened this issue Jun 9, 2017 · 1 comment
Labels
💊 bug Something isn't working

Comments

@edgar-bonet
Copy link

edgar-bonet commented Jun 9, 2017

  • Gogs version (or commit ref): 0.11.18.0608, 0.11.19.0609, 0.11.21.0611 (on try.gogs.io)
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
  • Log gist (usually found in log/gogs.log): N/A

Description

Embedding SVG images in a repo's README.md does nor work. Instead of the image, the alt text is displayed in the browser (both Firefox and Chromium).

See the test case at try.gogs.io.

The generated HTML is fine. The problem stems from the fact that Gogs serves the SVG file with the HTTP header

Content-Type: text/plain; charset=utf-8

whereas the correct type is image/svg+xml.

@unknwon unknwon added the 💊 bug Something isn't working label Jun 10, 2017
@unknwon unknwon added this to the 0.12 milestone Jun 10, 2017
@edgar-bonet
Copy link
Author

The issue had been previously reported on the Gitea bug tracker.

@unknwon unknwon removed this from the Triaging priority milestone Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💊 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants