Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Routing] Don't throw 405 when scheme requirement doesn't match #26312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2018

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #22739
License MIT
Doc PR -

@Tobion
Copy link
Contributor

Tobion commented Feb 25, 2018

LGTM but I'm not sure it's worth to change such things as a bugfix. It totally depends what you write in your expression conditions. And it depends what you interpret as a HTTP target resource.

The 405 (Method Not Allowed) status code indicates that the method
received in the request-line is known by the origin server but not
supported by the target resource.

If you have a condition like in the ticket request.headers.get('User-Agent') matches '/firefox/i'
I'd argue that this header is not part of the target resource you requested. Otherwise all resources on te internet would depend on the User-Agent, wich means everybody sees different resources when browing the same page. So getting a 405 is just as valid if you request such a route with the wrong method.

@nicolas-grekas nicolas-grekas merged commit 9d70ef0 into symfony:2.7 Feb 26, 2018
nicolas-grekas added a commit that referenced this pull request Feb 26, 2018
…match (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Don't throw 405 when scheme requirement doesn't match

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22739
| License       | MIT
| Doc PR        | -

Commits
-------

9d70ef0 [Routing] Don't throw 405 when scheme requirement doesn't match
@nicolas-grekas nicolas-grekas deleted the route-no-allow branch February 26, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.