Commit Diff


commit - 4de87cb0c619d0f55af39fc828fb744f62cebf2f
commit + eddd8af47e63726017aca9a088f4de0740033699
blob - 5523241a2da909a0eb343c9dcfcf1bfc999b9e49
blob + 15ab6a18586dacba22d08d61f062ca0c066aa595
--- vostok/vostok.cc
+++ vostok/vostok.cc
@@ -23,7 +23,7 @@ namespace
 
 namespace meta
 {
-const std::string _EMPTY;
+const std::string TEXT_GEMINI{"text/gemini"};
 const std::string BAD_REQUEST{"Bad request"};
 const std::string URL_TOO_SHORT{"URL is too short"};
 const std::string NON_GEMINI{"No proxying to non-Gemini content"};
@@ -138,9 +138,9 @@ void client_thread(const transport::AcceptedClient *ac
         break;
     }
 
-    // > If <META> is an empty string, the MIME type MUST default to "text/gemini; charset=utf-8".
+    // <META> from mime.types or "text/gemini" (default).
     const auto _mime_type = mime.lookup(*opened_path);
-    const std::string &meta_string = _mime_type ? *_mime_type : meta::_EMPTY;
+    const std::string &meta_string = _mime_type ? *_mime_type : meta::TEXT_GEMINI;
     send_response(accepted_client->get_ctx(), gemini::STATUS_20_SUCCESS, meta_string);
 
     std::vector<char> buffer;