Thanks for answering my zip problem question relating to embperl - one question thou - 
what was the difference between your code and mine?

Yours:

####################################################

You must set $escmode = 0 to be able to send binary data. When $escmode = 0,
Embperl also handles null bytes correctly. Since you have done this already,
null bytes shouldn't be the issue, but your example code will insert some \n
before your binary data, because of the line breaks between the blocks,
better write it like the following:

[- use MYLIB; use  CGI qw/:standard :html3 escape/;
-][$ var $status  $msg $file_hdl $filestate $version $offset $buffer
$save_name $save_rp $save_type $name $filename
$][-
 $escmode =0;
 ($save_name, $save_rp,$save_type) = split /:/, $fdat{'filelist'};





####################################################




Mine



####################################################






[- use MYLIB; use  CGI qw/:standard :html3 escape/;-]
[$ var $status  $msg $file_hdl $filestate $version $offset $buffer $save_name $save_rp 
$save_type $name $filename
$]
[-
 $escmode =0;
 ($save_name, $save_rp,$save_type) = split /:/, $fdat{'filelist'};

($status,$msg,$file_hdl,$filestate,$version) = 
MYLIB::view_file('1.1',$save_name,$save_rp,$save_type);

$filename="test.zip";

$http_headers_out{'Content-Disposition'} = ": attachment; filename=$filename";

$http_headers_out{'Content-type'}= 'x-application/octet-stream';
$http_headers_out{'Content-encoding'}='x-gzip';

    while (read($file_hdl, $buffer, 1024) ) {

       print OUT "$buffer";
    }

   close($file_hdl);

-]

####################################################

Thanks.

Michael Clarke
IRD Open Systems Team

Level 4, Telecom House
13-27 Manners Street
Wellington

Phone: +64 (04) 8031423
Mobile: +64 021 455 218
email: [EMAIL PROTECTED]
email: [EMAIL PROTECTED]

Michael Clarke
IRD Open Systems Team

Level 4, Telecom House
13-27 Manners Street
Wellington

Phone: +64 (04) 8031423
Mobile: +64 021 455 218
email: [EMAIL PROTECTED]
email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to