Skip to content

Commit

Permalink
[Routing] Fix ApacheDumper when a space appears in a default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jun 29, 2011
1 parent 6c7f484 commit 2b5e22d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Expand Up @@ -62,6 +62,7 @@ public function dump(array $options = array())
':' => '\\:',
'=' => '\\=',
'\\' => '\\\\',
' ' => '\\ ',
));
}
$variables = implode(',', $variables);
Expand Down
Expand Up @@ -49,6 +49,10 @@ RewriteRule .* $0/ [QSA,L,R=301]
RewriteCond %{REQUEST_URI} ^/test/([^/]+?)/$
RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5,E=_ROUTING_foo:%1]

# baz6
RewriteCond %{REQUEST_URI} ^/test/baz$
RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz6,E=_ROUTING_foo:bar\ baz]

# 405 Method Not Allowed
RewriteCond %{_ROUTING__allow_GET} !-z [OR]
RewriteCond %{_ROUTING__allow_HEAD} !-z [OR]
Expand Down
Expand Up @@ -68,6 +68,11 @@ public function testDump()
array(),
array('_method' => 'post')
));
// complex
$collection->add('baz6', new Route(
'/test/baz',
array('foo' => 'bar baz')
));

$dumper = new ApacheMatcherDumper($collection);

Expand Down

0 comments on commit 2b5e22d

Please sign in to comment.