* 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.
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;
}
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/
);
$req->headers;
$req->hostname;
$req->input;
- $req->keywords;
$req->match;
$req->method;
$req->param;
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
use FindBin;
use lib "$FindBin::Bin/lib";
-use Test::More tests => 30;
+use Test::More tests => 29;
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->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' );