Result:
found more than 723 distributions - search limited to the first 2001 files matching your query ( run in 1.582 )


AnyEvent-WebSocket-Server

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - No functional change from 0.07.
        - TLS tests are now optional. They are run when Net::SSLeay and AnyEvent::TLS are installed.

0.071   2016-08-07
        No functional change from 0.07.
        CPAN somehow failed to publish 0.07. So I just bumped the version and uploaded it again.

0.07    2016-08-06
        [ENHANCEMENT]
        - Add "ssl_key_file" and "ssl_cert_file" options.
          Now this module officially supports TLS (gh #2 by izarraga)

 view all matches for this distribution


AnyEvent-XMPP

 view release on metacpan or  search on metacpan

lib/AnyEvent/XMPP/Ext/VCard.pm  view on Meta::CPAN

   });

   $vcard->store ($con, undef, { NICKNAME => 'net-xmpp2' }, sub {
      my ($error) = @_;
      if ($error) {
         warn "upload failed: " . $error->string . "\n";
      } else {
         print "upload successful\n";
      }
   });

   $disco->enable_feature ($vcard->disco_feature);

 view all matches for this distribution


AnyEvent-YACurl

 view release on metacpan or  search on metacpan

lib/AnyEvent/YACurl.pm  view on Meta::CPAN


=item CURLOPT_READFUNCTION

(See L<curl documentation|https://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html>)

Read callback for data uploads. This will be called with one argument, C<length>, indicating
the maximum size of data to be read. The callback should either return a scalar with the data, an
empty string to indicate the end of the transfer, or C<undef> to abort the transfer.

    CURLOPT_READFUNCTION => sub {
        my $length= shift;

 view all matches for this distribution


Apache-ASP

 view release on metacpan or  search on metacpan

ASP.pm  view on Meta::CPAN


=head2 File Uploads

=item FileUploadMax

default 0, if set will limit file uploads to this
size in bytes.  This is currently implemented by 
setting $CGI::POST_MAX before handling the file
upload.  Prior to this, a developer would have to
hardcode a value for $CGI::POST_MAX to get this 
to work.

  PerlSetVar 100000

ASP.pm  view on Meta::CPAN

a security risk in that other users on the operating system could 
potentially read this file while the script is running. 

The path to the temp file will be available at
$Request->{FileUpload}{$form_field}{TempFile}.
The regular use of file uploads remains the same
with the <$filehandle> to the upload at 
$Request->{Form}{$form_field}.  Please see the CGI section
for more information on file uploads, and the $Request
section in OBJECTS.

  PerlSetVar FileUploadTemp 0

=head1 SYNTAX

ASP.pm  view on Meta::CPAN

of the form data, or body, sent by the client request.
If $length is not given, will return all of the form data.
This data is the raw data sent by the client, without any
parsing done on it by Apache::ASP.

Note that BinaryRead will not return any data for file uploads.
Please see the $Request->FileUpload() interface for access
to this data.  $Request->Form() data will also be available
as normal.

=item $Request->ClientCertificate()

ASP.pm  view on Meta::CPAN


For more information on cookies in ASP, please read $Response->Cookies()

=item $Request->FileUpload($form_field, $key)

API extension.  The FileUpload interface to file upload data is
stabilized.  The internal representation of the file uploads
is a hash of hashes, one hash per file upload found in 
the $Request->Form() collection.  This collection of collections
may be queried through the normal interface like so:

  $Request->FileUpload('upload_file', 'ContentType');
  $Request->FileUpload('upload_file', 'FileHandle');
  $Request->FileUpload('upload_file', 'BrowserFile');
  $Request->FileUpload('upload_file', 'Mime-Header');
  $Request->FileUpload('upload_file', 'TempFile');

  * note that TempFile must be use with the UploadTempFile 
    configuration setting.

The above represents the old slow collection interface, 
but like all collections in Apache::ASP, you can reference
the internal hash representation more easily.

  my $fileup = $Request->{FileUpload}{upload_file};
  $fileup->{ContentType};
  $fileup->{BrowserFile};
  $fileup->{FileHandle};
  $fileup->{Mime-Header};
  $fileup->{TempFile};

ASP.pm  view on Meta::CPAN

   $Form = $Request->Form;
 }
 # then in ASP scripts
 <%= $Form->{var} %>

File upload data will be loaded into $Request->Form('file_field'), 
where the value is the actual file name of the file uploaded, and 
the contents of the file can be found by reading from the file
name as a file handle as in:

 while(read($Request->Form('file_field_name'), $data, 1024)) {};

For more information, please see the CGI / File Upload section,
as file uploads are implemented via the CGI.pm module.  An
example can be found in the installation 
samples ./site/eg/file_upload.asp

=item $Request->Params($name)

API extension. If RequestParams CONFIG is set, the $Request->Params 
object is created with combined contents of $Request->QueryString 

ASP.pm  view on Meta::CPAN

	print $query->header();
	print $query->start_form();

=item File Upload

CGI.pm is used for implementing reading the input from file upload.  You
may create the file upload form however you wish, and then the 
data may be recovered from the file upload by using $Request->Form().
Data from a file upload gets written to a file handle, that may in
turn be read from.  The original file name that was uploaded is the 
name of the file handle.

	my $filehandle = $Request->Form('file_upload_field_name');
	print $filehandle; # will get you the file name
	my $data;
	while(read($filehandle, $data, 1024)) {
		# data from the uploaded file read into $data
	};

Please see the docs on CGI.pm (try perldoc CGI) for more information
on this topic, and ./site/eg/file_upload.asp for an example of its use.
Also, for more details about CGI.pm itself, please see the web site:

    http://search.cpan.org/dist/CGI/

Occasionally, a newer version of CGI.pm will be released which breaks
file upload compatibility with Apache::ASP.  If you find this to occur,
then you might consider downgrading to a version that works.  For example,
one can install a working CGI.pm v2.78 for a working version, and to 
get old versions of this module, one can go to BACKPAN at:

    http://backpan.cpan.org/modules/by-authors/id/L/LD/LDS/

There is also $Request->FileUpload() API extension that you can use to get 
more data about a file upload, so that the following properties are
available for querying:

  my $file_upload = $Request->{FileUpload}{upload_field};
  $file_upload->{BrowserFile}
  $file_upload->{FileHandle}
  $file_upload->{ContentType}

  # only if FileUploadTemp is set
  $file_upload->{TempFile}	

  # whatever mime headers are sent with the file upload
  # just "keys %$file_upload" to find out
  $file_upload->{?Mime-Header?}

Please see the $Request section in OBJECTS for more information.

=back

ASP.pm  view on Meta::CPAN

The following objects in Apache::ASP respond as Collections:

        $Application
	$Session
	$Request->FileUpload *
	$Request->FileUpload('upload_file') *
	$Request->Form
	$Request->QueryString
	$Request->Cookies
	$Response->Cookies
	$Response->Cookies('some_cookie')	

ASP.pm  view on Meta::CPAN

and debugging an ASP application easier.  For starters,
you will find some helpful hints by reading the 
$Response->Debug() API extension, and the Debug
configuration directive.

=item How are file uploads handled?

Please see the CGI section.  File uploads are implemented
through CGI.pm which is loaded at runtime only for this purpose.
This is the only time that CGI.pm will be loaded by Apache::ASP,
which implements all other cgi-ish functionality natively.  The
rationale for not implementing file uploads natively is that 
the extra 100K in memory for CGI.pm shouldn't be a big deal if you 
are working with bulky file uploads.

=item How do I access the ASP Objects in general?

All the ASP objects can be referenced through the main package with
the following notation:

ASP.pm  view on Meta::CPAN

 :) Francesco Pasqualini, for bug fixes with stand alone CGI mode on Win32
 :) Szymon Juraszczyk, for better ContentType handling for settings like Clean.
 :) Oleg Kobyakovskiy, for identifying the double Session_OnEnd cleanup bug.
 :) Peter Galbavy, for reporting numerous bugs and maintaining the OpenBSD port.
 :) Richard Curtis, for reporting and working through interesting module 
    loading issues under mod_perl2 & apache2, and pushing on the file upload API.
 :) Rune Henssel, for catching a major bug shortly after 2.47 release,
    and going to great lengths to get me reproducing the bug quickly.
 :) Broc, for keeping things filter aware, which broke in 2.45,
    & much help on the list.
 :) Manabu Higashida, for fixes to work under perl 5.8.0

ASP.pm  view on Meta::CPAN

 ++ mod_perl 2 optmizations, there was a large code impact on this,
   as much code was restructured to reduce the differences between
   mod_perl 1 and mod_perl 2, most importantly, Apache::compat is
   no longer used

 + preloaded CGI for file uploads in the mod_perl environment

 - When XSLT config is set, $Response->Redirect() should work now
   Thanks to Marcus Zoller for pointing problem out

 + Added CookieDomain setting, documented, and added test to cover 

ASP.pm  view on Meta::CPAN

   hurt new developers working in mod_perl environments.  The downside
   is that these script will have a performance penalty having to be
   recompiled each invocation, but this will kill many closure caching 
   bugs that are hard to detect.

 - $Request->FileUpload('upload_file', 'BrowserFile') would return
   a glob before that would be the file name in scalar form.  However
   this would be interpreted as a reference incorrectly.  The fix
   is to make sure this is always a scalar by stringifying 
   this data internally.  Thanks to Richard Curtis for pointing
   out this bug.

ASP.pm  view on Meta::CPAN

   Devel::Symdump 
   Config 
   lib 
   MLDBM::Sync::SDBM_File

 +When FileUploadMax bytes is exceeded for a file upload, there will not
  be an odd error anymore resulting from $CGI::POST_MAX being triggered,
  instead the file upload input will simply be ignored via $CGI::DISABLE_UPLOADS.
  This gives the developer the opportunity to tell the user the the file upload
  was too big, as demonstrated by the ./site/eg/file_upload.asp example.

  To not let the web client POST a lot of data to your scripts as a form
  of a denial of service attack use the apache config LimitRequestBody for the 
  max limits.  You can think of PerlSetVar FileUploadMax as a soft limit, and 
  apache's LimitRequestBody as a hard limit.

 --Under certain circumstances with file upload, it seems that IsClientConnected() 
  would return an aborted client value from $r->connection->aborted, so
  the buffer output data would not be flushed to the client, and 
  the HTML page would return to the browser empty.  This would be under
  normal file upload use.  One work-around was to make sure to initialize
  the $Request object before $Response->IsClientConnected is called,
  then $r->connection->aborted returns the right value.
  
  This problem was probably introduced with IsClientConnected() code changes
  starting in the 2.25 release.

ASP.pm  view on Meta::CPAN

=item $VERSION = 2.15; $DATE="06/12/2001";

 -Fix for running under perl 5.6.1 by removing parser optimization
  introduced in 2.11.

 -Now file upload forms, forms with ENCTYPE="multipart/form-data"
  can have multiple check boxes and select items marked for 
  @params = $Request->Form('param_name') functionality.  This 
  will be demonstrated via the ./site/eg/file_upload.asp example.

=item $VERSION = 2.11; $DATE="05/29/2001";

 +Parser optimization from Dariusz Pietrzak

ASP.pm  view on Meta::CPAN

  includes, global.asa, or scripts when changed.

 +FileUpload file handles cleanup at garbage collection
  time so developer does not have to worry about lazy coding
  and undeffing filehandles used in code.  Also set 
  uploaded filehandles to binmode automatically on Win32 
  platforms, saving the developer yet more typing.

 +FileUploadTemp setting, default 0, if set will leave
  a temp file on disk during the request, which may be 
  helpful for processing by other programs, but is also
  a security risk in that others could potentially read 
  this file while the script is running. 

  The path to the temp file will be available at
  $Request->{FileUpload}{$form_field}{TempFile}.
  The regular use of file uploads remains the same
  with the <$filehandle> to the upload at 
  $Request->{Form}{$form_field}.

 +FileUploadMax setting, default 0, currently an 
  alias for $CGI::POST_MAX, which determines the 
  max size for a file upload in bytes.  

 +SessionQueryParse only auto parses session-ids
  into links when a session-id COOKIE is NOT found.
  This feature is only enabled then when a user has
  disabled cookies, so the runtime penalty of this

ASP.pm  view on Meta::CPAN

  CGI subroutines, that were imported into other scripts
  and modules namespaces.

  A couple tweaks, and now StatINC & CGI play nice again ;)
  StatINCMatch should be safe to use in production with CGI. 
  This affects in particular environments that use file upload, 
  since CGI is loaded automatically by Apache::ASP to handle 
  file uploads.

  This fix should also affect other seemingly random 
  times when StatINC or StatINCMatch don't seem to do 
  the right thing.

ASP.pm  view on Meta::CPAN

  and example in ./eg/binary_write.htm

 +Implemented $Server->MapPath() and created example of its use
  in ./eg/server.htm

 -$Request->Form() now reads file uploads correctly with 
  the latest CGI.pm, where $Request->Form('file_field') returns
  the actual file name uploaded, which can be used as a file handle
  to read in the data.  Before, $Request->Form('file_field') would
  return a glob that looks like *Fh::filename, so to get the file
  name, you would have to parse it like =~ s/^\*Fh\:\://,
  which you no longer have to do.  As long as parsing was done as
  mentioned, the change should be backwards compatible.

 +Updated  +enhanced documentation on file uploads.  Created extra
  comments about it as an FAQ, and under $Response->Form(), the latter
  being an obvious place for a developer to look for it.

 +Updated ./eg/file_upload.asp to show use of non file form data, 
  with which we had a bug before.

 +Finished retieing *STDIN to cached STDIN contents, so that 
  CGI input routines may be used transparently, along side with
  use of $Request->Form()

 +Cleaned up and optimized $Request code

 +Updated documentation for CGI input & file uploads.  Created
  file upload FAQ.

 +Reworked ./eg/cgi.htm example to use CGI input routines
  after doing a native read of STDIN.

 ++Added dynamic includes with <!--include file=file args=@args-->

ASP.pm  view on Meta::CPAN


 -Multiple select forms now work in array context with $Response->Form()
	@values = $Response->Form('multi');

 -Better CGI.pm compatibility with $r->header_out('Content-type'),
  improved garbage collection under modperl, esp. w/ file uploads


=item $VERSION = 0.06; $DATE="12/21/1998";

 +Application_OnStart & Application_OnEnd event handlers support.

ASP.pm  view on Meta::CPAN


 +use strict; followed by use of objects like $Session is fine.

 -Multiple cookies may be set per script execution.

 +file upload implemented via CGI.pm

 ++global.asa implemented with events Session_OnStart and Session_OnEnd
  working appropriately.

 +StateDir configuration directive implemented.

ASP.pm  view on Meta::CPAN

	: will be upgraded to CGI method of doing asp
	: is not "correct" in anyway, so not documented for now
	  but still useful

 +strips DOS carriage returns from scripts automatically, so that
  programs like FrontPage can upload pages to UNIX servers
  without perl choking on the extra \r characters.


=item $VERSION = 0.05; $DATE="10/19/1998";

 view all matches for this distribution


Apache-AccessAbuse

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.002  Wed Apr  9 10:01:57 2003
	- I was too agressive: my local network is under restricted
access too! Add a PerlVar to allow access to the local network.

0.003  Thu Nov  6 18:55:44 2003
	- Write documentation and upload to PAUSE.

 view all matches for this distribution


Apache-Action

 view release on metacpan or  search on metacpan

lib/Apache/Action.pm  view on Meta::CPAN

	my $parms = $self->{Request}->parms;
	# Make a copy
	return { %{ $parms } };
}

sub upload {
	my $self = shift;
	# scalar/array context is passed on to this request.
	return $self->{Request}->upload(@_);
}

=head1 NAME

Apache::Action - A method dispatch mechanism for Apache

lib/Apache/Action.pm  view on Meta::CPAN


=item $action->params($name)

Return a hashref of all HTTP parameters, copying the data.

=item $action->upload

Return an Apache::Upload object as named.

=item $action->session($name)

 view all matches for this distribution


Apache-Album

 view release on metacpan or  search on metacpan

Album.pm  view on Meta::CPAN

	mkdir($new_dir, 0755);
      }
    }
    else {
      unless ($params{'New Album'}) {
	if (my $handle = $r->upload('filename')) {
	  my $filename = $handle->filename;
	  my ($type,$ext) = split(/\//,$handle->info("Content-type"));

	  if ($type eq 'image') {
	    # on NT $filename has \'s which we don't want!

Album.pm  view on Meta::CPAN

	    else {
	      $r->log_error("Problem opening $album_dir$local_path_info$filename for write: $!");
	    }
	  }
	  else {
	    $r->log_error("Will not allow upload of: $filename $type/$ext");
	  }
	}
      }
    }
  }

Album.pm  view on Meta::CPAN

    }
  }

  $r->print("</TR></TABLE></CENTER>\n");
  if ($settings{'EditMode'}) {
    $r->print(&file_upload());
  }
  $r->print("<hr>\n$settings{'Footer'}\n<hr>") if $settings{'Footer'};
  $r->print(<<EOF);
</BODY>
</HTML>

Album.pm  view on Meta::CPAN


  if ($settings->{'EditMode'}) {
    $r->print(qq!<FORM METHOD="POST">New Album:<INPUT TYPE="text" NAME="AlbumName"><INPUT TYPE="submit" NAME="New Album" VALUE="New Album"></FORM>!);

    unless (@dirs) {
      $r->print(&file_upload());
    }
  }


  $r->print(<<EOF);

Album.pm  view on Meta::CPAN

    }
    $r->print("\t</dl></dd>\n");
  }
}

# file_upload is just the html for the file upload
# it's in a sub since it will be called from multiple 
# places
sub file_upload {

  my $ret = <<EOF
<FORM METHOD="POST" ENCTYPE="multipart/form-data">
  <INPUT TYPE="submit" NAME="Upload" VALUE="Upload">
  <INPUT TYPE="file" NAME="filename" SIZE=50 MAXLENGTH=200>

Album.pm  view on Meta::CPAN

thumbnails, but before the end of the page.  Useful for links back to
a home page, mailto: tag, etc.

=item EditMode

Allows the user to create new albums and upload pictures.  Obviously
there are security implications here, so if EditMode is turned on that
location should probably have some kind of security.  Albums can share
the same AlbumDir, so you can have something like:

/albums      - ReadOnly version, no security
/albums_edit - Allow new album creation and picture uploads, 
               require authentication

both using the same AlbumDir.

=item AllowFinalResize

 view all matches for this distribution


Apache-AuthCookie

 view release on metacpan or  search on metacpan

lib/Apache/AuthCookie/Params/CGI.pm  view on Meta::CPAN


    my $length = $self->content_length;

    my $body = HTTP::Body->new($self->content_type, $length);

    # HTTP::Body creates temp files for uploads. we need to tell it to clean up
    # those files when the body goes out of scope.
    $body->cleanup(1);

    my $r = $self->request;

 view all matches for this distribution


Apache-Authen-Program

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.91  Fri Nov  8 13:38:17 2002
	- Apache::AuthenProgram -> Apache::Authen::Program.
	- Used h2xs for CPAN modlist-compatible Makefile.PL.

0.90  Mon Oct  7 10:07:00 2002
        - Prepared for CPAN upload.
      Thu Sep 26 07:18:00 2002
        - Adapted from from Apache::AuthenSmb module.

 view all matches for this distribution


Apache-AuthenProgram

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Apache::AuthenProgram.

0.90  Mon Oct  7 10:07:00 2002
        - Prepared for CPAN upload.
      Thu Sep 26 07:18:00 2002
        - Adapted from from Apache::AuthenSmb module.

 view all matches for this distribution


Apache-AuthzUserDir

 view release on metacpan or  search on metacpan

AuthzUserDir.pm  view on Meta::CPAN

<Directory> block and .htpasswd file can be used to
allow authenticated users only into their own UserDir 
(typically, public_html) directories.

This is especially useful with mod_dav and mod_ssl running on an 
alternate port for users to upload to their public webspace.

=head1 COPYRIGHT
Copyright (C) 2002, Peter Clark
All Rights Reserved

 view all matches for this distribution


Apache-AxKit-Plugin-Session

 view release on metacpan or  search on metacpan

lib/Apache/AxKit/Plugin/Session.pm  view on Meta::CPAN

    return if (!$full);
    return if $r->pnotes('INPUT');

    # from Apache::RequestNotes  
    my $maxsize   = $r->dir_config('MaxPostSize') || 1024;
    my $uploads   = $r->dir_config('DisableUploads') =~ m/Off/i ? 0 : 1;

    my $apr = Apache::Request->instance($r,
        POST_MAX => $maxsize,
        DISABLE_UPLOADS => $uploads,
    );
    $r->pnotes('INPUT',$apr->parms);
    $r->pnotes('UPLOADS',[ $apr->upload ]);
    if ($r ne $or) {
        $or->pnotes('INPUT',$r->pnotes('INPUT'));
        $or->pnotes('UPLOADS',$r->pnotes('UPLOADS'));
    }
}

 view all matches for this distribution


Apache-AxKit-Plugin-Upload

 view release on metacpan or  search on metacpan

lib/Apache/AxKit/Plugin/Upload.pm  view on Meta::CPAN

    }
    rename("$file.tmp",$file);
}

sub init {
    my ($r,$upload_id) = @_;
    my $destdir = $r->dir_config('AxUploadStatusDir') || return 0;
    $destdir = $r->document_root.'/'.$destdir if substr($destdir,0,1) ne '/';
    my $destloc = $r->dir_config('AxUploadStatusLocation') || return 0;
    my $format = lc($r->dir_config('AxUploadFormat')) || 'html';
    $location = "$destloc/$upload_id.$format";
    $file = "$destdir/$upload_id.$format";
    local(*FH);
    open(FH, ">$file.tmp") || warn("could not open $file.tmp: $!");
    print FH << "EOF";
<html>
  <head>

lib/Apache/AxKit/Plugin/Upload.pm  view on Meta::CPAN

    close(FH);
    rename("$file.tmp",$file);
}

sub is_running {
    my ($r,$upload_id) = @_;
    return 0 if ($running eq $upload_id);
    my $destdir = $r->dir_config('AxUploadStatusDir') || return 0;
    $destdir = $r->document_root.'/'.$destdir if substr($destdir,0,1) ne '/';
    my $format = lc($r->dir_config('AxUploadFormat')) || 'html';
    $file = $destdir."/".$upload_id.".".$format;
    local (*FH);
    sysopen(FH,$file.".lck",O_RDWR) || return undef;
    my $unlocked = flock(FH,LOCK_EX|LOCK_NB);
    close(FH);
    return !$unlocked;
}

sub upload_handler_html {
    my ($upload, $buf, $len, $hook_data) = @_;
    my ($sizedone, $lasttime) = @$hook_data;
    my $now = time();

    $sizedone += $len;
    $$hook_data[0] = $sizedone;

lib/Apache/AxKit/Plugin/Upload.pm  view on Meta::CPAN


sub handler {
    my ($r) = @_;

    my %args = $r->args;
    my $upload_id = $args{'axkit_upload_id'};
    $running = '';

    my $destdir = $r->dir_config('AxUploadStatusDir') || return OK;
    $destdir = $r->document_root.'/'.$destdir if substr($destdir,0,1) ne '/';
    my $destloc = $r->dir_config('AxUploadStatusLocation') || return OK;
    my $format = lc($r->dir_config('AxUploadFormat')) || 'html';
    $custom = $r->dir_config('AxUploadCustom');
    $file = "$destdir/$upload_id.$format";
    $location = "$destloc/$upload_id.$format";
    return OK unless $upload_id;
    return OK unless $r->method eq 'POST';
    $lock = new IO::Handle;
    sysopen($lock,$file.".lck",O_RDWR|O_CREAT) || return OK;
    my $unlocked = flock($lock,LOCK_EX|LOCK_NB);
    return OK if !$unlocked;

    $running = $upload_id;
    # from Apache::RequestNotes
    my $maxsize   = $r->dir_config('MaxPostSize') || 1024;
    my $uploads   = $r->dir_config('DisableUploads') =~ m/Off/i ? 0 : 1;

    $nf = new Number::Format(split(/ /,$r->dir_config('AxUploadNumberFormat')));

    $sizetotal = $r->header_in('Content-Length');
    $start = time();
    AxKit::Debug(3,"[Upload] managing upload: $sizetotal bytes, status in $destdir/$upload_id.$format");

    print_html($start, 0);

    my $apr = Apache::Request->instance($r,
        POST_MAX => $maxsize,
        DISABLE_UPLOADS => $uploads,
        HOOK_DATA => [ $file, $location, $nf, $sizetotal, 0, $start, -1 ],
        UPLOAD_HOOK => \&upload_handler_html,
    );
    $apr->parse;

    print_html(time(), $sizetotal);

lib/Apache/AxKit/Plugin/Upload.pm  view on Meta::CPAN

1;
__END__

=head1 NAME

Apache::AxKit::Plugin::Upload - upload tracking for AxKit

=head1 SYNOPSIS

In .htaccess:

  AxAddPlugin Apache::AxKit::Plugin::Upload
  PerlSetVar AxUploadStatusDir data/upload
  PerlSetVar AxUploadStatusLocation /data/upload
  PerlSetVar DisableUploads Off
  PerlSetVar MaxPostSize 30485760
  LimitRequestBody 30485760

Put this code on the form: (example using XSP)

  <form enctype="multipart/form-data" action="process.xsp?axkit_upload_id={$r->connection->user|"
      onsubmit="window.open('http://'+location.hostname+'{$r->dir_config('AxUploadStatusLocation').'/'.$r->connection->user}.html','axkit_upload','height=80,width=320,height=80')">
      ...
  </form>

=head1 DESCRIPTION

This plugin allows you to show a progress bar while uploading big files. This works
by opening a small window via JavaScript. That window is directed to a self-refreshing
HTML page which is continuously updated by this plugin.

Usually, three URLs are involved: The page starting the upload, the page receiving the
upload, and the status page. The receiving page I<must> have "axkit_upload_id=..." in
the I<query string>. That ID is used to identify the specific upload. Use a username or
a session ID or even a random number. You cannot have more than one upload for one ID.
The status page is named <AxUploadStatusDir>/<ID>.html

Set AxUploadStatusDir to where the files should be stored. Relative paths get
$r->document_root prepended. Set AxUploadStatusLocation to where the client can get
the files in AxUploadStatusDir.

lib/Apache/AxKit/Plugin/Upload.pm  view on Meta::CPAN

  Apache::AxKit::Plugin::Upload::progress($done,$total,"Processing... ($done/$total)");

regularly to update the progress bar. The window will automatically close when
$done == $total.

To see if an upload is already running, call:

  Apache::AxKit::Plugin::Upload::is_running($r,$id)

In some constellations, the upload progress bar won't appear or shows a 404. This
highly depends on your file layout. To fix that problem, create a tiny script that does:

  Apache::AxKit::Plugin::Upload::init($r,$id)
      if (!Apache::AxKit::Plugin::Upload::is_running($r,$id));

 view all matches for this distribution


Apache-BabyConnect

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

Apache-BabyConnect version 0.93
===============================

The previous version 0.92 is missing many files and instructions on
how to use the Apache::BabyConnect. That version was my first module
to upload to CPAN and it has many bugs. Use version 0.93 instead.

Apache::BabyConnect version 0.93 is stable and has been tested on
Linux Fedora.


 view all matches for this distribution


Apache-Centipaid

 view release on metacpan or  search on metacpan

Centipaid.pm  view on Meta::CPAN

access to their web services without the complexity of setting up 
e-commerce enabled site, or to deal with expensive credit card 
processing options. Users benefit from not having to reveal their
identity or credit card information everytime they decide to visit a 
website.  Instead, centipaid allows users to simply pay using
a pre-paid internet stamp, by simply uploading the stamp to centipaid's
site. The stamps are valid in all sites using centipaid.com payment
system.

To access a site, recipts are issued by centipaid and are used to track 
valid payments.  This information is captured and processed by the

 view all matches for this distribution


Apache-ConfigParser

 view release on metacpan or  search on metacpan

t/httpd02.conf  view on Meta::CPAN

#
# Allow http put (such as Netscape Gold's publish feature)
# Use htpasswd to generate /etc/httpd/conf/passwd.
#
#<IfModule mod_put.c>
#    Alias /upload /tmp
#    <Directory /tmp>
#        EnablePut On
#        AuthType Basic
#        AuthName Temporary
#        AuthUserFile /etc/httpd/conf/passwd

 view all matches for this distribution


Apache-DB

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Fix required module problems in Apache::SmallProf, thanks to 
Jens Gassmann <jens.gassmann@atomix.de> for spotting the problem.

=item 0.08 - April 14, 2004

Increment version to fix PAUSE upload problem. 

=item 0.07 - April 7, 2004

Ported modules to work with mod_perl 2.0 [Frank Wiles <frank@wiles.org>]

 view all matches for this distribution


Apache-ExtDirect

 view release on metacpan or  search on metacpan

lib/Apache/ExtDirect/Router.pm  view on Meta::CPAN

               :                 undef
               ;
    };

    # If any files are attached, extUpload will contain 'true'
    my $has_uploads = $cgi->param('extUpload') eq 'true';

    # Here file uploads data is stored
    my @_uploads = ();

    # Now if the form IS involved, it gets a little bit complicated
    PARAM:
    for my $param ( keys %keyword ) {
        # Defang CGI's idiosyncratic way to return multi-valued params

lib/Apache/ExtDirect/Router.pm  view on Meta::CPAN

        $keyword{ $param } = @values == 0 ? undef
                           : @values == 1 ? $values[0]
                           :                [ @values ]
                           ;

        # Try to see if $param is a field with associated file upload
        # Skip the standard ones first, of course
        next PARAM if $STANDARD_KEYWORD{ $param } || !$has_uploads;

        # Look for file uploads in this field
        my @field_uploads = $class->_parse_uploads($cgi, $param);

        # Found some, add them to general stash and kill the field
        if ( @field_uploads ) {
            push @_uploads, @field_uploads;
            delete $keyword{ $param };
        };
    };

    # Remove extType because it's meaningless later on

lib/Apache/ExtDirect/Router.pm  view on Meta::CPAN


    # Fix TID so that it comes as number (JavaScript is picky)
    $keyword{ extTID } += 0 if exists $keyword{ extTID };

    # Now add files to hash, if any
    $keyword{ '_uploads' } = \@_uploads if @_uploads;

    return \%keyword;
}

### PRIVATE INSTANCE METHOD ###
#
# Parses CGI form input field looking for file uploads
#

sub _parse_uploads {
    my ($class, $cgi, $param) = @_;

    # CGI returns "lightweight file handles", or undef
    my @file_handles = $cgi->upload($param);

    # Empty list means no uploads for this field
    return unless grep { defined $_ } @file_handles;

    # Despite what CGI documentation says, the values returned
    # as "file names" are actually some kind of key handles
    my @file_keys = $cgi->param($param);

    # Here file uploads get collected
    my @uploads = ();

    # Collect the info we need to repackage it in consistent way
    FILE:
    for my $key ( @file_keys ) {
        # First take a closer look at this "blah-blah handle"
        my $file_handle = shift @file_handles;

        # undef would mean there was upload error (timeout perhaps)
        # Following HTTP POST logic, when one upload breaks that
        # would mean all subsequent uploads in this POST are also
        # broken.
        # We can't do anything about it anyway so just stop trying.
        last FILE unless defined $file_handle;

        # In CGI.pm < 3.41, "lightweight handle" object doesn't support
        # returning IO::Handle so we do it manually to avoid problems
        my $io_handle = IO::Handle->new_from_fd(fileno $file_handle, '<');

        # We also need a lot of info about the file (if provided)
        my $upload_info = $cgi->uploadInfo($key);
        my $temp_file   = $cgi->tmpFileName($key);
        my $file_type   = $upload_info->{'Content-Type'};
        my $file_name   = $class->_get_file_name($upload_info);
        my $file_size   = $class->_get_file_size($io_handle);
        my $base_name   = basename($file_name);

        # Now instead of "blah-blah handle" we have hashref full of info
        push @uploads, {
            type     => $file_type,
            size     => $file_size,
            path     => $temp_file,
            handle   => $io_handle,
            basename => $base_name,
            filename => $file_name,
        };
    };

    return @uploads;
}

### PRIVATE INSTANCE METHOD ###
#
# Tries hard to extract file name from multipart form guts
#

sub _get_file_name {
    my ($class, $upload_info) = @_;

    # Pluck file name from Content-Disposition string
    my ($file_name)
        = $upload_info->{'Content-Disposition'} =~ /filename="(.*?)"/;

    # URL unescape it
    $file_name =~ s/%([\dA-Fa-f]{2})/pack("C", hex $1)/eg;

    return $file_name;

 view all matches for this distribution


Apache-FileManager

 view release on metacpan or  search on metacpan

FileManager.pm  view on Meta::CPAN


=head1 DESCRIPTION

The Apache::FileManager module is a simple HTML file manager.  It provides 
file manipulations such as cut, copy, paste, delete, rename, extract archive, 
create directory, create file, edit file, and upload files.

Apache::FileManager also has the ability to rsync the server htdocs tree to 
another server. With the click of a button.

=head1 PREREQUISITES 

FileManager.pm  view on Meta::CPAN


###############################################################################
# ----- Views --------------------------------------------------------------- #
###############################################################################

#after upload files - view
sub view_post_upload {
  my $o = shift;
  r->print("<SCRIPT>window.opener.document.FileManager.submit(); window.opener.focus(); window.close();</SCRIPT>");
  return undef;
}

FileManager.pm  view on Meta::CPAN

  function display_help () {
    var w=window.open('','help','resizable=yes,scrollbars=yes,width=650,height=650');
    var d = w.document.open();
    d.write(\"<HTML> <UL><B><U><FONT SIZE=+1>Help</FONT></U></B><BR><BR>\"+

\"<LI><A NAME=upload><B>How do I upload files?</B></A><BR>\"+
\"Click on the upload menu item. After the <I>Upload Files</I> window opens, click the <I>Browse</I> button. This will pop open another window showing files on your computer. Select a file you want to upload. You can not upload directories. If you wa...

\"<LI><A NAME=move><B>How do I copy or move files?</B></A><BR>\"+
\"First click the check boxes next to the file names that you would like to copy or paste. Next click the <I>copy</I> or <I>paste</I> button. Then go to the directory you would like them pasted in. Finally, click <I>paste</I>.<BR><BR>\"+

\"<LI><A NAME=move><B>Why does the file manager seem broken in certain directories or when copying or pasting certain files?</B></A><BR>\"+

FileManager.pm  view on Meta::CPAN

    document.cookie=cookiestring;
    if(!getcookie(name)){ return false; }
    else{ return true; }
  }

  function print_upload () {
    var w = window.open('','FileManagerUpload','scrollbars=yes,resizable=yes,width=500,height=440');
    var d = w.document.open();
    d.write(\"<HTML><BODY><CENTER><H1>Upload Files</H1><FORM NAME=UploadForm ACTION='".r->uri."' METHOD=POST onsubmit='window.opener.focus();' ENCTYPE=multipart/form-data><INPUT TYPE=HIDDEN NAME=FILEMANAGER_curr_dir VALUE='".r->param('FILEMANAGER_cur...
    for (var i=1; i <= 10; i++) {
      d.write(\"<INPUT TYPE=FILE SIZE=40 NAME=FILEMANAGER_file\"+i+\"><BR>\");
    }
    d.write(\"<INPUT TYPE=BUTTON VALUE='cancel' onclick='window.close();'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=SUBMIT NAME=FILEMANAGER_cmd VALUE=upload></CENTER></BODY></HTML>\");
    d.close();
    w.focus();
  }

  // make input check box form elements into an array ALL the time

FileManager.pm  view on Meta::CPAN


  #New Directory
  "<A HREF=# onclick=\"var f=window.document.FileManager; var rv=window.prompt('new directory name',''); if ((rv != null)&&(rv != '')) { f.FILEMANAGER_arg.value=rv; f.FILEMANAGER_cmd.value='mkdir'; f.submit(); } else if (rv == '') { window.alert('can...

  #Upload
  "<A HREF=# onclick=\"window.print_upload(); return false;\"><FONT COLOR=WHITE><B>upload<B></FONT></A>"
  );

  #Rsync
  my $rsync = "";
  if ($$o{'RSYNC_TO'}) {

FileManager.pm  view on Meta::CPAN

  }
  return undef;
}


sub cmd_upload {
  my $o = shift;
  my $arg1 = shift;
  my $count = 0;

  foreach my $i (1 .. 10) {

FileManager.pm  view on Meta::CPAN

    $filename =~ s/[^\w\ \d\.\-]//g;
    next if ($filename eq "");

    $count++;

    my $up = r->upload("FILEMANAGER_file$i"); next if ! defined $up;
    my $in_fh = $up->fh; next if ! defined $in_fh;

    my $arg = "> ".$$o{DR}."/".r->param('FILEMANAGER_curr_dir')."/".$filename;
    my $out_fh = Apache::File->new($arg);

FileManager.pm  view on Meta::CPAN


    while (<$in_fh>) {
      print $out_fh $_;
    }
  }
  #$$o{MESSAGE} = "$count file(s) uploaded.";
  $$o{'view'} = "post_upload";
  return undef;
}

sub cmd_rename {
  my $o = shift;

FileManager.pm  view on Meta::CPAN

                  dest => $$o{'RSYNC_TO'}    } ) 
      or warn "rsyn failed\n";
    $$o{MESSAGE} = join ("<BR>", @{ $obj->out }) if ($obj->out);
    $$o{MESSAGE} = join ("<BR>", @{ $obj->err }) if ($obj->err);
  }
  $$o{'view'} = "post_upload";
  return undef;
}


sub cmd_mkdir {

 view all matches for this distribution


Apache-Gallery

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1.0 Tue Feb 22 21:54:31 CET 2011

	- Handle files that match both GalleryDocFile and GalleryImgFile
	  correctly. (Claus Faerber)
	- Only respond to HEAD and GET requests, enabling users to use
	  WebDAV for upload (Andreas Plesner)
	- Added new option GalleryCommentExifKey to get comments from
	  EXIF data (Michael Legart)
	- Added new option GalleryEnableMediaRss to enable generation of
	  a media RSS feed for each directory listing. This works with
	  e.g. the plugin from http://piclens.com to enable 3D viewing

 view all matches for this distribution


Apache-HeavyCGI

 view release on metacpan or  search on metacpan

lib/Apache/HeavyCGI.pm  view on Meta::CPAN

  my $fieldtype = $arg{FIELDTYPE};

  my $req = $self->{CGI};
  my $val;
  if ($fieldtype eq "FILE") {
    if ($req->can("upload")) {
      if ($req->upload($name)) {
	$val = $req->upload($name);
      } else {
	$val = $req->param($name);
      }
    } else {
      $val = $req->param($name);

lib/Apache/HeavyCGI.pm  view on Meta::CPAN

endoded data.

=item CGI

An object that handles GET and POST parameters and offers the method
param() and upload() in a manner compatible with Apache::Request.
Needs to be constructed and set by the user typically in the
contructor.

=item CHARSET

 view all matches for this distribution


Apache-JAF

 view release on metacpan or  search on metacpan

lib/Apache/JAF.pm  view on Meta::CPAN

  my ($self, $p) = @_;
  my @params = map { $_ = JAF::Util::trim($_); length > 0 ? $_ : undef} ($self->{r}->param($p));
  return $params[0];
} 

sub upload_fh {
  my ($self, $p) = @_;
  if($self->param($p)) {
    my $upl = $self->{r}->upload($p);
    return $upl->fh if($upl && $upl->fh)
  }
  return undef
}

 view all matches for this distribution


Apache-MiniWiki

 view release on metacpan or  search on metacpan

MiniWiki.pm  view on Meta::CPAN

use HTML::FromText;
use HTML::LinkExtor;
use HTML::Template;
use Rcs 1.04;

our ($VERSION, $datadir, $vroot, $authen, $template, $timediff, @templates, $uploads, $precaching);

$VERSION = 0.92;

# Global variables:
# $datadir:       # Directory where we store Wiki pages (full path)

MiniWiki.pm  view on Meta::CPAN

  $vroot = $r->dir_config('vroot') or
      return fatal_error($r, "PerlVar vroot must be set.");
  $authen = $r->dir_config('authen') || -1;
  $timediff = $r->dir_config('timediff') || -8;
  @templates = $r->dir_config->get('templates');
  $uploads = $r->dir_config('uploads') || 'yes';
  $precaching = $r->dir_config('precaching') || 'no';

  # First strip the virtual root from the URI
  my $uri = &strip_virtual($r->uri);

MiniWiki.pm  view on Meta::CPAN

  }

  my $q = new CGI;

  my $text;
  # is this an uploaded binary file? If so, shlurp the data from
  # the file handle provided by CGI.pm.
  if (my $fh = $q->upload('text')) {
    local undef $/;
    $text = <$fh>;
  } else {
    $text = $q->param('text');
    $text =~ s/\r//g;

MiniWiki.pm  view on Meta::CPAN

	my ($subtype) = &is_img($uri);
	#$r->send_http_header("image/$subtype");

	if (-f $thumburi && stat($thumburi)->mtime > $file_mtime) {
		# if the thumbnail is newer then the big image,
		# then obviously a new one hasn't been uploaded. 
		# Don't call ImageMagick to check the size.
		# Use the existing thumb.
		return send_file($r, $thumburi);
	}

MiniWiki.pm  view on Meta::CPAN

  }

  return OK;
}

## is the link a binary upload?
## are file uploads enabled?
sub is_binary {
  my $uri = shift;
  return 0 if $uploads =~ /^n/i;
  return ($uri =~ /\.(.+)$/ && grep /$1/i, @binfmts);
}

## is the link really an inline image?
## are file uploads enabled?
sub is_img {
  my $uri = shift;
  return 0 if $uploads =~ /^n/i;
  return ($uri =~ /\.(.+)$/ && grep /$1/i, @imgfmts);
}

1;

MiniWiki.pm  view on Meta::CPAN


  - storage of Wiki pages in RCS
  - templates through HTML::Template
  - text to HTML conversion with HTML::FromText
  - basic authentication password changes
  - uploading of binary (pdf, doc, gz, zip, ps)
  - uploading of images (jpg, jpeg, gif, png)
  - automatic thumbnailing of large using ImageMagick
  - sub directories
  - view any revision of a page
  - revert back to any revision of the page
  - basic checks to keep search engine spiders from deleting 

MiniWiki.pm  view on Meta::CPAN

By doing this, pages that contain those words will use the matching template.
For example, the /your-wiki-vroot/LinuxDatabases page will then use the template-linux page,
instead of template. You will need to create the template by going to
/wiki/your-wiki-vroot/(edit)/template-<the_template> first.

(Optional) To disable file uploads such as binary attachments and inline images,
set uploads to no. By default it is yes. Note that inline images requires the
Image::Magick module to be installed for generating thumbnails.

  PerlAddVar uploads no

(Optional) Pre-caching can be done by a periodic (eg every 5 minutes) cronjob
to refresh the cached version of the .list* pages (see below) in the background,
rather then when Apache::Miniki discovers that the cache is old when a request is
done. To eanble:

 view all matches for this distribution


Apache-PageKit

 view release on metacpan or  search on metacpan

lib/Apache/PageKit.pm  view on Meta::CPAN

  $config->parse_xml;

  die "No config data for your server '$server' maybe you mistyped something?"
    unless exists $Apache::PageKit::Config::server_attr->{$config_dir}->{$server};
    
  my $upload_tmp_dir = $config->get_global_attr('upload_tmp_dir');
  if ( $upload_tmp_dir && !-d $upload_tmp_dir ) {
    die "your upload_tmp_dir ($upload_tmp_dir) did not exists";
  }

  my $cache_dir = $config->get_global_attr('cache_dir');
  my $view_cache_dir = $cache_dir ? $cache_dir . '/pkit_cache' :
    $pkit_root . '/View/pkit_cache';

lib/Apache/PageKit.pm  view on Meta::CPAN

  my $server = $r->dir_config('PKIT_SERVER');
  die "Must specify PerlSetVar PKIT_SERVER in httpd.conf file" unless $server;
  my $config = $self->{config} = Apache::PageKit::Config->new(config_dir => $config_dir,
                                                              server => $server);
  my $post_max = $self->{config}->get_global_attr('post_max') || 100_000_000;
  my $upload_tmp_dir = $self->{config}->get_global_attr('upload_tmp_dir');

  # the TEMP_DIR option is only avail since version 1.0 of libapreq
  # so we set it only on request.
  my @apr_params = ();
  push @apr_params, TEMP_DIR => $upload_tmp_dir if $upload_tmp_dir;
  my $request_class = $self->{config}->get_global_attr('request_class') || "Apache::Request::PageKit";
  my $apr = $self->{apr} = $request_class->new($r, POST_MAX => $post_max, @apr_params);
  my $model_base_class = $self->{config}->get_global_attr('model_base_class') || "MyPageKit::Common";

  $self->_check_gzip;

 view all matches for this distribution


Apache-ParseFormData

 view release on metacpan or  search on metacpan

ParseFormData.pm  view on Meta::CPAN

	my $proto = shift;
	my $class = ref($proto) || $proto;
	my $self  = shift;
	my %args = (
		temp_dir        => "/tmp",
		disable_uploads => 0,
		post_max        => 0,
		@_,
	);
	my $table = APR::Table::make($self->pool, NELTS);
	$self->pnotes('apr_req' => $table);

ParseFormData.pm  view on Meta::CPAN

	return($self);
}

sub DESTROY {  
	my $self = shift;
	for my $v (values(%{$self->pnotes('upload')})) {
		my $path = $v->[1];
		unlink($path) if(-e $path);
	}
}

ParseFormData.pm  view on Meta::CPAN

	my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
	my @weekday = qw(Sun Mon Tue Wed Thu Fri Sat);
	return sprintf("%3s, %02d-%3s-%04d %02d:%02d:%02d GMT", $weekday[$wday], $mday, $months[$mon], $year+1900, $hour, $min, $sec);
}

sub upload {
	my $self = shift;
	my $name = shift || "";
	return($name ? @{$self->pnotes('upload')->{$name}} : keys(%{$self->pnotes('upload')}));
}

sub parse_content {
	my $r = shift;
	my $args = shift;

ParseFormData.pm  view on Meta::CPAN

	my $buf = "";
	$r->setup_client_block;
	$r->should_client_block or return '';
	my $ct = $r->headers_in->get('content-type');

	if($args->{'disable_uploads'} && index($ct, "multipart/form-data") > -1) {
		my $error_str = "[Apache::ParseFormData] file upload forbidden";
		$r->notes->set("error-notes" => $error_str);
		$r->log_error($error_str);
		return(Apache::FORBIDDEN);
	}
	my $rm = $r->remaining;

ParseFormData.pm  view on Meta::CPAN

		$buf = substr($buf, $lenbdr);
		$buf =~ s/[\n\r]+//;
		my $iter = -1;
		my @data = ();
		&multipart_data($r, $args, \@data, $boundary, BUFFLENGTH, 1, $buf, $iter);
		my %uploads = ();
		for(@data) {
			if(exists($_->{'headers'}->{'content-disposition'})) {
				my @a = split(/ *; */, $_->{'headers'}->{'content-disposition'});
				if(shift(@a) eq "form-data") {
					if(scalar(@a) == 1) {

ParseFormData.pm  view on Meta::CPAN

						);
						my $param = "";
						for(@a) {
							my ($name, $value) = (/([^=]+)=\"([^\"]+)\"/);
							if($name eq "name") {
								$uploads{$value} = [$fh, $path];
								$param = $value;
							} else {
								$hash{$name} = $value;
							}
						}
						$r->param($param => \%hash);
					}
				}
			}
		}
		$r->pnotes('upload' => \%uploads);
	} else {
		my $len = $r->headers_in->get('content-length');
		$r->get_client_block($buf, $len);
		&_parse_query($r, $buf) if($buf);
	}

ParseFormData.pm  view on Meta::CPAN

  }

=head1 ABSTRACT

The Apache::ParseFormData module allows you to easily decode and parse    
form and query data, even multipart forms generated by "file upload".
This module only work with mod_perl 2.

=head1 DESCRIPTION

C<Apache::ParseFormData> extension parses a GET and POST requests, with

ParseFormData.pm  view on Meta::CPAN


=over 3

=item temp_dir

Directory where the upload files are stored.

=item disable_uploads

Disable file uploads.

  my $apr = Apache::ParseFormData->new($r, disable_uploads => 1);

  my $status = $apr->parse_result;
  unless($status == Apache::OK) {
    my $error = $apr->notes->get("error-notes");
    ...

ParseFormData.pm  view on Meta::CPAN


=head2 delete_all

This method clear all of the parameters

=head2 upload

You can access the name of an uploaded file with the param method, just
like the value of any other form element.

  my %file_hash = $apr->param('file');
  my $filename = $file_hash{'filename'};
  my $content_type = $file_hash{'type'};
  my $size = $file_hash{'size'};

  my ($fh, $path) = $apr->upload('file_0');

  for my $form_name ($apr->upload()) {
    my ($fh, $path) = $apr->upload($form_name);

    while(<$fh>) {
      print $_;
    }

 view all matches for this distribution


Apache-PrettyText

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


	- Added quoting of <, > and &.

1.02 Fri Aug 14 

	- Added README in prep for upload to CPAN.

1.01 Tue Aug  4 

	- Added some fixes suggested by Doug M.

 view all matches for this distribution


Apache-ProxyScan

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.25  Mon Feb 17 2003
    - fixed url/file mapping with urls larger than 255 characters

0.24  Wed Jan 01 2003
    - fixed Version variable before first upload to CPAN
    - removed debugging from rav.pl
    - added new year to copyright message

0.23  Mon Nov 26 2002
    - fixed header bugs in ProxyScan.pm special messages

 view all matches for this distribution


Apache-Reload

 view release on metacpan or  search on metacpan

RELEASE  view on Meta::CPAN

     o modperl/perl.apache.org

   Subject: [ANNOUNCE] Apache-Reload 0.14

     include:
     - MD5 sig (as it comes from CPAN upload announce).
     - the latest Changes

6. Prepare for the next cycle

  a. increment version in lib/Apache/Reload.pm and lib/Apache2/Reload.pm also

 view all matches for this distribution


Apache-Request-I18N

 view release on metacpan or  search on metacpan

I18N.pm  view on Meta::CPAN

		unless $self->encode_parms;
	
	return $self->SUPER::parms(@_);
}

sub upload {
	my ($self, $arg) = @_;

	my $upload_class = ref($self);
	$upload_class =~ s/\bRequest\b/Upload/;
	unless ($upload_class->isa('Apache::Upload::I18N')) {
		no strict 'refs';
		carp "\@$upload_class\::ISA should contain Apache::Upload::I18N";
		push @{"$upload_class\::ISA"}, 'Apache::Upload::I18N';
	}
	
	# upload(UPLOAD) is implemented, but undefined, so there's little
	# harm in not supporting it...
	if (UNIVERSAL::isa($arg, 'Apache::Upload')) {
		carp 'Calling upload($upload) is unsupported';
		return $self->SUPER::upload($arg);
	}

	unless ($self->{_uploads}) {
		my @uploads = $self->SUPER::upload;
		my %uploads;
		foreach (@uploads) {
			$upload_class->rebless($_, $self);
			push @{ $uploads{ $_->name } }, $_;
		}
		$self->{_uploads} = \@uploads;
		$self->{_uploads_hash} = \%uploads;
	}

	if (defined $arg) {
		my $uploads = $self->{_uploads_hash}{$arg};
		return unless $uploads;
		return wantarray ? @$uploads : $uploads->[0];
	} else {
		return wantarray
			? @{ $self->{_uploads} }
			: $self->{_uploads}[0];
	}
}

=head2 Additional methods

I18N.pm  view on Meta::CPAN

			$key = $self->_decode_value($key);
		}

		# Same thing for filenames

		if ($self->SUPER::upload($key)) {
			$val = $self->_decode_value($val)
		} else {
			$val = $self->_decode($val, $charset);
		}

I18N.pm  view on Meta::CPAN


our @ISA = 'Apache::Upload';

=head1 FILE UPLOADS

Uploads returned by the I<upload>() method are I<Apache::Upload::I18N>
objects; they behave like I<Apache::Upload> objects, and their I<name>() and
I<filename>() methods will return values according to ENCODE_PARMS.

(This is however not the case within the upload hook; see L<"BUGS"> below.)

=cut

# Apache::Upload objects are C structs, and no mechanism is provided to
# subclass them.  We therefore maintain a parallel storage area where each

I18N.pm  view on Meta::CPAN


	sub _stash { $stashes{refaddr $_[0]} ||= {} }
	sub _delete_stash { delete $stashes{refaddr $_[0]} }
}

# Each upload object is reblessed into Apache::Upload::I18N, and remembers its
# new name and filename through its stash area.  ($req is needed so we know
# which encoding is used.)

sub rebless {
	my ($class, $upload, $req) = @_;

	return undef unless $upload;

	bless $upload, $class;

	my ($name, $filename) = ($upload->_old_name, $upload->_old_filename);
	foreach ($name, $filename) {
		$_ = $req->_decode_value($_);
		$_ = $req->_encode($_) if $req->encode_parms;
	}

	my $stash = $upload->_stash;
	%$stash = ( name => $name, filename => $filename );

	return $upload;
}

sub DESTROY { $_[0]->_delete_stash }

sub name          { $_[0]->_stash->{name}     }

I18N.pm  view on Meta::CPAN

Query parameter keys may or may not be case-insensitive, depending on their
contents and on ENCODE_PARMS.

=item *

Calling I<next>() on an upload object is not currently supported.

=back


=head1 BUGS

I18N.pm  view on Meta::CPAN


Similarly, the I<Content-Transfer-Encoding> header is also ignored.

=item *

When using upload hooks, the upload object supplied to UPLOAD_HOOK will not
have had its I<name>() and I<filename>() decoded yet.

=item *

When using the B<multipart/form-data> encoding, this module will get confused

I18N.pm  view on Meta::CPAN

  <FORM METHOD=post ENCTYPE="multipart/form-data"
  	ACTION=".../my_script?foo=1">
  <INPUT NAME="foo" ...>
  ...

You should also avoid mixing file uploads and regular input within a single
field name.  In other words, don't try this either:

  <INPUT TYPE=text NAME="foo">
  <INPUT TYPE=file NAME="foo">

I18N.pm  view on Meta::CPAN

We should probably make _mangle_parms lazy, and only call it from param() and
such.

=item *

Automatically decode the contents of a B<text/*> file upload if a charset has
been provided.

=for comment
This should probably be optional, since we wouldn't know what to do with an
upload that doesn't have a charset.  (Neither DECODE_PARMS nor the local
native charset would be appropriate here.)  Besides, if ENCODE_PARMS was
defined, we'll still return a handle that spits out wide characters.  (Come to
think of it, do any user-agents even bother providing a charset anyway?)

=item *

 view all matches for this distribution


Apache-Request-Redirect

 view release on metacpan or  search on metacpan

Redirect.pm  view on Meta::CPAN

	my $content;
	my $boundary;
	if ($request->header_in("Content-type") =~ 
							qr|^multipart/form-data; boundary=(.+?)$|i) {
		$boundary   = "--$1";	
		for my $upload ($self->{apachereq}->upload) {
			$self->_log(message => 'Upload object',
						objects=>[$upload], id => $LOG_REQUEST);
			$content .= "$boundary\r\n";
			my $info = $upload->info;
			while (my($key, $val) = each %$info) {
				if ($key ne 'Content-Type') {
					$content .= "$key: $val; ";
				}
				# rimuovo l'ultimo ;
				chop($content);
			}
			$content .= "\r\nContent-Type: " .
			$upload->info("Content-Type") . "\r\n\r\n";
			my $fh = $upload->fh;
			while (<$fh>) {
				$content .= $_;
			}
			# lo rimuovo da args
			delete $request_args->{$upload->name};
		}
		# aggiungo gli args
		while (my ($key,$val) = each(%$request_args)) {
			$content .= qq|\r\n$boundary\r\nContent-Disposition: | .
				qq|form-data; name="$key"\r\n\r\n$val|;

 view all matches for this distribution


( run in 1.582 second using v1.01-cache-2.11-cpan-b16cb0d3907 )