We came across this bug when trying to traverse an
authenticating proxy-server. It turns out that for HTTP
1.1 requests, chunking is on by default (and we
couldn't figure out how to turn it off). Chunking
allows apache to start serving a request even though it
doesn't know the content length, and it chunks for all
dynamic data. It does this by adding a hex value at the
beginning of a chunk denoting the length of the chunk,
and then a 0 at the end of the chunk. Because XML-RPC
for PHP puts in a content-length header, apache gets a
bit confused when it also tries to chunk. What ends up
happening is the content-length produced by php is a
bit short, because those extra hex characters that
apache inserts for chunking aren't accounted for. Of
course, clients on the other end can't make heads or
tails of this response. The simple solution for us
(after many days of hair-pulling and going down wrong
roads) was to delete that content-length header, which
solves the problem for 1.1 requests, but will cause a
problem for 1.0 requests. There should probably be a
quick check for the HTTP version before the headers are
sent. This is at line 177 of xmlrpcs.inc (function
service()). We're using the 1.01 version.
Julian
Anonymous
Logged In: YES
user_id=114789
Sorry, I've got no ideas at all about the pbl at hand, but I think
Eric Kidd also found that out using his C library for XML-RPC
(based on libwww for http). You might forward this to him/ask
if he's got any advice...
http://xmlrpc-c.sourceforge.net/
Logged In: YES
user_id=114789
Hey, now I know what you mean (bee studying... :).
Gonna submit soon a patch that fixes chunked encoding (by
decoding it), maybe you can test it.
BTW, we're sending HTTP 1.0 requests, so we should get NO
chunked encoding http 1.1. back!