diff options
author | thlo <smarttv640@gmail.com> | 2012-12-27 17:13:59 +0100 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2012-12-27 17:13:59 +0100 |
commit | cbf4463e82091172e0120375aec89c84553492b6 (patch) | |
tree | 0ce69535d2dda57a650c17c1ea5fa6c5262cc2bb /vdr-smarttvweb | |
parent | 59fd829c3a3214f30c31bbab9fa07d64cf5aeae9 (diff) | |
download | vdr-plugin-smarttvweb-cbf4463e82091172e0120375aec89c84553492b6.tar.gz vdr-plugin-smarttvweb-cbf4463e82091172e0120375aec89c84553492b6.tar.bz2 |
Allow fetching of widget.conf
Diffstat (limited to 'vdr-smarttvweb')
-rw-r--r-- | vdr-smarttvweb/httpresource.c | 8 |
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) { |