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
This commit is contained in:
yjogol
2011-09-19 17:57:02 +00:00
parent 61f37097bb
commit 6689a74a00

View File

@@ -368,10 +368,14 @@ void CyhookHandler::printf(const char *fmt, ...) {
TOutType CyhookHandler::checkOutput() {
// get outType
outType = plain; // plain
if (ParamList["format"] == "json" || !(ParamList["json"].empty()) )
outType = json;
else if (ParamList["format"] == "xml" || !(ParamList["xml"].empty()) )
outType = xml;
if(!(ParamList.empty())) {
if ((ParamList.find("format") != ParamList.end() && ParamList["format"] == "json")
|| (ParamList.find("json") != ParamList.end() && !(ParamList["json"].empty())) )
outType = json;
else if ((ParamList.find("format") != ParamList.end() && ParamList["format"] == "xml")
|| (ParamList.find("xml") != ParamList.end() && !(ParamList["xml"].empty())) )
outType = xml;
}
return outType;
}
//-----------------------------------------------------------------------------