godotengine / godot-asset-library

PHP frontend for Godot Engine's asset library
https://godotengine.org/asset-library
MIT License
291 stars 86 forks source link

Asset library web pages send no Content-type header #198

Closed speters closed 4 years ago

speters commented 4 years ago

Problem: Asset library web pages send no Content-type header

Effects: Web browsers may fall back to display pages as text/plain or ask user what to do (download, display as text/plain, ...). The authors seem to have worked on this problem by adding <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> to the reset_password_email.html template.

Example response:

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Sun, 29 Dec 2019 13:15:11 GMT
Content-Length: 37278
Connection: keep-alive
X-Powered-By: PHP/5.6.40-12+0~20190902.20+debian10~1.gbpc72558
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

Solution: Let the middleware add a Content-type header matching the MIME-type of the content to display.

bojidar-bg commented 4 years ago

I think I fixed the issue for the rendered html pages, hopefully the web server takes care of the scripts and stylesheets.