This file documents the revision history for Perl extension Catalyst.
5.7008
- - Add undef warning for uri_for
- - Fix bug where a nested component would be setup twice
- - Make ensure_class_loaded behave better with malformed class name
- - Make _register_plugin use ensure_class_loaded
- - Remove 'Argument "??" isn't numeric in sprintf' warning
+ - Added $c->request->query_keywords for getting the keywords
+ (a query string with no parameters).
+ - Add undef warning for uri_for.
+ - Fix bug where a nested component would be setup twice.
+ - Make ensure_class_loaded behave better with malformed class name.
+ - Make _register_plugin use ensure_class_loaded.
+ - Remove 'Argument "??" isn't numeric in sprintf' warning.
(Emanuele Zeppieri)
- Fixed a bug where Content-Length could be set to 0 if a filehandle
object in $c->response->body did not report a size.
- Fixed issue where development server running in fork mode did not
properly exit after a write error.
(http://rt.cpan.org/Ticket/Display.html?id=27135)
- - Remove warning for captures that are undef
+ - Remove warning for captures that are undef.
5.7007 2007-03-13 14:18:00
- Many performance improvements by not using URI.pm:
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;
}
use URI::QueryParam;
__PACKAGE__->mk_accessors(
- qw/action address arguments cookies headers match method
+ qw/action address arguments cookies headers query_keywords match method
protocol query_parameters secure captures uri user/
);
$req->headers;
$req->hostname;
$req->input;
+ $req->query_keywords;
$req->match;
$req->method;
$req->param;
Alias for $req->body.
+=head2 $req->query_keywords
+
+Contains the keywords portion of a query string, when no '=' signs are
+present.
+
+ http://localhost/path?some+keywords
+
+ $c->request->query_keywords will contain 'some keywords'
+
=head2 $req->match
This contains the matching part of a Regex action. Otherwise
use FindBin;
use lib "$FindBin::Bin/lib";
-use Test::More tests => 29;
+use Test::More tests => 30;
use Catalyst::Test 'TestApp';
use Catalyst::Request;
};
my $request = POST(
- 'http://localhost/dump/request/a/b?query_string',
+ 'http://localhost/dump/request/a/b?query+string',
'Content' => $parameters,
'Content-Type' => 'application/x-www-form-urlencoded'
);
ok( my $response = request($request), 'Request' );
ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );
- is( $creq->{uri}->query, 'query_string', 'Catalyst::Request POST query_string' );
+ is( $creq->{uri}->query, 'query+string', 'Catalyst::Request POST query_string' );
+ is( $creq->query_keywords, 'query string', 'Catalyst::Request query_keywords' );
is_deeply( $creq->{parameters}, $parameters, 'Catalyst::Request parameters' );
ok( $response = request('http://localhost/dump/request/a/b?x=1&y=1&z=1'), 'Request' );