Welcome! Log In Create A New Profile

Advanced

Re: rewrite and map ??interfering regexps

Norman Gray
April 26, 2020 03:04PM
Maxim, hello.

On 26 Apr 2020, at 17:28, Maxim Dounin wrote:

> Relevant ticket is here:
>
> https://trac.nginx.org/nginx/ticket/564
>
> Unfortunately, there is no obvious solution. On the other hand,
> this is something relatively easy to work around.

Aha, so it _is_ the map regexp and the rewrite regexp mutually
interfering! Thanks for the speedy insight.

Looking through the comments in the ticket, I agree with you that 'the
current behaviour is bad, and should be fixed'. If only on a principle
of least surprise.

Until it is fixed, however, it would be extremely useful if, in the
description of the 'map' stanza (ie, in
https://nginx.org/en/docs/http/ngx_http_map_module.html) it mentioned
that the regexp in 'map' can interfere with the regexp in a 'rewrite'
directive, in such a way that positional groups in the latter don't
work. It could note that this is a (temporary?) defect, but that until
it is fixed, using named groups in the 'rewrite' regexp is a good
workaround, and give an example.

It would be better here than in the documentation of 'rewrite', as that
would keep the 'rewrite' documentation relatively simple. It only needs
to be seen by people using 'rewrite' and 'map' together, who might be
assumed to be marginally more sophisticated users.

Best wishes,

Norman


--
Norman Gray : https://nxg.me.uk
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite and map ??interfering regexps

Norman Gray April 26, 2020 08:50AM

Re: rewrite and map ??interfering regexps

Maxim Dounin April 26, 2020 12:30PM

Re: rewrite and map ??interfering regexps

Norman Gray April 26, 2020 03:04PM

Re: rewrite and map ??interfering regexps

J.R. April 26, 2020 04:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 236
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