onsearch
view release on metacpan or search on metacpan
cgi/archive.cgi view on Meta::CPAN
###
### POST means that a file is being uploaded.
###
if ($req_method =~ /POST/) {
my ($q, $boundary, $content, @content, $content_length, $cs);
my ($fname, $content_type, $file, @plugins, $tmpfname, $oldrs);
($boundary) = ($ENV{CONTENT_TYPE} =~ /boundary=(.*)/i);
$content_length = $ENV{CONTENT_LENGTH};
binmode STDIN, ':crlf';
read STDIN, $content, $content_length;
@content = split m"--$boundary", $content;
foreach my $cs (@content) {
if ($cs =~ /filename=/is) {
($fname) = ($cs =~ /filename=\"(.*)\"/);
($content_type) = ($cs =~ /Content-Type:\s+(\S+)/);
($file) = ($cs =~ /\015\012\015\012(.*)\015\012/s);
}
}
$fname = basename ($fname);
@plugins = $cfg -> lst (qw/PlugIn/);
if (! scalar grep /$content_type/, @plugins) {
( run in 0.632 second using v1.01-cache-2.11-cpan-71847e10f99 )