using 0.710.07 with Bugzilla 3.2.2 and Testopia 2.2. I've found that certain fields I'm retrieving via XMLRPC include the character sequence
(ampersand hash x d semi-colon), apparently the XML encoding for a carriage return. when such a character is encountered, my client barfs with something like:
Failed to parse servers response: XML document structures must start and end within the same entity.
looking at the raw TCP/HTTP with wireshark, its protocol analyzer is also confused, seeing garbage at the end of the XML response (an incomplete element, typically), and then additional HTTP data which is in fact the remainder of the XML data. basically the content-length is being set incorrectly, I believe because somewhere the
is being interpreted as a single character -- the extent to which content-length is off does seem to correspond to the number of
I see comments indicative that this sort of thing is recognized as a potential issue in HTTP.pm:
# what's this all about?
# unfortunately combination of LWP and Perl 5.6.1 and later has bug
# in sending multibyte characters. LWP uses length() to calculate
# content-length header and starting 5.6.1 length() calculates chars
# instead of bytes. 'use bytes' in THIS file doesn't work, because
but the code therein does not seem to handle this situation.
Log in to post a comment.