[PATCH] Allows hyphens in variable names so can access hyphenated query vars
Maxim Dounin
mdounin at mdounin.ru
Mon Aug 7 15:46:55 UTC 2017
Hello!
On Mon, Aug 07, 2017 at 04:15:33PM +0100, Mark Ellis via nginx-devel wrote:
> Ok. How would you suggest accessing query parameters with hyphens?
>
> e.g. `?foo-bar=123`
>
> how would you get the value of foo-bar?
It is more or less trivial to extract anything from $args using a
regular expression. And the same applies to things like
"foo$bar=123", or any other fancy character you want to use in the
query string.
Alternative solution would be to avoid such naming, and use
aphanumeric plus "_" as directly accessible via $arg_* variables.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list