Use /g (global) regex modifier in map
lists at ruby-forum.com
Fri Aug 8 18:27:54 UTC 2014
Maxim Dounin wrote in post #1154691:
> On Fri, Aug 08, 2014 at 05:06:55PM +0200, Gabriel Arrais wrote:
>> The same problem would occur using the variable $args right?
>> ?fq=xxxxxx&sm=0&PageNumber=1 and
>> Are returning the same content. Is there a way to avoid this behavior?
> There is no easy one, as nginx itself doesn't know how to work
> with multiple arguments with the same name. You may try to build
> a regex to extract second argument with the given name (3rd, 4th,
> and so on) and include these into the cache key as well.
I think that it would end in a complicated solution this way...
Do you think that a perl code like
perl_set $filtered_args '
my $r = shift;
my @parts = $args =~ /[DESIRED_REGEX]/g;
@parts = sort @parts;
$filtered_args = join("&", @parts);
Will do the job?
I'm trying it right now.
Again, thank you for your time.
Posted via http://www.ruby-forum.com/.
More information about the nginx