Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Maxim Dounin
August 07, 2017 11:48AM
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/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Allows hyphens in variable names so can access hyphenated query vars

Mark Ellis via nginx-devel 502 August 02, 2017 07:32AM

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Maxim Dounin 209 August 07, 2017 09:22AM

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Mark Ellis via nginx-devel 253 August 07, 2017 11:18AM

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Maxim Dounin 204 August 07, 2017 11:48AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 66
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready