HTTP response containing XML book-ended by unexpected characters



We are integrating with a proprietary search system and have noticed that the XML sent back from the system is book-ended by additional characters/digits when we only expected to see XML (Ex. samples below). We can parse around this but it is unexpected as it relates to the stated Content-Type.


Can someone explain what this might be... is this related to the chucked encoding or have we missed something related to some standard HTTP encoding behaviour?



HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 24 Dec 2014 10:10:23 GMT
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding

99
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><blah>hello</blah>
0


Note the 99 and 0.



HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 24 Dec 2014 10:01:52 GMT
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding

a3
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><blah>world</blah>
0


Note the a3 and 0.


No comments:

Post a Comment