Re: svn commit: r1901514 - in /httpd/test/framework/trunk: README t/conf/extra.conf.in t/modules/sed.t

2022-06-09 Thread Eric Covener
On Thu, Jun 9, 2022 at 11:11 AM Rainer Jung  wrote:
>
> I wonder, what the following test is expected to test? I can't really
> make it work reliably here. Sometimes I get an ENOMEM on the server,
> sometimes it takes a long time and much CPU, sometimes the client gets a
> 596 AnyEvent::HTTP error and sometimes it runs ok.
>
> Am 01.06.2022 um 15:03 schrieb cove...@apache.org:
> > Modified: httpd/test/framework/trunk/t/modules/sed.t
> > URL: 
> > http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/sed.t?rev=1901514=1901513=1901514=diff
> > ==
> > --- httpd/test/framework/trunk/t/modules/sed.t (original)
> > +++ httpd/test/framework/trunk/t/modules/sed.t Wed Jun  1 13:03:08 2022
> > @@ -5,29 +5,44 @@ use Apache::Test;
> >   use Apache::TestRequest;
> >   use Apache::TestUtil;
> >
> > +# Hack to allow streaming of data in/out of mod_echo
> > +use LWP::Protocol::AnyEvent::http;
> > +
> >   my @ts = (
> >  # see t/conf/extra.conf.in
> > -   { url => "/apache/sed/out-foo/foobar.html", content => 'barbar', msg => 
> > "sed output filter", code => 200 },
> > -   { url => "/apache/sed-echo/echo.html", content => 'barbar', msg => "sed 
> > input filter", code => 200, body=>"foobar" }
> > +   { url => "/apache/sed/out-foo/foobar.html", content => 'barbar', msg => 
> > "sed output filter", code => '200' },
> > +   # error after status sent
> > +   { url => "/apache/sed-echo/out-foo-grow/foobar.html", content => "", 
> > msg => "sed output filter too large", code => '200', body=>"foo" x 
> > (8192*1024), resplen=>0},
>
> I found no  other body size, that made it reliable, so therefore I am
> wondering, what it would test in an ideal world.

This one was reliable for me so I didn't give it much thought -- the
reflected output has no newlines, so mod_sed should buffer up to 8MB
then have to give up, resulting in an empty response (status line
already flushed)
Maybe the high CPU case gives a hint?


Re: svn commit: r1901514 - in /httpd/test/framework/trunk: README t/conf/extra.conf.in t/modules/sed.t

2022-06-09 Thread Rainer Jung
I wonder, what the following test is expected to test? I can't really 
make it work reliably here. Sometimes I get an ENOMEM on the server, 
sometimes it takes a long time and much CPU, sometimes the client gets a 
596 AnyEvent::HTTP error and sometimes it runs ok.


Am 01.06.2022 um 15:03 schrieb cove...@apache.org:

Modified: httpd/test/framework/trunk/t/modules/sed.t
URL: 
http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/sed.t?rev=1901514=1901513=1901514=diff
==
--- httpd/test/framework/trunk/t/modules/sed.t (original)
+++ httpd/test/framework/trunk/t/modules/sed.t Wed Jun  1 13:03:08 2022
@@ -5,29 +5,44 @@ use Apache::Test;
  use Apache::TestRequest;
  use Apache::TestUtil;
  
+# Hack to allow streaming of data in/out of mod_echo

+use LWP::Protocol::AnyEvent::http;
+
  my @ts = (
 # see t/conf/extra.conf.in
-   { url => "/apache/sed/out-foo/foobar.html", content => 'barbar', msg => "sed output 
filter", code => 200 },
-   { url => "/apache/sed-echo/echo.html", content => 'barbar', msg => "sed input filter", code 
=> 200, body=>"foobar" }
+   { url => "/apache/sed/out-foo/foobar.html", content => 'barbar', msg => "sed output 
filter", code => '200' },
+   # error after status sent
+   { url => "/apache/sed-echo/out-foo-grow/foobar.html", content => "", msg => "sed output filter too 
large", code => '200', body=>"foo" x (8192*1024), resplen=>0},


I found no  other body size, that made it reliable, so therefore I am 
wondering, what it would test in an ideal world.


Thanks and regards,

Rainer



Re: svn commit: r1901500 - in /httpd/httpd/trunk: include/http_protocol.h server/protocol.c

2022-06-09 Thread Ruediger Pluem



On 6/8/22 5:43 PM, Ivan Zhakov wrote:
> Yes, I see now. But it will be an incorrect value in case of a string
> larger than INT_MAX. Not a big issue, but IMHO strings larger than
> INT_MAX also are not big issue.

You are correct that the value will be incorrect in case of a string larger 
than INT_MAX, but as ap_rputs can only return an int
and as we cannot change this without breaking the API/ABI it looked like the 
best option to return just the value of the last call
to ap_rwrite.

One thing that comes to my mind now: As ap_rputs is static APR_INLINE in 
include/http_protocol.h I guess that third party modules
that use it need to recompile to pick this up, correct?

Regards

RĂ¼diger