HAProxy community

Is there a minimum character count for path_beg patterns?

I’m doing some testing, and running into a weird limit – the path_beg (and maybe other path variants) seems to require a minimum of 4 characters total in the pattern before it will match. In the example below, be-four be-five and be-six can all be reliably curled, but any variation with 3 chars or less never match.

frontend http-in
    bind *:80
    use_backend be-three if { path_beg /a/ }
    use_backend be-four if { path_beg /ab/ }
    use_backend be-five if { path_beg /abc/ }
    use_backend be-six if { path_beg /abcd/ }

Is this a documented/known behavior of path_beg? I’m using the haproxy:1.9.10 Docker instance.

So what I’m running into isn’t a character limit - it’s the first use_backend is getting ignored. If I simply duplicate the first use_backend then it starts working as expected.

Still scratching my head on that.

Please provide the output of haproxy -vv, the complete configuration and the logs in httplog format showing how you reproduce the issue.

Hey @lukastribus;
Thanks for the response - I think the issue may have been tied to a stale docker container build not seeing an updated haproxy.cfg file, as the problem isn’t there after rebuilding the image. I’m not certain yet, and if I see it again and can replicate I’ll post again with all the necessary files.

For now it appears to be operating as expected, and I cannot replicate the problem.


1 Like