miniupnpd: Content-Type is now text/xml; charset="utf-8" to conform with UDA v1.1

This commit is contained in:
Thomas Bernard 2012-09-28 11:12:01 +02:00
parent 727eaeb2e8
commit 9d94d08bd8
2 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,7 @@ $Id: Changelog.txt,v 1.309 2012/09/27 16:01:10 nanard Exp $
UPC must be a 12 decimal digit code
SetDefaultConnectionService() checks its argumnents in UPNP_STRICT mode
Support for Accept-Language/Content-Language HTTP headers
Content-Type is now text/xml; charset="utf-8" to conform with UDA v1.1
2012/09/20:
Cleaning code in ipfw (Jardel Weyrich)

View File

@ -655,7 +655,6 @@ Process_upnphttp(struct upnphttp * h)
static const char httpresphead[] =
"%s %d %s\r\n"
/*"Content-Type: text/xml; charset=\"utf-8\"\r\n"*/
"Content-Type: %s\r\n"
"Connection: close\r\n"
"Content-Length: %d\r\n"
@ -690,11 +689,14 @@ BuildHeader_upnphttp(struct upnphttp * h, int respcode,
}
h->res_buf_alloclen = templen;
}
h->res_sent = 0;
h->res_buflen = snprintf(h->res_buf, h->res_buf_alloclen,
httpresphead, h->HttpVer,
respcode, respmsg,
(h->respflags&FLAG_HTML)?"text/html":"text/xml",
(h->respflags&FLAG_HTML)?"text/html":"text/xml; charset=\"utf-8\"",
bodylen);
/* Content-Type MUST be 'text/xml; charset="utf-8"' according to UDA v1.1 */
/* Content-Type MUST be 'text/xml' according to UDA v1.0 */
/* Additional headers */
#ifdef ENABLE_EVENTS
if(h->respflags & FLAG_TIMEOUT) {