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

Web interface assets are sent with incorrect Content-Type header #1982

Closed
joschi opened this Issue Mar 29, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@joschi
Contributor

joschi commented Mar 29, 2016

Problem description

Steps to reproduce the problem

  1. Start Graylog.
  2. Open web interface in Internet Explorer 9 or later.
  3. See web interface fail to load.

Related mailing list thread: https://groups.google.com/forum/#!topic/graylog2/Kp-smupTq70
Related MSDN article: https://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx

The web interface currently always uses the content type application/octet-stream for assets which IE 9 and later refuses to load due to the MIME type mismatch.

$ curl -I 'http://localhost:9000/vendor.js'
HTTP/1.1 200 OK
ETag: "df53558427f19224afbc2e7ebdadf0992b9419eddbd25a43ea3b2fbbdac47021"
Cache-Control: no-transform, max-age=31536000
Last-Modified: Tue, 29 Mar 2016 07:40:09 GMT
X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd
Vary: Accept-Encoding
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 29 Mar 2016 07:54:55 GMT

$ curl -I --compressed 'http://localhost:9000/vendor.js'
HTTP/1.1 200 OK
ETag: "df53558427f19224afbc2e7ebdadf0992b9419eddbd25a43ea3b2fbbdac47021"
Cache-Control: no-transform, max-age=31536000
Last-Modified: Tue, 29 Mar 2016 07:40:09 GMT
X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 0
Content-Type: application/octet-stream
Date: Tue, 29 Mar 2016 07:52:40 GMT

Environment

  • Graylog Version: Graylog 2.0.0-beta.1
  • Browser version:

@joschi joschi added bug web labels Mar 29, 2016

@joschi joschi added this to the 2.0.0 milestone Mar 29, 2016

@dennisoelkers dennisoelkers self-assigned this Mar 29, 2016

joschi added a commit that referenced this issue Mar 29, 2016

Use MimetypesFileTypeMap to determine Content-Type of assets
MIME types are defined in META-INF/mime.types, imported from Debian Linux.
Source URL: https://anonscm.debian.org/cgit/collab-maint/mime-support.git/plain/mime.types

Fixes #1982

@bernd bernd closed this in #1983 Mar 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment