summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2014-04-11 18:34:57 +0000
committerrandomdan <randomdan@localhost>2014-04-11 18:34:57 +0000
commit8cc8391814acd327a26f5ed0827b95d2c678f5b6 (patch)
treee86b7f3bb165d75d35d695237a721c7dcc0e50dd
parentSupport range requests and seekable streams (diff)
downloadproject2-8cc8391814acd327a26f5ed0827b95d2c678f5b6.tar.bz2
project2-8cc8391814acd327a26f5ed0827b95d2c678f5b6.tar.xz
project2-8cc8391814acd327a26f5ed0827b95d2c678f5b6.zip
Support content type on a file stream
-rw-r--r--project2/files/fileStream.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/project2/files/fileStream.cpp b/project2/files/fileStream.cpp
index df39406..707b37e 100644
--- a/project2/files/fileStream.cpp
+++ b/project2/files/fileStream.cpp
@@ -12,6 +12,7 @@ class FileStream : public Stream {
public:
FileStream(ScriptNodePtr p) :
Stream(p),
+ contentType(p, "contenttype", "application/octet-stream"),
path(p, "path")
{
}
@@ -37,6 +38,12 @@ class FileStream : public Stream {
}
}
+ virtual Glib::ustring getContentType(ExecContext * ec) const override
+ {
+ return contentType(ec);
+ }
+
+ const Variable contentType;
const Variable path;
};
DECLARE_LOADER("filestream", FileStream);