summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthlo <t.lohmar@gmx.de>2012-12-27 17:13:59 +0100
committerthlo <t.lohmar@gmx.de>2012-12-27 17:13:59 +0100
commit3249a09d4239dbc7b5cbce53f611014d8c89b0d4 (patch)
tree0ce69535d2dda57a650c17c1ea5fa6c5262cc2bb
parent8fa64fb20b9f338d8f578b9f6aceae3ce8d937d8 (diff)
downloadvdr-plugin-smarttvweb-3249a09d4239dbc7b5cbce53f611014d8c89b0d4.tar.gz
vdr-plugin-smarttvweb-3249a09d4239dbc7b5cbce53f611014d8c89b0d4.tar.bz2
Allow fetching of widget.conf
-rw-r--r--vdr-smarttvweb/httpresource.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vdr-smarttvweb/httpresource.c b/vdr-smarttvweb/httpresource.c
index bd83d80..7755ff0 100644
--- a/vdr-smarttvweb/httpresource.c
+++ b/vdr-smarttvweb/httpresource.c
@@ -347,6 +347,14 @@ int cHttpResource::processRequest() {
if (mPath.compare("/widget.conf") == 0) {
mPath = mFactory->getConfigDir() + "/widget.conf";
+
+ if (stat(mPath.c_str(), &statbuf) < 0) {
+ sendError(404, "Not Found", NULL, "File not found.");
+ return OKAY;
+ }
+ mFileSize = statbuf.st_size;
+ mContentType = SINGLEFILE;
+ return sendFile(&statbuf);
}
if (mPath.size() > 8) {