-
Notifications
You must be signed in to change notification settings - Fork 617
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
Case-insensitive path matching #35
Comments
If I look at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html section 3.2.3 I find this:
|
You can just register both routes but my suggestion is to fix your app. |
Thanks for the quick response. We are looking at using this with several ASP.NET Web API projects, which is case-insensitive. However, I believe we can make adjustments for this to work. |
let me know how this works out. |
This is actually preventing us from migrating to using Fabio. We have been using dcos/marathon-lb which allows for case insensitive urls. Because of this, switching to using Fabio would be a breaking change for us. It would be awesome if perhaps we could do something like |
After thinking about that request some more, I don't think we really care about ignoring case on a route-by-route basis. I think a command line switch to ignore case on all routes would be better (and I suspect significantly easier to implement in a performant way). |
@herbrandson I think adding another matcher in https://github.com/fabiolb/fabio/blob/master/route/matcher.go and adding a config option in https://github.com/fabiolb/fabio/blob/master/config/load.go#L250-L252 should do the trick. Feel free to send a PR. |
I can't tell you how happy this makes me :) I'll try to send a PR in the next couple of days. |
PR sent: #553 |
Merged #553 |
I have added this route to test with, but the path matching appears to be case-sensitive.
route add orders /orders http://localhost:8080/ tags "urlprefix-/orders"
A request to this url works correctly: http://localhost:9999/orders
However, a request to this URL: http://localhost:9999/Orders
logs this warning: [WARN] No route for localhost:9999/Orders
Is it possible for the path matching to be case-insensitive? This would lessen the burden on the client to request the route with matching case.
The text was updated successfully, but these errors were encountered: