HAProxy community

HAProxy redirect issue

#1

Hello… one of my clients sends requests with following path:
GET /xxx/YYYY/SUBSCRIBER/ZZZ/query?appid=pqrst&PHONE=123456789 HTTP/1.1
and when I’m sending to backend it should go as:
GET /xxx/yyyy/subscriber/zzz/query/?appid=pqrst&PHONE=123456789 HTTP/1.1

notice- everything is converted to lower case and added “/” after query.
To achieve this: I added following in backend section:
http-request set-path %[path,lower]/

when I did that- I see that around 2 secs is sent in client request transfer, here is the log statement:

2019-03-23T18:17:49-07:00 haproxy[12250] :4226 [23/Mar/2019:18:17:47.088] http_frontend Login.QueryCustomer/s_Login.QueryCustomer 2245/0/0/391/2636 200 5190 - - ---- 8/8/1/1/0 0/0 {} “GET /xxx/yyyy/subscriber/zzz/query/?appid=pqrst&PHONE=123456789 HTTP/1.1”

Any reason why “TR” is 2245?

0 Likes

#2

Hello… one of my clients sends requests with following path:
GET /xxx/YYYY/SUBSCRIBER/ZZZ/query?appid=pqrst&PHONE=123456789 HTTP/1.1
and when I’m sending to backend it should go as:
GET /xxx/yyyy/subscriber/zzz/query/?appid=pqrst&PHONE=123456789 HTTP/1.1

notice- everything is converted to lower case and added “/” after query.
To achieve this: I added following in backend section:
http-request set-path %[path,lower]/

when I did that- I see that around 2 secs is sent in client request transfer, here is the log statement:

2019-03-23T18:17:49-07:00 haproxy[12250] :4226 [23/Mar/2019:18:17:47.088] http_frontend Login.QueryCustomer/s_Login.QueryCustomer 2245/0/0/391/2636 200 5190 - - ---- 8/8/1/1/0 0/0 {} “GET /xxx/yyyy/subscriber/zzz/query/?appid=pqrst&PHONE=123456789 HTTP/1.1”

Any reason why “TR” is 2245?

0 Likes