Apache2-ASP

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  - HTTP headers out were having issues.

2.32  2009-03-01
  - Added Apache2::ASP::HTTPContext::SubContext
  - Added t/htdocs/subcontext/*.asp
  - Added t/handlers/simple.pm
  - Re-worked the way Response.Include and Response.TrapInclude work on the inside.
  - No external changes were made.

2.31  2009-02-19
  - Apache2::ASP::HTTPContext order of operations during setup_request was updated.
  - Apache2::ASP::ModPerl returns proper error HTTP codes when errors occur.
  - Requests for non-existent *.asp scripts returns a proper 404.
  - Apache2::ASP::HTTPContext copes better with syntax errors in handlers.
  - Missing handlers are coped with better now.

2.30  2009-02-19
  - Apache2::ASP::ASPPage was misreporting line numbers.

2.29  2009-02-15
  - Added Apache2::ASP::SessionStateManager::Memcached

Changes  view on Meta::CPAN

    $s->ua->get('/url.asp')->content was always empty.
  - Added test to make sure that the above fix stays in place.
  - Internal changes within HTTPContext WRT self-hash-notation upgraded to get_prop().

2.00_16   2008-11-03
  - ASPPage mkdir's each missing part of the page cache.
  - ConfigParser correctly handles configs that don't specify any request filters.
  - Re-included Apache2::ASP::TransHandler, albeit with different semantics.

2.00_15   2008-11-01
  - XML Config file schema updated - (settings, env_vars) to support DTD validation.
  - DTD for XML Config is now included.

2.00_14   2008-10-31
  - If querystring or form data contains multiple values for the same parameter,
    that parameter will become an arrayref of values.
  - Multiple config post-processors can be defined in the config XML file.  They
    will be executed in the order they are listed in the config XML file.
  - Nested master pages are now supported.

2.00_13   2008-10-30
  - Each upload form submission should now include a unique "uploadID=xxx" value.
  - Multiple concurrent uploads from the same user under the same session are
    now supported because of the uploadID=xxx logic.

2.00_12   2008-10-29
  - (handler)->init_asp_objects( $context ) was not getting called correctly.

2.00_11   2008-10-29
  - ASPPage updated so that pages containing "~" in their text will not cause
    syntax errors after being parsed.
  - File uploads are handled correctly by ModPerl, UploadHandler and MediaManager.

2.00_10   2008-10-26
  - Server.RegisterCleanup(\&subref, \@argref) now fires both from the command-line
    and within an actual mod_perl environment.

2.00_09   2008-10-24
  - Pages that use MasterPages are now executed with the correct @_.
  - Added Apache2::ASP::FormHandler again.

Changes  view on Meta::CPAN

  - Apache2::ASP::SessionStateManager now uses the correct database connection.
    This problem would only come up when multiple Apache2::ASP web applications
    using different session data sources were running under the same Apache
    instance.
  - Ditto for Apache2::ASP::ApplicationStateManager.

1.54 2008-07-05
  - Adjusted Apache2::ASP::MediaManager so that it will not unlink the /MEDIA
    directory if someone attempts to delete a file and neglects to specify
    which file should be deleted.
  - Also updated Apache2::ASP::MediaManager to more gracefully handle missing
    uploaded files.

1.53 2008-07-05
  - Fixed a bug that caused Apache2::ASP::Config to die if no request filters
    were specified within the <request_filters> element in the config file.

1.52 2008-06-18
  - While using Apache2::ASP::Test::Base, $ENV{APACHE2_ASP_APPLICATION_ROOT} 
    is now persisted between requests.  This means that if (somewhere else)
    you set $ENV{APACHE2_ASP_APPLICATION_ROOT} in your code, it will persist

Changes  view on Meta::CPAN


1.29 2008-02-06
  - Fixed a bug that caused Response->Include to misbehave when used in
    conjunction with RequestFilters.

1.28 2008-02-06
  - Added $Response->Decline and changed the return value of $Response->End
    and $Response->Redirect to 0 and 302 respectively.
  - Now inside RequestFilters you can simply say 'return $Response->Declined'
    or 'return $Response->Redirect("/mypage.asp")' to exit the RequestFilter.
  - Documentation for RequestFilters and Response needs to be updated to
    reflect this change.

1.27 2008-02-06
  - Moved the <request_filters> config section under config/web_application 
    instead of config/web_application/settings.

1.26 2008-02-05
  - Hotfix for config.  Was crashing unless settings.request_filters was defined.

1.25 2008-02-05

lib/Apache2/ASP/MediaManager.pm  view on Meta::CPAN

  sub before_update {
    my ($s, $context, $Upload) = @_;
    
    warn "About to update '$Upload->{filename_only}'";
    return 1;
  }
  
  sub after_update {
    my ($s, $context, $Upload) = @_;
    
    warn "Just updated '$Upload->{filename_only}'";
    return $Response->Redirect( $ENV{HTTP_REFERER} );
  }
  
  sub after_delete {
    my ($s, $context, $filename) = @_;
    
    warn "Just deleted '$filename'";
    return $Response->Redirect( $ENV{HTTP_REFERER} );
  }
  

lib/Apache2/ASP/MediaManager.pm  view on Meta::CPAN

B<And Then...>

And then there was C<Apache2::ASP::MediaManager>.  Now you can have fully-functional
file uploads in seconds.  

=head1 UPLOAD PROGRESS INDICATORS

C<Apache2::ASP::MediaManager> makes it easy to provide upload progress indicators.

Remember that C<uploadID> parameter in the C<action> attribute of your form? While 
the upload is taking place, the C<$Session> object is getting updated with the
status of the upload.  If you were to make another handler - C</handlers/UploadProgress.pm> -
and insert the following code:

  package UploadProgress;

  use strict;
  use base 'Apache2::ASP::FormHandler';
  use vars __PACKAGE__->VARS;

  sub run {

lib/Apache2/ASP/MediaManager.pm  view on Meta::CPAN

B<NOTE>: This method must return true, or the file will not be created.

=head2 after_create( $self, $context, $Upload )

Called after allowing a new file to be uploaded to the server.

=head2 before_update( $self, $context, $Upload )

Called before allowing a new file to be uploaded to replace an existing file.

B<NOTE>: This method must return true, or the file will not be updated.

=head2 after_update( $self, $context, $Upload )

Called after a new file has been uploaded to replace an existing file.

=head2 before_delete( $self, $context, $filename )

Called before deleting a file.

B<NOTE>: This method must return true, or the file will not be deleted.

lib/Apache2/ASP/UploadHookArgs.pm  view on Meta::CPAN

=head2 time_remaining( )

Returns the number of seconds the upload will continue after this point in time.

=head2 length_received( )

Returns the number of bytes we have received from the upload so far.

=head2 content_length( )

Returns the value of C<$ENV{CONTENT_LENGTH}> at this point, but may be updated later, based
on usage and requirements.

=head2 data( )

Returns the bytes received in this "chunk" of the upload.

=head1 AFTER THE UPLOAD HAS FINISHED

After the upload has finished, you can count on the following methods returning actual values:



( run in 0.373 second using v1.01-cache-2.11-cpan-05444aca049 )