Andrew Maltsev wrote: > Here is the situation. There is sort of web service (Ariba buyer for > those who cares) that posts plain unencoded XML using POST method to a > mod_perl 1.x application. > > Somewhere at the very top the application does > > use CGI; > my $cgi=CGI->new(); > > and then passes this $cgi reference around. Assuming that this CANNOT BE > CHANGED, i.e. we get called sometime in the middle and have no control > over what's above us, is there a way to get the XML message posted to us? > > $r->content returns '' as it was already called once by CGI. CGI does > not save the content anywhere -- it parses it instead. And while > parsing, it assumes that arguments can be separated by both ';' and '&'. > So that if we join arguments back we either convert all ';'s into '&'s > or vice versa. > > Any ideas? > > So far I can only see customizing CGI.pm to make it save original > POST'ed content.
if you're using Apache::Registry for your cgi script then you can try something like this: http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-CachePOSTRegistry-0.01.tar.gz sorry there are not docs at the moment, but basically all you do is change PerlHandler Apache::Registry to PerlHandler Apache::CachePOSTRegistry please note that the module is experimental - I hacked it together and made sure it worked, but that's about all :) good luck --Geoff -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html