fix DeviceProtection#GetSupportedProtocols response

add CDATA to escape XML document in response :
ProtocolList content is an XML document that should be escaped
See  section 2.4.3.1 of the DeviceProtection spec
http://upnp.org/specs/gw/UPnP-gw-DeviceProtection-v1-Service.pdf

see PR #178
This commit is contained in:
Thomas Bernard 2015-12-13 00:24:05 +01:00
parent e76dd788c4
commit f076f368bd
1 changed files with 1 additions and 1 deletions

View File

@ -2030,7 +2030,7 @@ GetSupportedProtocols(struct upnphttp * h, const char * action, const char * ns)
static const char resp[] = static const char resp[] =
"<u:%sResponse " "<u:%sResponse "
"xmlns:u=\"%s\">" "xmlns:u=\"%s\">"
"<ProtocolList>%s</ProtocolList>" "<ProtocolList><![CDATA[%s]]></ProtocolList>"
"</u:%sResponse>"; "</u:%sResponse>";
char body[1024]; char body[1024];
int bodylen; int bodylen;