From cbf4463e82091172e0120375aec89c84553492b6 Mon Sep 17 00:00:00 2001 From: thlo Date: Thu, 27 Dec 2012 17:13:59 +0100 Subject: Allow fetching of widget.conf --- vdr-smarttvweb/httpresource.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vdr-smarttvweb/httpresource.c') 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) { -- cgit v1.2.3