On Tue, Feb 13, 2018 at 3:19 PM, Graham Leggett <[email protected]> wrote:
>
> Another option for the name is to store a URL prefix length and a hash of
> the prefix. If the hash of the prefix matches, we have a match. Would this
> work, would it be too expensive to hash on every hit, would it be safe
> enough?
It could work for prefix equality (with a keyed hash function like
siphash to avoid collision forgery), though hashing every URL
(possibly multiple times, for each different configured length) might
be more costly than the current strncmp.
But I suppose that the main issue is for regex matchings ("ProxyPass
~" and ProxyPassMatch)...
Regards,
Yann.