Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4718

Map file no match when key contains space - escaping not working

$
0
0

@stucky101 wrote:

Ladies and Gents
I’m trying to use a map file to make dynamic backend decisions based on user agent strings.
Problem is my user agent has spaces in it.
The mapfile works without spaces:

teststring dest_pool

and in the cfg:
acl has_http_useragent hdr(user-agent),map_str(/usr/local/haproxy/maps/webcenter_useragents.cfg) -m found
use_backend %[req.hdr(user-agent),map_str(/usr/local/haproxy/maps/webcenter_useragents.cfg)] if has_http_useragent

If I add and escape a space it doesn’t match anymore:

test\ string dest_pool

I get a NOSRV

Q1. Can I change the default delimiter for the k/v’s in a map ? I have not found a reference to that.
Q2. Is there any other way to deal with the spaces ?

Unfortunately, my user agent is “Studio Site Designer”

Thx for a great product

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4718

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>