Permalink
Browse files

bug #4131 Replaced old way of specifying http method by the new one (…

…Baptouuuu)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4131).

Discussion
----------

Replaced old way of specifying http method by the new one

| Q                  | A
| ---------------- | ---
| Doc fix?        | yes
| New docs?   | no
| Applies to     | 2.5+
| Fixed tickets |

Commits
-------

20b20ac fix xml to specify a method
c9bdb4a replaced old way of specifying http method by the new one
  • Loading branch information...
weaverryan committed Aug 16, 2014
2 parents 189a123 + 7d1ec51 commit b486b220d3993cd0b2b60a75c2a6ba986439f5c4
Showing with 7 additions and 5 deletions.
  1. +7 −5 cookbook/routing/redirect_trailing_slash.rst
@@ -44,16 +44,15 @@ system, as explained below:
defaults: { _controller: AcmeDemoBundle:Redirecting:removeTrailingSlash }
requirements:
url: .*/$
_method: GET
methods: [GET]
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing">
<route id="remove_trailing_slash" path="/{url}">
<route id="remove_trailing_slash" path="/{url}" methods="GET">
<default key="_controller">AcmeDemoBundle:Redirecting:removeTrailingSlash</default>
<requirement key="url">.*/$</requirement>
<requirement key="_method">GET</requirement>
</route>
</routes>
@@ -72,8 +71,11 @@ system, as explained below:
),
array(
'url' => '.*/$',
'_method' => 'GET',
)
),
array(),
'',
array(),
array('GET')
)
);

0 comments on commit b486b22

Please sign in to comment.