mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 12:47:12 +01:00
The mime types dictionary now uses StringName indexes. Also compare against lowercase extensions.
This commit is contained in:
parent
db14d66556
commit
ea5cddc44f
@ -288,7 +288,7 @@ void HTTPServerConnection::send_file(Ref<WebServerRequest> request, const String
|
|||||||
|
|
||||||
if (!custom_headers.has("Content-Type")) {
|
if (!custom_headers.has("Content-Type")) {
|
||||||
String ctype;
|
String ctype;
|
||||||
String req_ext = p_file_path.get_extension();
|
StringName req_ext = p_file_path.get_extension().to_lower();
|
||||||
|
|
||||||
if (_http_server->mimes.has(req_ext)) {
|
if (_http_server->mimes.has(req_ext)) {
|
||||||
ctype = _http_server->mimes[req_ext];
|
ctype = _http_server->mimes[req_ext];
|
||||||
|
@ -110,7 +110,7 @@ public:
|
|||||||
|
|
||||||
uint64_t max_request_size;
|
uint64_t max_request_size;
|
||||||
|
|
||||||
RBMap<String, String> mimes;
|
RBMap<StringName, String> mimes;
|
||||||
|
|
||||||
Ref<X509Certificate> cert;
|
Ref<X509Certificate> cert;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user