Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ohNet sends incorrect Content-Type header
09-04-2013, 11:03 AM
Post: #1
ohNet sends incorrect Content-Type header
ohNet is sending an incorrect Content-Type header for device XML descriptions and service XML descriptions.

According to the UPnP Device Architecture (page 65):

CONTENT-TYPE
REQUIRED. Field value MUST be “text/xml; charset="utf-8" ” for description documents.

ohNet is sending:

Content-Type: application/xml; charset="utf-8"

Most control points ignore this incorrect value, but some (e.g., OPPO BDP-103) refuse to accept the description document and therefore can't discover the media server.

The fix is to change line 23 of Env.cpp from

const char kOhNetMimeTypeXml[] = "application/xml";

to

const char kOhNetMimeTypeXml[] = "text/xml";
Find all posts by this user
09-04-2013, 11:09 AM
Post: #2
RE: ohNet sends incorrect Content-Type header
(09-04-2013 11:03 AM)simoncn Wrote:  ohNet is sending an incorrect Content-Type header for device XML descriptions and service XML descriptions.


The fix is to change line 23 of Env.cpp from
const char kOhNetMimeTypeXml[] = "application/xml";
to

const char kOhNetMimeTypeXml[] = "text/xml";

Thanks, I'll change this today.
Find all posts by this user


Forum Jump: