minisoap.c: Content type with charset=utf-8

UPnP Device Architecture 1.0 (3.2.1 p48)
CONTENT-TYPE
Required. Must be text/xml. Should include character coding used, which must be “utf-8”.

UPnP Device Architecture 1.1 (3.2.1 p75)
CONTENT-TYPE
REQUIRED. Field value MUST be “text/xml; charset="utf-8" ”
This commit is contained in:
Thomas Bernard 2024-01-04 01:04:04 +01:00
parent 5380a08693
commit a6aa371166
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
4 changed files with 18 additions and 3 deletions

View File

@ -1,6 +1,9 @@
$Id: Changelog.txt,v 1.259 2023/06/15 22:42:36 nanard Exp $
$Id: Changelog.txt,v 1.260 2024/01/04 00:32:52 nanard Exp $
miniUPnP client Changelog.
2024/01/04:
includes charset="utf-8" in Content-Type
2023/06/15:
Make User-Agent compliant.
listdevices => upnp-listdevices

View File

@ -6,9 +6,13 @@
#if 0
/* according to "UPnP Device Architecture 1.0" */
#define UPNP_VERSION_MAJOR 1
#define UPNP_VERSION_MINOR 0
#define UPNP_VERSION_STRING "UPnP/1.0"
#else
/* according to "UPnP Device Architecture 1.1" */
#define UPNP_VERSION_MAJOR 1
#define UPNP_VERSION_MINOR 1
#define UPNP_VERSION_STRING "UPnP/1.1"
#endif

View File

@ -1,4 +1,4 @@
/* $Id: miniupnpcstrings.h.in,v 1.6 2014/11/04 22:31:55 nanard Exp $ */
/* $Id: miniupnpcstrings.h.in,v 1.7 2023/07/05 22:43:50 nanard Exp $ */
/* Project: miniupnp
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* Author: Thomas Bernard
@ -13,9 +13,13 @@
#if 0
/* according to "UPnP Device Architecture 1.0" */
#define UPNP_VERSION_MAJOR 1
#define UPNP_VERSION_MINOR 0
#define UPNP_VERSION_STRING "UPnP/1.0"
#else
/* according to "UPnP Device Architecture 1.1" */
#define UPNP_VERSION_MAJOR 1
#define UPNP_VERSION_MINOR 1
#define UPNP_VERSION_STRING "UPnP/1.1"
#endif

View File

@ -1,4 +1,4 @@
/* $Id: minisoap.c,v 1.31 2023/06/15 21:47:50 nanard Exp $ */
/* $Id: minisoap.c,v 1.32 2023/07/05 22:43:50 nanard Exp $ */
/* vim: tabstop=4 shiftwidth=4 noexpandtab
* Project : miniupnp
* Author : Thomas Bernard
@ -92,7 +92,11 @@ int soapPostSubmit(SOCKET fd,
"Host: %s%s\r\n"
"User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
"Content-Length: %d\r\n"
#if (UPNP_VERSION_MAJOR == 1) && (UPNP_VERSION_MINOR == 0)
"Content-Type: text/xml\r\n"
#else
"Content-Type: text/xml; charset=\"utf-8\"\r\n"
#endif
"SOAPAction: \"%s\"\r\n"
"Connection: Close\r\n"
"Cache-Control: no-cache\r\n" /* ??? */