Hi, On Tue, Jul 17, Emeric Brun wrote: > > On Fri, 29 Jun 2018 at 07:15, Jarno Huuskonen <jarno.huusko...@uef.fi> > > wrote: > >> On Thu, Jun 28, Jarno Huuskonen wrote: > >>> I think this is the commit that breaks map_regm in this case: > >>> b5997f740b21ebb197e10a0f2fe9dc13163e1772 (MAJOR: threads/map: Make > >>> acls/maps thread safe). > >>> > >>> If I revert this commit from pattern.c:pattern_exec_match > >>> then the map_regm \1 backref seems to work. > >> > >> I think I found what's replacing the \000 as first char: > >> in (map.c) sample_conv_map: > >> /* In the regm case, merge the sample with the input. */ > >> if ((long)private == PAT_MATCH_REGM) { > >> str = get_trash_chunk(); > >> str->len = exp_replace(str->str, str->size, > >> smp->data.u.str.str, > >> pat->data->u.str.str, > >> (regmatch_t *)smp->ctx.a[0]); > >> > >> Before call to get_trash_chunk() smp->data.u.str.str is for example > >> 'distri.com' and after get_trash_chunk() smp->data.u.str.str > >> is '\000istri.com'. > > Could you try the patch in attachment? i hope it will fix the issue
Sorry I've been away from keyboard. Just tested the patch w/1.8.12 and for me the patch fixes the map_regm issue with Daniel's example config (https://www.mail-archive.com/haproxy@formilux.org/msg30523.html). Thanks, -Jarno -- Jarno Huuskonen