|
@@ -1,8 +1,8 @@
|
|
-/* $Id: minisoap.c,v 1.30 2020/11/09 19:27:42 nanard Exp $ */
|
|
|
|
|
|
+/* $Id: minisoap.c,v 1.32 2023/07/05 22:43:50 nanard Exp $ */
|
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
* Project : miniupnp
|
|
* Project : miniupnp
|
|
* Author : Thomas Bernard
|
|
* Author : Thomas Bernard
|
|
- * Copyright (c) 2005-2020 Thomas Bernard
|
|
|
|
|
|
+ * Copyright (c) 2005-2023 Thomas Bernard
|
|
* This software is subject to the conditions detailed in the
|
|
* This software is subject to the conditions detailed in the
|
|
* LICENCE file provided in this distribution.
|
|
* LICENCE file provided in this distribution.
|
|
*
|
|
*
|
|
@@ -90,9 +90,13 @@ int soapPostSubmit(SOCKET fd,
|
|
headerssize = snprintf(headerbuf, sizeof(headerbuf),
|
|
headerssize = snprintf(headerbuf, sizeof(headerbuf),
|
|
"POST %s HTTP/%s\r\n"
|
|
"POST %s HTTP/%s\r\n"
|
|
"Host: %s%s\r\n"
|
|
"Host: %s%s\r\n"
|
|
- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
|
|
|
|
|
|
+ "User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
|
|
"Content-Length: %d\r\n"
|
|
"Content-Length: %d\r\n"
|
|
|
|
+#if (UPNP_VERSION_MAJOR == 1) && (UPNP_VERSION_MINOR == 0)
|
|
"Content-Type: text/xml\r\n"
|
|
"Content-Type: text/xml\r\n"
|
|
|
|
+#else
|
|
|
|
+ "Content-Type: text/xml; charset=\"utf-8\"\r\n"
|
|
|
|
+#endif
|
|
"SOAPAction: \"%s\"\r\n"
|
|
"SOAPAction: \"%s\"\r\n"
|
|
"Connection: Close\r\n"
|
|
"Connection: Close\r\n"
|
|
"Cache-Control: no-cache\r\n" /* ??? */
|
|
"Cache-Control: no-cache\r\n" /* ??? */
|