Willy,

On 4/21/21 6:57 AM, Willy Tarreau wrote:

This whole series looks good to me (of course) :-)

I'm fine with this one at first glance, but I *really* think that we
need to seriously think about merging all the path* normalizers into
a single "path". There is no reason for having users iteratively pass
through multiple special cases on this. I mean, in order to normalize
a path, we'll systematically have to do this:

     http-request normalize-uri path-strip-dot
     http-request normalize-uri path-strip-dotdot
     http-request normalize-uri path-merge-slashes

I'd rather simply do:

     http-request normalize-uri path

and have all of them applied, as there's no reason for keeping that many
exceptions to the standards there when normalizing, except of course when
someone wants to fail a match :-/ Either you want the original path or you
want it normalized.

Yes, I already replied to Christopher during the initial review that providing combined normalizers definitely makes sense. For the existing path ones I'd suggest:

  http-request normalize-uri filesystem

that combines path-strip-dot, path-strip-dotdot, path-merge-slashes in an useful order.

There is another one which could make sense to implement if supported by
the standard (I didn't have a look at RFC3986 recently), which is that I
don't remember if the backslash is supposed to be handled as an equivalent
to the slash, in which case it also ought to be translated.


Thanks, I'll check.

Best regards
Tim Düsterhus

Reply via email to