Welcome! Log In Create A New Profile

Advanced

Re: $arg_name as an array

Jonathan Matthews
May 09, 2014 05:56AM
On 9 May 2014 10:16, beatnut <nginx-forum@nginx.us> wrote:
> Hello,
>
> Does it possible to use $arg_name as an array?
> For example
> I've query string : ?opt[test]=1
>
> I'd like to get value od opt[test] but $arg_opt[test] doesn't work.
>
> Is there special syntax for that case?

Query strings arguments are just strings. Whatever encoding you layer
on top of those strings, in order to be able to treat them as arrays,
is entirely subjective: you could be using any one of a number of
encodings. Nginx has no mechanism to deal with this in its vanilla
setup, as far as I'm aware.

I don't know how its embedded perl or lua modules might be /able/ to
treat them, but you'd almost certainly have to /train/ them (at least
trivially) in how to understand your specific encoding: semi-colon
separated? Brackets of some kind? Some more densely packed binary
encoding which you've then had to base64 encode because of HTTP? Nginx
doesn't know this, and doesn't give you this functionality out of the
box.

J

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

$arg_name as an array

beatnut May 09, 2014 05:16AM

Re: $arg_name as an array

Jonathan Matthews May 09, 2014 05:56AM

Re: $arg_name as an array

Matt Gray May 09, 2014 06:04AM

Re: $arg_name as an array

Matt Gray May 09, 2014 06:06AM

Re: $arg_name as an array

beatnut May 09, 2014 06:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready