in reply to Re: Read Compressed Post data
in thread Read Compressed Post data

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

Replies are listed 'Best First'.
Re^3: Read Compressed Post data
by Anonymous Monk on Sep 01, 2009 at 13:53 UTC
    Don't you need
    my $zip = param('zip'); $zip = uncompress($zip);
Re^3: Read Compressed Post data
by JavaFan (Canon) on Sep 01, 2009 at 14:19 UTC
    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
        Well, if what you get isn't actually uncompressable with gunzip, then it could very well be that it's not actually in gzip format, is it?