Re: Remove whitespaces from $args

2016-04-28 Thread Hett
Hi, I using third-party software, in some cases users create not valid url, and I want to fix it for example: http://xx.yy/xx/yy/?a=1&b=1 2 3.txt need replace by: http://xx.yy/xx/yy/?a=1&b=123.txt Posted at Nginx Forum: https://forum.nginx.org/read.php?2,266482,266511#msg-266511 ___

Re: Remove whitespaces from $args

2016-04-28 Thread Francis Daly
On Thu, Apr 28, 2016 at 06:46:11AM -0400, Hett wrote: Hi there, > Tell me please, how can I remove all spaces from $args ? I suspect that you may need to use one of the programming language modules available in your nginx to do that. Why do you want to do it? Perhaps there is an alternative ac

Remove whitespaces from $args

2016-04-28 Thread Hett
Hi, Tell me please, how can I remove all spaces from $args ? I create solution, it remove up to 5 spaces. But it not best way i think. if ($args ~ (.*)\s(.*)$) { set $args $1$2; } if ($args ~ (.*)\s(.*)$) { set $args $1$2; } if ($args ~ (.*)\s(.*)$) { set $args