[Yanel-dev] map file, first match
Michael Wechner
michael.wechner at wyona.com
Tue Aug 18 04:54:27 EDT 2020
I think it is based on first match, whereas
/createpdf does not match with /createpdf/zzzzzzzzzz.pdf
but
/createpdf** does match with /createpdf/zzzzzzzzzz.pdf
Also see
src/core/java/org/wyona/yanel/core/ResourceTypeMatcherV1ImplV2.java
src/core/java/org/wyona/yanel/core/ResourceTypeDefaultMatcher.java
src/core/java/org/wyona/yanel/core/util/WildcardReplacerHelper.java
src/core/java/org/wyona/yanel/core/util/WildcardMatcherHelper.java
src/core/java/org/wyona/yanel/core/ResourceConfigurationMap.java
src/core/java/org/wyona/yanel/core/RTIbasedResourceConfiguration.java
src/core/java/org/wyona/yanel/core/ResourceConfigurationMapV2.java
src/core/java/org/wyona/yanel/core/ResourceManager.java
src/core/java/org/wyona/yanel/core/api/ResourceTypeMatcherV1.java
src/core/java/org/wyona/yanel/core/MatcherV1.java
All the best
Michael
Am 18.08.20 um 08:24 schrieb basZero:
> Actually the patterns have to be like this:
>
> 1) /pdfcreate**
> 2) /**.pdf
>
> It would make sense if Yanel would take the first match, always.
> Otherwise it's like playing roulette...
>
> Is there a flag where I could tell Yanel to apply "first match" approach?
>
>
> On Tue, 18 Aug 2020 at 07:27, Michael Wechner
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
> Hi Balz
>
> yes, whereas try
>
> 1) /createpdf* (or /createpdf/*
> 2) /**.pdf
>
> Also see
>
> http://www.yanel.org/en/documentation/resources/rc-map.html
>
> HTH
>
> Michi
>
> Am 14.08.20 um 16:39 schrieb basZero:
>> Hi,
>>
>> i have two similar rules in my map file:
>>
>> a) /createpdf
>> b) /**.pdf
>>
>>
>> a comes BEFORE b in the map file.
>>
>> When I request the following URL...
>> /createpdf/zzzzzzzzzz.pdf
>>
>> ... it seems to me that matcher b) executes. Is this possible?
>> I thought that the map file is parsing from top down... so the
>> first match will be taken.
>>
>> Am I right?
>>
>> Cheers, Bas
>>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> <mailto:Yanel-development at wyona.com>
> http://mx2.wyona.com/cgi-bin/mailman/listinfo/yanel-development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mx2.wyona.com/pipermail/yanel-development/attachments/20200818/9223d344/attachment.html>
More information about the Yanel-development
mailing list