I get a POST request with
CONTENT_TYPE: application/octet-stream
I get all data like this
my $cgiQuery = CGI->new() or die();
my $cgiData = $cgiQuery->Vars;
my $getQuery = CGI->new($ENV{QUERY_STRING});
my $getData = $getQuery->Vars;
foreach my $getKey(keys %{$getData})
{
$cgiData->{$getKey} = $getData->{$getKey};
}
my $data = $cgiQuery->param('POSTDATA');
But when i try to print it
print Dumper($data) ."\n";
print Dumper($cgiData) ."\n";
I get this:
$VAR1 = 'type=catalog&mode=file&filename=offers0_14.xml';
$VAR1 = {
'POSTDATA' => 'type=catalog&mode=file&filename=offers0_14.xml',
'session' => 'aa4979ad18f64e4d959dd16444cee5fd'
};
How can i get and upload file filename=offers0_14.xml to the server?
The solution is next, That POSTDATA is binary file. So, i got that file by this code