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

Routes and Parameters are case-sensitive #1196

Closed
omidgolparvar opened this Issue Oct 13, 2017 · 6 comments

Comments

Projects
None yet
5 participants
@omidgolparvar
Copy link

omidgolparvar commented Oct 13, 2017

It could be an option or a config (via droplet.json) to choose whether routes and parameters be case-sensitive or not.

@ckd

This comment has been minimized.

Copy link
Contributor

ckd commented Oct 13, 2017

I don't have strong feelings on this one either way, but I just wanted to point out that the current implementation is correct based on the relevant RFC (which I can't remember off the top of my head).

If you do prefer to have case-insensitive paths, it's probably simpler and faster to just have your web server do the rewrite.

@tanner0101

This comment has been minimized.

Copy link
Member

tanner0101 commented Oct 25, 2017

@omidgolparvar you could probably achieve this with a middleware.

@GrfxGuru

This comment has been minimized.

Copy link

GrfxGuru commented Jan 10, 2018

I do not have a firm opinion on which is best, but I feel that case-insensitive seems to make safer sense with a recommendation to follow a particular coding practice? I can see where debugging could be easily overlooked based on case sensitivity.

However, I do also agree that this feels like something the server should be configured to handle.

@tanner0101 tanner0101 added this to the 3.0.0 milestone Jan 23, 2018

@tanner0101 tanner0101 self-assigned this Jan 23, 2018

@tanner0101

This comment has been minimized.

Copy link
Member

tanner0101 commented Jan 23, 2018

We should re-hash this discussion as I think Vapor 3 beta routing has already moved to case-insensitive.

/cc @Joannis

@Joannis

This comment has been minimized.

Copy link
Member

Joannis commented Jan 23, 2018

It did not move to case insensitive, I believe. We could make this configurable quite easily, though.

@Joannis

This comment has been minimized.

Copy link
Member

Joannis commented Jan 24, 2018

Already fixed in Engine#209

@tanner0101 tanner0101 added this to Todo in Vapor 3 Feb 12, 2018

@Joannis Joannis closed this Feb 19, 2018

@Joannis Joannis moved this from Todo to Done in Vapor 3 Feb 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment