dkassemos has asked for the wisdom of the Perl Monks concerning the following question:

I have a java app that is sending post data to a perl CGI page but the post data is GZipped by "java.util.zip.GZIPOutputStream" what module should I include in the cgi script to read this compressed post data?

Replies are listed 'Best First'.
Re: Read Compressed Post data
by JavaFan (Canon) on Sep 01, 2009 at 00:57 UTC
    Compress::Zlib
      I have added module and still no useable data
      use CGI; use Compress::Zlib; print "Content-type: text/html\n\n"; read (STDIN, $output, $ENV{"CONTENT_LENGTH"}); $PostRecords = uncompress($output) ; print "MESSAGE was $PostRecords\n"; print "MESSAGE is on the MSMQ";
      am I missing something? any suggestions are greatly appreciated
        Don't you need
        my $zip = param('zip'); $zip = uncompress($zip);
        Are you sure the data is gzipped? What happens if you save the input to a file and use file on it? What does it say? Can you uncompress it with gzip?
Re: Read Compressed Post data
by Anonymous Monk on Sep 01, 2009 at 01:29 UTC