mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
add mime type detection by path extension
This commit is contained in:
parent
30e3ae691a
commit
0d7aa9893f
@ -110,8 +110,8 @@ void Page::update()
|
||||
// Route by status code
|
||||
if (meta[1] == "20")
|
||||
{
|
||||
// Route by mime type
|
||||
if (meta[2] == "text/gemini")
|
||||
// Route by mime type or path extension
|
||||
if (meta[2] == "text/gemini" || Glib::str_has_suffix(navbar->get_request_path(), ".gmi"))
|
||||
{
|
||||
content->text_gemini(
|
||||
buffer // @TODO
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <glibmm/i18n.h>
|
||||
#include <glibmm/refptr.h>
|
||||
#include <glibmm/regex.h>
|
||||
#include <glibmm/stringutils.h>
|
||||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/box.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user