From: Andy Grundman Date: Sun, 1 Apr 2007 23:30:12 +0000 (+0000) Subject: Revert r6239, apreq stuff will go into the current branch, or I'll find another way... X-Git-Tag: 5.7099_04~201 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=6a44fe01d6d82796cfd1b514676efc9fc2cf7de6 Revert r6239, apreq stuff will go into the current branch, or I'll find another way to improve performance --- diff --git a/Changes b/Changes index dd6d514..7856ab0 100644 --- a/Changes +++ b/Changes @@ -5,8 +5,6 @@ This file documents the revision history for Perl extension Catalyst. * $c->uri_for (approx. 8x faster) * $c->engine->prepare_path (approx. 27x faster) * $c->engine->prepare_query_parameters (approx. 5x faster) - - If libapreq2 is installed, URIs are decoded using a C function that is - approx. 12x faster than URI::Escape. - Updated HTTP::Body dependency to 0.9 which fixes the following issues: * Handle when IE sometimes sends an extra CRLF after the POST body. * Empty fields in multipart/form-data POSTs are no longer ignored. diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index fd22ff0..564cb42 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -20,11 +20,6 @@ use overload '""' => sub { return ref shift }, fallback => 1; # Amount of data to read from input on each pass our $CHUNKSIZE = 64 * 1024; -# See if we can use libapreq2 for URI unescaping -use constant HAS_APR => eval { - require APR::Request; -}; - =head1 NAME Catalyst::Engine - The Catalyst Engine @@ -641,19 +636,14 @@ sub write { =head2 $self->unescape_uri($uri) -Unescapes a given URI using the most efficient method available. Engines -can subclass to provide faster implementations. +Unescapes a given URI using the most efficient method available. Engines such +as Apache may implement this using Apache's C-based modules, for example. =cut sub unescape_uri { my $self = shift; - if ( HAS_APR ) { - # This function is ~12x faster than URI::Escape - return APR::Request::decode(@_); - } - my $e = URI::Escape::uri_unescape(@_); $e =~ s/\+/ /g;