Skip to content

Commit

Permalink
bug #4131 Replaced old way of specifying http method by the new one (…
Browse files Browse the repository at this point in the history
…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 b486b22
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cookbook/routing/redirect_trailing_slash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -72,8 +71,11 @@ system, as explained below:
),
array(
'url' => '.*/$',
'_method' => 'GET',
)
),
array(),
'',
array(),
array('GET')
)
);
Expand Down

0 comments on commit b486b22

Please sign in to comment.