in reply to Read Compressed Post data

Compress::Zlib

Replies are listed 'Best First'.
Re^2: Read Compressed Post data
by dkassemos (Novice) on Sep 01, 2009 at 13:47 UTC
    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?
        saving to file and guunzip results in invalid format The actual java code sending the data looks like this
        urlos = connection.getOutputStream(); if(compress) {bufos = new BufferedOutputStream(new GZIPOutputStream(urlos)); } else { bufos = new BufferedOutputStream(urlos);
        so I assume that the data is GZIP compressed before being sent by java app and the switch to not use compress was not coded so it is always compressed