[Catalyst-commits] r6252 - in trunk/Catalyst-Runtime: .
lib/Catalyst t
andyg at dev.catalyst.perl.org
andyg at dev.catalyst.perl.org
Mon Apr 2 02:41:51 GMT 2007
Author: andyg
Date: 2007-04-02 02:41:50 +0100 (Mon, 02 Apr 2007)
New Revision: 6252
Modified:
trunk/Catalyst-Runtime/Changes
trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm
trunk/Catalyst-Runtime/lib/Catalyst/Request.pm
trunk/Catalyst-Runtime/t/live_engine_request_parameters.t
Log:
Revert the c->req->keywords change, this is a feature and should wait until 5.8
Modified: trunk/Catalyst-Runtime/Changes
===================================================================
--- trunk/Catalyst-Runtime/Changes 2007-04-01 23:30:12 UTC (rev 6251)
+++ trunk/Catalyst-Runtime/Changes 2007-04-02 01:41:50 UTC (rev 6252)
@@ -9,8 +9,6 @@
* Handle when IE sometimes sends an extra CRLF after the POST body.
* Empty fields in multipart/form-data POSTs are no longer ignored.
* Uploaded files with the name "0" are no longer ignored.
- - Added $c->request->keywords for getting the keywords (a query string with
- no parameters).
- Sending SIGHUP to the dev server will now cause it to restart.
- Allow "0" for a path in uri_for.
Modified: trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm
===================================================================
--- trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm 2007-04-01 23:30:12 UTC (rev 6251)
+++ trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm 2007-04-02 01:41:50 UTC (rev 6252)
@@ -448,9 +448,8 @@
sub prepare_query_parameters {
my ( $self, $c, $query_string ) = @_;
- # Check for keywords (no = signs)
+ # Make sure query has params
if ( index( $query_string, '=' ) < 0 ) {
- $c->request->keywords( $self->unescape_uri($query_string) );
return;
}
Modified: trunk/Catalyst-Runtime/lib/Catalyst/Request.pm
===================================================================
--- trunk/Catalyst-Runtime/lib/Catalyst/Request.pm 2007-04-01 23:30:12 UTC (rev 6251)
+++ trunk/Catalyst-Runtime/lib/Catalyst/Request.pm 2007-04-02 01:41:50 UTC (rev 6252)
@@ -9,7 +9,7 @@
use URI::QueryParam;
__PACKAGE__->mk_accessors(
- qw/action address arguments cookies headers keywords match method
+ qw/action address arguments cookies headers match method
protocol query_parameters secure captures uri user/
);
@@ -51,7 +51,6 @@
$req->headers;
$req->hostname;
$req->input;
- $req->keywords;
$req->match;
$req->method;
$req->param;
@@ -260,15 +259,6 @@
Alias for $req->body.
-=head2 $req->keywords
-
-Contains the keywords portion of a query string, when no '=' signs are
-present.
-
- http://localhost/path?some+keywords
-
- $c->request->keywords will contain 'some keywords'
-
=head2 $req->match
This contains the matching part of a Regex action. Otherwise
Modified: trunk/Catalyst-Runtime/t/live_engine_request_parameters.t
===================================================================
--- trunk/Catalyst-Runtime/t/live_engine_request_parameters.t 2007-04-01 23:30:12 UTC (rev 6251)
+++ trunk/Catalyst-Runtime/t/live_engine_request_parameters.t 2007-04-02 01:41:50 UTC (rev 6252)
@@ -6,7 +6,7 @@
use FindBin;
use lib "$FindBin::Bin/lib";
-use Test::More tests => 30;
+use Test::More tests => 29;
use Catalyst::Test 'TestApp';
use Catalyst::Request;
@@ -103,15 +103,14 @@
};
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->keywords, 'query string', 'Catalyst::Request keywords' );
+ is( $creq->{uri}->query, 'query_string', 'Catalyst::Request POST query_string' );
is_deeply( $creq->{parameters}, $parameters, 'Catalyst::Request parameters' );
ok( $response = request('http://localhost/dump/request/a/b?x=1&y=1&z=1'), 'Request' );
More information about the Catalyst-commits
mailing list