From dev-return-202964-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Fri Nov 1 09:46:15 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 169D9180626 for ; Fri, 1 Nov 2019 10:46:14 +0100 (CET) Received: (qmail 39263 invoked by uid 500); 1 Nov 2019 09:46:13 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 39252 invoked by uid 99); 1 Nov 2019 09:46:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2019 09:46:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3A83BC223F for ; Fri, 1 Nov 2019 09:46:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.202 X-Spam-Level: * X-Spam-Status: No, score=1.202 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=0.2, KAM_LAZY_DOMAIN_SECURITY=1, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=disabled Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id OsAAhNuxeybi for ; Fri, 1 Nov 2019 09:46:09 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=81.169.162.220; helo=internetallee.de; envelope-from=felix.schumacher@internetallee.de; receiver= Received: from internetallee.de (internetallee.de [81.169.162.220]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id E54747DDEC for ; Fri, 1 Nov 2019 09:46:08 +0000 (UTC) Received: from [192.168.178.91] (muedsl-82-207-243-011.citykom.de [82.207.243.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by internetallee.de (Postfix) with ESMTPSA id 4B6732C361B2B for ; Fri, 1 Nov 2019 10:46:08 +0100 (CET) Subject: Re: RewriteMap parsing To: dev@tomcat.apache.org References: <75b9fd2b-9031-66f1-fbff-2429b61d5859@internetallee.de> From: Felix Schumacher Openpgp: preference=signencrypt Autocrypt: addr=felix.schumacher@internetallee.de; keydata= mQINBFzOiq4BEADxctfqmPXFIjGYSRdKlyii+LySoeTYYS2pqyxqNJey1jWJIcKMolsWwlGn nrxusDvZjZHtNO5utSn1z7fOIavlc/al0bvCjKMevUXVstlfXUVYYWBWlnSAo8pnuG1KNhDG pQD40FSI0M1Gtrk5pnhsQRPQylEVxCA2k7E15za9BZSfIgHWetSc10w9o1SEaeSUCwgVFQuw lNFb76fGP8Qe6Mtc9Ckqwym9Fj3oWtK6lq0+waZzTec4H6G77UruTKGLfPxN5BLsaxA50pmN v0CKpRfADKS1UrCzVHF3NjjSaf0HzytYjNlBVaWxMA4U1Nc2LdoelBbXqqyj7FFTvVTA8P34 a9s9aKSh4s0KUhCmhRb6jsyY5znjYUdxtu9P3o7bM8BRPj2S9kqxni/pGjxKnhOaH/SAlxgW A1oarcgeBsDPdfyAV+8K0XnpOcAY0XrnmSdzlRzujggtUZEvr41YDXLceTCaRKqoPDhClkqt IFKh1iM/WudxoIoZeKBo8Ll9BqMIv4JCd0u8GFkhl2P9blKKzUPVBuBnHkhH9Nh1ztPHWvAO Z4+6lafXKy6V6LX1o/geDlXe1uSlt4Wg50aNBthaylQcLYOxLKiAun0AnMyieWqP9t5akql4 euATsVlgKTxAQS5hiXJ2Gm0aOs9RvULENlkXVi8AmvjW+at4iQARAQABtDRGZWxpeCBTY2h1 bWFjaGVyIDxm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n/w60sFLb0vCwVLtD3s 7C+MpWYQ4kQYuLy0Q8S4/MHuaoiSWvZgHh8mNRQSz97NC7bv6F4IDusluc7OnyK2l5QXbBrp 5W3nFeSROPcMGj7fRgOriT9vOgXpg6TDu29uKkKY1aenBGISkIn52Dqjb8j3QWV3VbzkkqG/ l+Yic26pz4pTPpEtYv6gIemdb1x80y7T1KZMZ7YIsuZRnyAr19E4ak4DNpOwsCg= Message-ID: <4443f1bc-fa30-563c-0fed-b899667999a3@internetallee.de> Date: Fri, 1 Nov 2019 10:46:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------55F56CD331BF614C10FA0A82" Content-Language: en-US --------------55F56CD331BF614C10FA0A82 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Am 28.10.19 um 23:06 schrieb Romain Manni-Bucau: > +1 for quotes > > Can the "function" support be pluggable either with an explicit > registry or a SPI? Would be awesome to enrich it in "super tomcat" > instances (thinking to meecrowave, tomee and maybe spring boot). The function support is already pluggable (by the configuration file :), but I thought about adding SPI. It is unclear to me, how to determine the namespace ("int:" in the httpd example), should it be given by the Service Provider? Would "int" be reserved for our own functions? How could we achieve such a reservation mechnism? Felix > > Le lun. 28 oct. 2019 à 21:43, Mark Thomas > a écrit : > > > > On 27/10/2019 11:27, Felix Schumacher wrote: > > Hi all, > > > > while looking at the RewriteMap configuration, I noticed, that > parsing > > of the RewriteMap directive is a bit minimal. Parameters are > split at > > whitespace (no quotes will be recognized) and only the first of the > > optional parameters will be used. > > > > Should this be changed? If so, should we introduce quoting > capabilities > > to gather the "one" optional parameter, or allow multiple > parameters? > > > > Version "quote": > > > > RewriteMap m1 example.MyMap "some params" > > > > Version "multiple" > > > > RewriteMap m2 example.OtherMap one two three > > > > Or should it be a combination? > > That is probably the most flexible option. I'd lean towards this > option > but would be happy to support the majority view if different. > > > "quote" would be sort of compatible with the current interface, > as we > > still have only one parameter. "multiple" would be a nicer > interface for > > the implementer of the map. > > > > Another thing I noticed, is that the httpd rewrite map feature > has a few > > builtin maps, that could be useful to supply with our > implementation. > > Any thoughts on supplying those? (I thought about the maps > > int:[toupper,tolower,escape,unescape], txt:, rnd: and possibly a > new one > > called jdbc:{jndi-connection}:{sql statement with placeholder}. For > > these elements a quote detection would be a must) > > I don't recall any requests for these on the users list but maybe that > is because the feature isn't that well known. > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: dev-help@tomcat.apache.org > > --------------55F56CD331BF614C10FA0A82 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


Am 28.10.19 um 23:06 schrieb Romain Manni-Bucau:
+1 for quotes

Can the "function" support be pluggable either with an explicit registry or a SPI? Would be awesome to enrich it in "super tomcat" instances (thinking to meecrowave, tomee and maybe spring boot).

The function support is already pluggable (by the configuration file :), but I thought about adding SPI.

It is unclear to me, how to determine the namespace ("int:" in the httpd example), should it be given by the Service Provider? Would "int" be reserved for our own functions? How could we achieve such a reservation mechnism?

Felix


Le lun. 28 oct. 2019 à 21:43, Mark Thomas <markt@apache.org> a écrit :


On 27/10/2019 11:27, Felix Schumacher wrote:
> Hi all,
>
> while looking at the RewriteMap configuration, I noticed, that parsing
> of the RewriteMap directive is a bit minimal. Parameters are split at
> whitespace (no quotes will be recognized) and only the first of the
> optional parameters will be used.
>
> Should this be changed? If so, should we introduce quoting capabilities
> to gather the "one" optional parameter, or allow multiple parameters?
>
> Version "quote":
>
> RewriteMap m1 example.MyMap "some params"
>
> Version "multiple"
>
> RewriteMap m2 example.OtherMap one two three
>
> Or should it be a combination?

That is probably the most flexible option. I'd lean towards this option
but would be happy to support the majority view if different.

> "quote" would be sort of compatible with the current interface, as we
> still have only one parameter. "multiple" would be a nicer interface for
> the implementer of the map.
>
> Another thing I noticed, is that the httpd rewrite map feature has a few
> builtin maps, that could be useful to supply with our implementation.
> Any thoughts on supplying those? (I thought about the maps
> int:[toupper,tolower,escape,unescape], txt:, rnd: and possibly a new one
> called jdbc:{jndi-connection}:{sql statement with placeholder}. For
> these elements a quote detection would be a must)

I don't recall any requests for these on the users list but maybe that
is because the feature isn't that well known.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org

--------------55F56CD331BF614C10FA0A82--