X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=5902c9cec5b559809c5d1bab7f915c9bc46e5176;hb=3b4d12511c59793e85feca1ac1b4a8c2c5f1a6ae;hp=5c8b17f8d4433859395f698d17d1f62cc3f7d9e4;hpb=94b8f5dec021a418afb9c086b6286f22f18ff1a1;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 5c8b17f..5902c9c 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -7,7 +7,6 @@ use Data::Dump qw/dump/; use HTML::Entities; use HTTP::Body; use HTTP::Headers; -use URI::Escape (); use URI::QueryParam; use Scalar::Util (); @@ -448,8 +447,10 @@ process the query string and extract query parameters. sub prepare_query_parameters { my ( $self, $c, $query_string ) = @_; - # Make sure query has params + # Check for keywords (no = signs) + # (yes, index() is faster than a regex :)) if ( index( $query_string, '=' ) < 0 ) { + $c->request->query_keywords( $self->unescape_uri($query_string) ); return; } @@ -641,12 +642,12 @@ as Apache may implement this using Apache's C-based modules, for example. =cut sub unescape_uri { - my $self = shift; + my ( $self, $str ) = @_; - my $e = URI::Escape::uri_unescape(@_); - $e =~ s/\+/ /g; + $str =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; + $str =~ s/\+/ /g; - return $e; + return $str; } =head2 $self->finalize_output