From 92e6173a975f9157d96773b636ed4f14a798a9d7 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 16 Feb 2016 10:56:32 +0100 Subject: [PATCH] with UDA 1.1 content-type should include charset --- miniupnpd/upnpevents.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miniupnpd/upnpevents.c b/miniupnpd/upnpevents.c index 6b31021..a36a60f 100644 --- a/miniupnpd/upnpevents.c +++ b/miniupnpd/upnpevents.c @@ -385,7 +385,11 @@ static void upnp_event_prepare(struct upnp_event_notify * obj) static const char notifymsg[] = "NOTIFY %s HTTP/1.1\r\n" "Host: %s%s\r\n" - "Content-Type: text/xml\r\n" +#if (UPNP_VERSION_MAJOR == 1) && (UPNP_VERSION_MINOR == 0) + "Content-Type: text/xml\r\n" /* UDA v1.0 */ +#else + "Content-Type: text/xml; charset=\"utf-8\"\r\n" /* UDA v1.1 or later */ +#endif "Content-Length: %d\r\n" "NT: upnp:event\r\n" "NTS: upnp:propchange\r\n"