Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This looks like a bug in the RPC::XML::Server module related to compression.
Here's what's going on. The server decides it needs to compress the response data because it's over the compress_thresh threshold (defaults to 4 kB). It does this fine as you've discovered in the packet trace but what it's not doing is sending a Content-Type response header of deflate (in fact, it tries to set it but the value of $compress is never assigned). This causes the client to not know that it needs to filter the response through Compress::Zlib and fails silently when it tries to parse the XML. To overcome this, you can set the compress_thresh manually to an arbitrarily large number so the server never thinks it needs to compress the response. Otherwise you'll need to patch the RPC/XML/Server.pm file yourself so that the server sends the correct response header. Basically all you need to do is add a $compress = $self->compress to the section of the code that compresses the response xml. (diff follows) *** 1351,1356 **** --- 1351,1357 ---- } elsif ($req->method eq 'POST') { + $compress = $self->compress; # Get a XML::Parser::ExpatNB object $parser = $self->parser->parse();This code is already in the Apache::RPC::Server module that is included in this package so I'm sure it's just an oversight on the part of the module writer. HTH - brian In reply to Re: RPC::XML server seems to occasionally send corrupted responses
by bpphillips
|
|