mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
add mime type detection by path extension
This commit is contained in:
parent
30e3ae691a
commit
0d7aa9893f
2 changed files with 3 additions and 2 deletions
|
|
@ -110,8 +110,8 @@ void Page::update()
|
||||||
// Route by status code
|
// Route by status code
|
||||||
if (meta[1] == "20")
|
if (meta[1] == "20")
|
||||||
{
|
{
|
||||||
// Route by mime type
|
// Route by mime type or path extension
|
||||||
if (meta[2] == "text/gemini")
|
if (meta[2] == "text/gemini" || Glib::str_has_suffix(navbar->get_request_path(), ".gmi"))
|
||||||
{
|
{
|
||||||
content->text_gemini(
|
content->text_gemini(
|
||||||
buffer // @TODO
|
buffer // @TODO
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include <glibmm/i18n.h>
|
#include <glibmm/i18n.h>
|
||||||
#include <glibmm/refptr.h>
|
#include <glibmm/refptr.h>
|
||||||
#include <glibmm/regex.h>
|
#include <glibmm/regex.h>
|
||||||
|
#include <glibmm/stringutils.h>
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
#include <gtkmm/box.h>
|
#include <gtkmm/box.h>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue