12 #define LOC QString("HTTPFile: ")
16 return std::shared_ptr<MythHTTPFile>(
new MythHTTPFile(ShortName, FullName));
46 LOG(VB_HTTP, LOG_INFO,
LOC + QString(
"Looking for '%1'").arg(
file));
50 LOG(VB_GENERAL, LOG_WARNING,
LOC + QString(
"Failed to find '%1'").arg(
file));
57 if (!httpfile->open(QIODevice::ReadOnly))
59 LOG(VB_GENERAL, LOG_WARNING,
LOC + QString(
"Failed to open '%1'").arg(
file));
65 static const std::vector<const char *> s_exts = {
".json",
".js",
".html",
".css" };
67 if (std::any_of(s_exts.cbegin(), s_exts.cend(),
68 [&](
const char * value) { return file.endsWith(value); }))
73 httpfile->m_lastModified = QFileInfo(
file).lastModified();
75 LOG(VB_HTTP, LOG_DEBUG,
LOC + QString(
"Last modified: %2")
80 QString mime = httpfile->m_mimeType.Name();
81 LOG(VB_HTTP, LOG_INFO,
LOC + QString(
"mimetype '%1'").arg(mime));