MESSAGE
DATE | 2021-04-16 |
FROM | Mithun Bhattacharya
|
SUBJECT | Re: [Hangout - NYLXS] Fixing Apache::ReadConfig limitations
|
From hangout-bounces-at-nylxs.com Sun Apr 18 17:29:00 2021 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www2.mrbrklyn.com (www2.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id 0C9B4163FBB; Sun, 18 Apr 2021 17:29:00 -0400 (EDT) X-Original-To: hangout-at-www2.mrbrklyn.com Delivered-To: hangout-at-www2.mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 1000) id 3F383163FB0; Sun, 18 Apr 2021 17:28:50 -0400 (EDT) Resent-From: Ruben Safir Resent-Date: Sun, 18 Apr 2021 17:28:50 -0400 Resent-Message-ID: <20210418212850.GC27042-at-www2.mrbrklyn.com> Resent-To: hangout-at-mrbrklyn.com X-Original-To: ruben-at-mrbrklyn.com Delivered-To: ruben-at-mrbrklyn.com Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mrbrklyn.com (Postfix) with ESMTP id 5969D163FB0 for ; Fri, 16 Apr 2021 14:43:10 -0400 (EDT) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 8F45B3EE59 for ; Fri, 16 Apr 2021 18:43:09 +0000 (UTC) Received: (qmail 93616 invoked by uid 500); 16 Apr 2021 18:43:09 -0000 Mailing-List: contact modperl-help-at-perl.apache.org; run by ezmlm Precedence: bulk Delivered-To: mailing list modperl-at-perl.apache.org Received: (qmail 93605 invoked by uid 99); 16 Apr 2021 18:43:08 -0000 Received: from spamproc1-he-fi.apache.org (HELO spamproc1-he-fi.apache.org) (95.217.134.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Apr 2021 18:43:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-fi.apache.org (ASF Mail Server at spamproc1-he-fi.apache.org) with ESMTP id 1F417C0480 for ; Fri, 16 Apr 2021 18:43:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-fi.apache.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamproc1-he-fi.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([116.203.227.195]) by localhost (spamproc1-he-fi.apache.org [95.217.134.168]) (amavisd-new, port 10024) with ESMTP id T1_MKgnV8LxA for ; Fri, 16 Apr 2021 18:43:06 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::e34; helo=mail-vs1-xe34.google.com; envelope-from=mithnb-at-gmail.com; receiver= Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id CBE727FCDE for ; Fri, 16 Apr 2021 18:43:05 +0000 (UTC) Received: by mail-vs1-xe34.google.com with SMTP id l1so26156vsi.13 for ; Fri, 16 Apr 2021 11:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ojU2fY+vlKp79GGE0YrsekAsciyGg6biQ2nyKLH4+Yc=; b=t8moOMIjLycFQIE07lCnfLhR+cI1uTyjVCNb9XrVXmXBd0db/lrlnaRJFfiTy/l3kg 94HjHplXegXPBKawY6VJyiZLPuq64uzdsF0fxvpTrCCUTkzgV09RKE7dZ3FebNILsqSE XXTNrDkIyxQtfKK8QuyBn7Vaeu+JqbJfyjO6C5PMMTBg+A7SYX8ZS8c/GLmfP/bT8J9H VsidbzxTSSmpX1z8MXo4D1XvXdCvJj/Rta7VIw3CSXCjQ8ixfCyjxXfOCc+LAAiZC3As FiSX3FdhJxTEjzJiHT0AbWdC9c1/Q6cMpzjI7RTchX/18Bvpe5DexmuDLyQwG8H+/Doc 8Jxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ojU2fY+vlKp79GGE0YrsekAsciyGg6biQ2nyKLH4+Yc=; b=Ab3Ga9HY/SqcrZ+0iJFyTpXxIptfXLm+E+WtTnNM8WOfges/qF33pLcmpEXoBvhTLq kkn176kScwQk4PePwa7BuC0KTqWLDq2199gWXyzqrrW3GFCyktwflE/SR3Amuw/8sS0B 5jjZgGS5VlfTRkWmP/Ro0QGJj5sVbk9ULK6WYWpamvuXPu8uYZZ57dKGaxZZirFFTWRM b+m6glQ5x7FzE/Vjn1eERQq26yIRCYuLqswUlFKnzxEYajF6n0sw9P06eQu56u7BuvFi mpMyC5a1ybe4jIZyvSESgmm0unshE0WFA8Tz04DDRqwr2Z/Rp6TlkZGLZuvs1XVrvGqD bCGw== X-Gm-Message-State: AOAM5310wXYjt5s0+S55OJOpcDN29bM00UT4kBlZNy/vwBUxekdnN8fo 5YLNWUAKY0KeKtUOgRiKN/4TAllp6KJL3qdaqUwo3wM+ X-Google-Smtp-Source: ABdhPJzkbevXpT4JohSRUD+yVQe9bv9BFWZdeGY3qw0LpqX8if+lBauwTZsD3FFDf97CMInfFBUxX17w33QHc2HaEAU= X-Received: by 2002:a67:c85:: with SMTP id 127mr7929026vsm.53.1618598584238; Fri, 16 Apr 2021 11:43:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mithun Bhattacharya Date: Fri, 16 Apr 2021 13:42:52 -0500 Message-ID: To: mod_perl list Subject: Re: [Hangout - NYLXS] Fixing Apache::ReadConfig limitations X-BeenThere: hangout-at-nylxs.com X-Mailman-Version: 2.1.30rc1 List-Id: NYLXS Tech Talk and Politics List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1866661541==" Errors-To: hangout-bounces-at-nylxs.com Sender: "Hangout"
--===============1866661541== Content-Type: multipart/alternative; boundary="000000000000a5c61705c01b5987"
--000000000000a5c61705c01b5987 Content-Type: text/plain; charset="UTF-8"
Doesnt it accept array of array refs for this purpose ?
On Fri, Apr 16, 2021 at 1:10 PM John A. wrote:
> Presently, Apache::ReadConfig doesn't seem to provide a way to represent > the order of directives, which limits its usefulness when used with > modules like mod_rewrite that rely on the order of certain directives: > > > ServerName example.com > DirectoryRoot /www > > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule (.*) cgit.cgi/$1 [END,QSA] > > > > This piece of configuration is (AFAIK?) impossible to create using > Apache::ReadConfig, because %VirtualHost and %Directory are unordered > hashes. > > Assuming I'm correct about the problem, what could be done to fix it? > > My personal idea is to create an additional module created > Apache::ReadConfig::Full (or something), which allows the following: > > $Config->push(['VirtualHost', '*:80'] => block( > ServerName => 'example.com', > DirectoryRoot => '/www', > ['Directory', '/www'] => block( > RewriteEngine => On, > RewriteCond => '%{REQUEST_FILENAME} !-f', > RewriteCond => '%{REQUEST_FILENAME} !-d', > RewriteRule => '(.*) cgit.cgi/$1 [END,QSA]' > ) > ); > > The `block' function creates an object that amounts to an ordered, > multi-value hash a la Hash::MultiValue. (The global $Config variable is > the same type of object.) > > Before I start looking into the possibility of creating such an > interface, I thought I'd ask here whether my assumptions about > Apache::ReadConfig's limitations are correct. > > Best regards > John > >
--000000000000a5c61705c01b5987 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Doesnt=C2=A0it accept array of array=C2=A0refs for this pu= rpose ?
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">Presently, Apache::ReadConfig doesn't = seem to provide a way to represent
the order of directives, which limits its usefulness when used with
modules like mod_rewrite that rely on the order of certain directives:
<VirtualHost "*:80">
=C2=A0 =C2=A0 ServerName target=3D"_blank">example.com
=C2=A0 =C2=A0 DirectoryRoot /www
=C2=A0 =C2=A0 <Directory "/www">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteEngine On
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond %{REQUEST_FILENAME} !-f
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond %{REQUEST_FILENAME} !-d
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteRule (.*) cgit.cgi/$1 [END,QSA]
=C2=A0 =C2=A0 </Directory>
</VirtualHost>
This piece of configuration is (AFAIK?) impossible to create using
Apache::ReadConfig, because %VirtualHost and %Directory are unordered
hashes.
Assuming I'm correct about the problem, what could be done to fix it?r>
My personal idea is to create an additional module created
Apache::ReadConfig::Full (or something), which allows the following:
$Config->push(['VirtualHost', '*:80'] =3D> block(
=C2=A0 =C2=A0 ServerName =3D> '"noreferrer" target=3D"_blank">example.com',
=C2=A0 =C2=A0 DirectoryRoot =3D> '/www',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ['Directory', '/www'] =3D> b= lock(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteEngine =3D> On,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond =3D> '%{REQUEST_FILENAME} !-= f',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond =3D> '%{REQUEST_FILENAME} !-= d',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteRule =3D> '(.*) cgit.cgi/$1 [END,= QSA]'
=C2=A0 =C2=A0 )
);
The `block' function creates an object that amounts to an ordered,
multi-value hash a la Hash::MultiValue. (The global $Config variable is
the same type of object.)
Before I start looking into the possibility of creating such an
interface, I thought I'd ask here whether my assumptions about
Apache::ReadConfig's limitations are correct.
Best regards
John
--000000000000a5c61705c01b5987--
--===============1866661541== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline
_______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
--===============1866661541==--
--===============1866661541== Content-Type: multipart/alternative; boundary="000000000000a5c61705c01b5987"
--000000000000a5c61705c01b5987 Content-Type: text/plain; charset="UTF-8"
Doesnt it accept array of array refs for this purpose ?
On Fri, Apr 16, 2021 at 1:10 PM John A. wrote:
> Presently, Apache::ReadConfig doesn't seem to provide a way to represent > the order of directives, which limits its usefulness when used with > modules like mod_rewrite that rely on the order of certain directives: > > > ServerName example.com > DirectoryRoot /www > > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule (.*) cgit.cgi/$1 [END,QSA] > > > > This piece of configuration is (AFAIK?) impossible to create using > Apache::ReadConfig, because %VirtualHost and %Directory are unordered > hashes. > > Assuming I'm correct about the problem, what could be done to fix it? > > My personal idea is to create an additional module created > Apache::ReadConfig::Full (or something), which allows the following: > > $Config->push(['VirtualHost', '*:80'] => block( > ServerName => 'example.com', > DirectoryRoot => '/www', > ['Directory', '/www'] => block( > RewriteEngine => On, > RewriteCond => '%{REQUEST_FILENAME} !-f', > RewriteCond => '%{REQUEST_FILENAME} !-d', > RewriteRule => '(.*) cgit.cgi/$1 [END,QSA]' > ) > ); > > The `block' function creates an object that amounts to an ordered, > multi-value hash a la Hash::MultiValue. (The global $Config variable is > the same type of object.) > > Before I start looking into the possibility of creating such an > interface, I thought I'd ask here whether my assumptions about > Apache::ReadConfig's limitations are correct. > > Best regards > John > >
--000000000000a5c61705c01b5987 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Doesnt=C2=A0it accept array of array=C2=A0refs for this pu= rpose ?
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">Presently, Apache::ReadConfig doesn't = seem to provide a way to represent
the order of directives, which limits its usefulness when used with
modules like mod_rewrite that rely on the order of certain directives:
<VirtualHost "*:80">
=C2=A0 =C2=A0 ServerName target=3D"_blank">example.com
=C2=A0 =C2=A0 DirectoryRoot /www
=C2=A0 =C2=A0 <Directory "/www">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteEngine On
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond %{REQUEST_FILENAME} !-f
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond %{REQUEST_FILENAME} !-d
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteRule (.*) cgit.cgi/$1 [END,QSA]
=C2=A0 =C2=A0 </Directory>
</VirtualHost>
This piece of configuration is (AFAIK?) impossible to create using
Apache::ReadConfig, because %VirtualHost and %Directory are unordered
hashes.
Assuming I'm correct about the problem, what could be done to fix it?r>
My personal idea is to create an additional module created
Apache::ReadConfig::Full (or something), which allows the following:
$Config->push(['VirtualHost', '*:80'] =3D> block(
=C2=A0 =C2=A0 ServerName =3D> '"noreferrer" target=3D"_blank">example.com',
=C2=A0 =C2=A0 DirectoryRoot =3D> '/www',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ['Directory', '/www'] =3D> b= lock(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteEngine =3D> On,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond =3D> '%{REQUEST_FILENAME} !-= f',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteCond =3D> '%{REQUEST_FILENAME} !-= d',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RewriteRule =3D> '(.*) cgit.cgi/$1 [END,= QSA]'
=C2=A0 =C2=A0 )
);
The `block' function creates an object that amounts to an ordered,
multi-value hash a la Hash::MultiValue. (The global $Config variable is
the same type of object.)
Before I start looking into the possibility of creating such an
interface, I thought I'd ask here whether my assumptions about
Apache::ReadConfig's limitations are correct.
Best regards
John
--000000000000a5c61705c01b5987--
--===============1866661541== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline
_______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
--===============1866661541==--
|
|