Re: %[] in use-server directives

2019-02-21 Thread Joe K
Ah, I see. Tried it, but it seems it's not the only thing that causes the segfault. On Thu, Feb 21, 2019 at 8:31 AM Willy Tarreau wrote: > Hi Joe, > > On Thu, Feb 21, 2019 at 08:23:29AM +, Joe K wrote: > > Hello everybody again ... > > > > So here's

Re: %[] in use-server directives

2019-02-21 Thread Joe K
; On Tue, Feb 19, 2019 at 09:14:40AM +0000, Joe K wrote: > > I have next to zero experience with C but the commit 702d44f seems to be > > small enough for me to be able to wrap my head around. > > > > I'll try making it work for use-server tomorrow! Thank you! > > Ah

Re: %[] in use-server directives

2019-02-19 Thread Joe K
at 08:45:48AM +, Joe K wrote: > > Hi Willy! > > > > My use case is very similar to gitlab's review apps: > > https://gitlab.com/help/ci/review_apps/index.md, > > on some PRs I want to be able to start web apps each with its own > subdomain > > which wo

Re: %[] in use-server directives

2019-02-19 Thread Joe K
Hi Willy! My use case is very similar to gitlab's review apps: https://gitlab.com/help/ci/review_apps/index.md, on some PRs I want to be able to start web apps each with its own subdomain which would register themselves with haproxy via a socket like this (I thought): ``` set server be_template/w

Re: %[] in use-server directives

2019-02-18 Thread Joe K
https://github.com/haproxy/haproxy/blob/3d95717b58be0902078e0693e383bc32ea3a715a/src/proxy.c#L714 seems like it's not possible, haproxy seems to be using `strcmp` without expanding what's inside %[]. I wonder if it would be useful to anyone beside me? On Mon, Feb 18, 2019 at 5:25 PM Jo

%[] in use-server directives

2019-02-18 Thread Joe K
Hello everyone! I wonder if there is a way to use %[...] syntax in use-server directives. backend be_template server-template websrv 1-100 localhost: check disabled use-server %[req.hdr(host),lower,map_dom(/usr/local/etc/haproxy/domain2server.map,websrv0)] if { req.hdr(host),lower,map_d