Thanks for the clarification.
On Sep 16, 2014, at 10:45 PM, Yichun Zhang (agentzh) <age...@gmail.com> wrote:
> Hello!
>
> On Tue, Sep 16, 2014 at 8:44 AM, Dayo Akanji wrote:
>> Basically it says Named locations are also supported, but query strings are
>> ignored. I just wanted to make sure that since I handle php requests in a
>> named location, @proxy, when I run ngx.exec, on a request such as
>> "www.example.com/index.php?a=1,b=2", that this will be treated as if the
>> request was simply "www.example.com/index.php" with the params igmored.
>>
>
> The document is confusing and wrong. I've rephrased it like this:
>
> "Named locations are also supported (but the second args argument is
> currently ignored)."
>
> So basically you just cannot use the 2nd argument of the ngx.exec()
> call to change the querystring but the existing querystring is always
> inherited by the new named location request.
>
> BTW, if you want to change the querystring then just use
> ngx.req.set_uri_args() before calling ngx.exec() :)
>
> Thanks for bringing this up :)
>
> Regards,
> -agentzh
>
The way it works is actually as expected and I haven’t yet come across the need to change the args for something destined for a named location.
If it was possible, it would be a nice to have I suppose.
I don’t think it is necessary to use “currently” in the revision and think that simply saying it is ignored with the query string inherited from the referring location is clearer.
I will edit the wiki for clarity … been a while since I touched it!
Thanks again!