mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
nhttpd: fix empty parameter. Inspecting parameters added values.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1703 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 6689a74a00
Author: yjogol <yjogol2@online.de>
Date: 2011-09-19 (Mon, 19 Sep 2011)
This commit is contained in:
@@ -368,10 +368,14 @@ void CyhookHandler::printf(const char *fmt, ...) {
|
|||||||
TOutType CyhookHandler::checkOutput() {
|
TOutType CyhookHandler::checkOutput() {
|
||||||
// get outType
|
// get outType
|
||||||
outType = plain; // plain
|
outType = plain; // plain
|
||||||
if (ParamList["format"] == "json" || !(ParamList["json"].empty()) )
|
if(!(ParamList.empty())) {
|
||||||
outType = json;
|
if ((ParamList.find("format") != ParamList.end() && ParamList["format"] == "json")
|
||||||
else if (ParamList["format"] == "xml" || !(ParamList["xml"].empty()) )
|
|| (ParamList.find("json") != ParamList.end() && !(ParamList["json"].empty())) )
|
||||||
outType = xml;
|
outType = json;
|
||||||
|
else if ((ParamList.find("format") != ParamList.end() && ParamList["format"] == "xml")
|
||||||
|
|| (ParamList.find("xml") != ParamList.end() && !(ParamList["xml"].empty())) )
|
||||||
|
outType = xml;
|
||||||
|
}
|
||||||
return outType;
|
return outType;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user