-
Notifications
You must be signed in to change notification settings - Fork 974
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
[UNDERTOW-2119] - add case sensitivity to predicates - path, path-suf… #1416
base: master
Are you sure you want to change the base?
Conversation
This is a feature. |
@bdw429s I had a look, I'm not 100% sure of which way to go here. On one hand it is true that you have to type less characters... but on the other, it is going to clutter a little bit the list of predicate handlers. But it is also true that, by adding the case-sensitive attribute everywhere we are cluttering the list of attributes a bit. |
I was positive I did reply to this. Anyway. Im not keen on introducing another hmm... conceptual/functional types into existing. Currently names are restricted to functional meaning, rather than contextual arguments. This would become confusing, since for path-prefix we would have path-prefix-cocase but regex wouldnt have regex-full-match . |
I certainly wasn't implying that EVERY parameter to predicates would require a permutation of the function. I was suggesting a pragmatic approach that provided convenience functions to reduce boilerplate in common scenarios. As I've integrated Undertow into a tool which uses a custom resource manager to be case insensitive on Windows (to appeals to my IIS/Windows users), wanting your predicates to to not match with case is not only a common need, but a rather important one for security! I have already added several custom predicates to my tool which largely fills this need |
Hey. Not what I meant - such new functional names would be counter intuitive, since other predicates dont have/follow this style. Just my 2c. |
Thanks again for your input. I think they are very intuitive, but I suppose that's possibly because I've been developing in CFML for 20 years and this language uses this exact format for it's built in functions so it's very familiar and makes a great deal of sense to me. And FWIW, you can see in my ticket above (from my tool's ticket tracker) I added
Basically, any time you do text comparison, you have a case sensitive and case insensitive version which is less typing, leaves less ambiguity, and allows positional params to still be used. And this falls right in line with the precedent set by languages like CFML which has matching functions |
In general I dont disagree, what I mean is scoped solely on predicates and existing features. If it was implemented across the board I wouldnt mind, but that is solely in hands of core devs here. |
…fix, path-prefix
Issue: https://issues.redhat.com/browse/UNDERTOW-2119