Changeset 10454 for lang/perl/HTTPx-Dispatcher
- Timestamp:
- 04/25/08 20:55:44 (5 years ago)
- Location:
- lang/perl/HTTPx-Dispatcher/trunk
- Files:
-
- 2 modified
-
lib/HTTPx/Dispatcher/Rule.pm (modified) (1 diff)
-
t/01_simple.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTPx-Dispatcher/trunk/lib/HTTPx/Dispatcher/Rule.pm
r10433 r10454 39 39 my ($self, $req) = @_; 40 40 croak "request required" unless blessed $req; 41 my $uri = $req->uri; 41 42 my $uri = ref($req->uri) ? $req->uri->path : $req->uri; 42 43 $uri =~ s!^/+!!; 43 $uri =~ s!\?.+!!;44 44 45 45 return unless $self->_condition_check( $req ); -
lang/perl/HTTPx-Dispatcher/trunk/t/01_simple.t
r10421 r10454 26 26 27 27 my $method = $input->{method} || 'GET'; 28 my $res = $pkg->match(HTTP::Request->new($method, $input->{uri}));28 my $res = $pkg->match(HTTP::Request->new($method, "http://example.com/$input->{uri}")); 29 29 $res = ((not defined $res) ? 'undef' : YAML::Dump($res)); 30 30 $res =~ s/^---\n//; … … 32 32 } 33 33 34 35 34 __END__ 36 35 37 36 === 38 37 --- input 39 src: ''38 src: connect '', { controller => 'Root', action => 'index' } 40 39 uri: / 41 --- expected: undef 40 --- expected 41 action: index 42 args: {} 43 controller: Root 42 44 43 45 ===
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)