You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2020/03/24 10:13:36 UTC
svn commit: r1875569 - in /httpd/test/framework/trunk/t: apache/limits.t
conf/extra.conf.in
Author: rjung
Date: Tue Mar 24 10:13:36 2020
New Revision: 1875569
URL: http://svn.apache.org/viewvc?rev=1875569&view=rev
Log:
Use new configurable LimitRequestLine
(via -limitrequestline).
Modified:
httpd/test/framework/trunk/t/apache/limits.t
httpd/test/framework/trunk/t/conf/extra.conf.in
Modified: httpd/test/framework/trunk/t/apache/limits.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/limits.t?rev=1875569&r1=1875568&r2=1875569&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/apache/limits.t (original)
+++ httpd/test/framework/trunk/t/apache/limits.t Tue Mar 24 10:13:36 2020
@@ -12,7 +12,7 @@ use Apache::TestUtil;
#
# These values are chosen to exceed the limits in extra.conf, namely:
#
-# LimitRequestLine 128
+# LimitRequestLine @limitrequestline@
# LimitRequestFieldSize 1024
# LimitRequestFields 32
# <Directory @SERVERROOT@/htdocs/apache/limits>
@@ -20,10 +20,12 @@ use Apache::TestUtil;
# </Directory>
#
+my $limitrequestlinex2 = Apache::Test::config()->{vars}->{limitrequestlinex2};
+
my @conditions = qw(requestline fieldsize fieldcount bodysize merged_fieldsize);
my %params = ('requestline-succeed' => "/apache/limits/",
- 'requestline-fail' => ("/apache/limits/" . ('a' x 256)),
+ 'requestline-fail' => ("/apache/limits/" . ('a' x $limitrequestlinex2)),
'fieldsize-succeed' => 'short value',
'fieldsize-fail' => ('a' x 2048),
'fieldcount-succeed' => 1,
Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1875569&r1=1875568&r2=1875569&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Tue Mar 24 10:13:36 2020
@@ -272,10 +272,10 @@
<IfVersion >= 2.4>
<Location /modules/rewrite/pr60478-rewrite-loop>
# This pair of RewriteRules will loop but should eventually 500 once we
- # reach LimitRequestLine * 2 bytes. (In this case, 128 * 2 = 256.)
+ # reach LimitRequestLine * 2 bytes. (In this case, @limitrequestline@ * 2 = @limitrequestlinex2@.)
RewriteRule ^(.*)X(.*)$ $1x$2
# Don't run the test machine out of memory on failure, just stop the loop
- RewriteCond expr "util_strlen(%{REQUEST_FILENAME}) -lt 257"
+ RewriteCond expr "util_strlen(%{REQUEST_FILENAME}) -le @limitrequestlinex2@"
RewriteRule X - [N]
</Location>
</IfVersion>
@@ -558,7 +558,7 @@ Alias /manual @inherit_documentroot@/man
## LimitRequest* directive testing
##
-LimitRequestLine 128
+LimitRequestLine @limitrequestline@
LimitRequestFieldSize 1024
LimitRequestFields 32
<Directory @SERVERROOT@/htdocs/apache/limits>
Re: svn commit: r1875569 - in /httpd/test/framework/trunk/t:
apache/limits.t conf/extra.conf.in
Posted by Rainer Jung <ra...@kippdata.de>.
Hi Yann,
Am 24.03.2020 um 14:04 schrieb Yann Ylavic:
> On Tue, Mar 24, 2020 at 11:13 AM <rj...@apache.org> wrote:
>>
>> Author: rjung
>> Date: Tue Mar 24 10:13:36 2020
>> New Revision: 1875569
> []
>>
>> +my $limitrequestlinex2 = Apache::Test::config()->{vars}->{limitrequestlinex2};
>
> s/linex2};/line} * 2;/ ?
The x2 variant is also used in
t/conf/extra.conf.in
RewriteCond expr "util_strlen(%{REQUEST_FILENAME}) -le @limitrequestlinex2@"
and since our expr doesn't allow arithmetic expressions (apart from
comparison) I had to introduce the x2 variant. So once it is there I
though it would be consistent to use it in both places. But of course,
we could remove its use in the perl script. Do you have a strong preference?
Regards,
Rainer
Re: svn commit: r1875569 - in /httpd/test/framework/trunk/t:
apache/limits.t conf/extra.conf.in
Posted by Yann Ylavic <yl...@gmail.com>.
On Tue, Mar 24, 2020 at 11:13 AM <rj...@apache.org> wrote:
>
> Author: rjung
> Date: Tue Mar 24 10:13:36 2020
> New Revision: 1875569
[]
>
> +my $limitrequestlinex2 = Apache::Test::config()->{vars}->{limitrequestlinex2};
s/linex2};/line} * 2;/ ?