Apache-Request-Redirect

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'		=> 'Apache::Request::Redirect',
    'VERSION_FROM'	=> 'Redirect.pm', # finds $VERSION
    'PREREQ_PM'		=> {	
												HTTP::Request,
												HTTP::Headers,
												HTTP::Response,
												URI}, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM => 'Redirect.pod', # retrieve abstract from module
       AUTHOR     => 'Emiliano Bruni <info@ebruni.it>') : ()),
);

README  view on Meta::CPAN


   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

   HTTP::Request
   HTTP::Response
   HTTP::Headers
   LWP::UserAgent
   URI

COPYRIGHT AND LICENCE

Apache::Request::Redirect - An Apache mod_perl module to redirect url request
Copyright (C) 2003-2004 Emiliano Bruni (info/at/ebruni_dot_it)

Redirect.pm  view on Meta::CPAN

use warnings;
use Carp;
use Exporter;

use vars qw(@ISA @EXPORT $LOG_REQUEST $LOG_QUERYSTRING $LOG_RESPONSE);

@ISA 					= qw(Exporter);
@EXPORT 				= qw($LOG_REQUEST $LOG_QUERYSTRING $LOG_RESPONSE);

use HTTP::Response;
use HTTP::Request;
use HTTP::Headers;
use LWP::UserAgent;
use URI;

$Apache::Request::Redirect::VERSION = '0.05';

$Apache::Request::Redirect::LOG = 0;

$LOG_REQUEST			= 0b0001;
$LOG_QUERYSTRING		= 0b0010;

Redirect.pm  view on Meta::CPAN

		$content		.= $uri->query;
		# nell'url ci lasciamo la sola query_string originale (00.04)
		$uri->query(scalar($self->{apachereq}->args));
		# imposto la lunghezza del content nell'header
		$headers->header('Content-Length' => length($content));
	} else {
		# nel get il content non c'e' (sara' vero ? :-)
		$headers->remove_header('Content-Length');
	}
	# costruisco la nuova richiesta per il recupero dell'url
	my $request			= new HTTP::Request($self->{apachereq}->method,
											$uri,
											$headers,
											$content
						);
	return $request;
}

sub _send_request() {
	my $self			= shift;
	my $request			= shift;

Redirect.pod  view on Meta::CPAN

Used like a value for C<$Apache::Request::Redirect::LOG> enables request logging.

=item C<$LOG_RESPONSE>

Used like a value for C<$Apache::Request::Redirect::LOG> enables response logging.

=back

=head1 REQUIRES 

HTTP::Response, HTTP::Request, HTTP::Headers, LWP::UserAgent, URI, Log::SimpleFile (opt.)

=head1 AUTHOR

Emiliano Bruni, E<lt>info/at/ebruni_dot_it<gt>

=head1 SEE ALSO

L<HTTP::Request> , L<HTTP::Response>, L<Apache::Request>, L<HTML::Template>, 
L<HTML::Template::Extension::HEAD_BODY> 

To see some web sites that use this package take a look to http://www.micso.fr 
and http://www.micso.com

=cut



( run in 0.706 second using v1.01-cache-2.11-cpan-39bf76dae61 )