From 506b646c1947ce7cefe0d28a90b083a48f6780df Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 17 Dec 2012 12:58:24 +0100 Subject: [PATCH] nhttpd: skip doubles decode on channlename, revert f969678b20d3788ee08608eba880238fd698903d Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ed318d97bc7ab06299e9504c7e3249cd8dc0324c Author: Jacek Jendrzej Date: 2012-12-17 (Mon, 17 Dec 2012) --- src/nhttpd/yhttpd_core/helper.cpp | 3 --- src/nhttpd/yhttpd_core/yrequest.cpp | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nhttpd/yhttpd_core/helper.cpp b/src/nhttpd/yhttpd_core/helper.cpp index d529127fc..e2449fbbd 100644 --- a/src/nhttpd/yhttpd_core/helper.cpp +++ b/src/nhttpd/yhttpd_core/helper.cpp @@ -203,12 +203,9 @@ std::string decodeString(std::string encodedString) { iStr = strtoul(hex, NULL, 16); /* convert to Hex char */ result += (char) iStr; count += 3; -#if 0 -//why decode '+' to ' ' ? } else if (string[count] == '+') { result += ' '; count++; -#endif } else { result += string[count]; count++; diff --git a/src/nhttpd/yhttpd_core/yrequest.cpp b/src/nhttpd/yhttpd_core/yrequest.cpp index 999903915..84ccc5274 100644 --- a/src/nhttpd/yhttpd_core/yrequest.cpp +++ b/src/nhttpd/yhttpd_core/yrequest.cpp @@ -161,7 +161,11 @@ bool CWebserverRequest::ParseParams(std::string param_string) { if (!ySplitStringExact(param_string, "&", param, param_string)) ende = true; if (ySplitStringExact(param, "=", name, value)) { - value = trim(decodeString(value)); + if("channelname" == name){//skip doubles decode on channlename + value = trim((value)); + }else{ + value = trim(decodeString(value)); + } if (ParameterList[name].empty()) ParameterList[name] = value; else {