Re: [RELEASE CANDIDATE] mod_perl-1.31 RC8
In data 11 mai 2009 alle ore 03:40:25, Philippe M. Chiasson go...@apache.org ha scritto: The mod_perl 1.31 release candidate 8 is ready. It can be downloaded here: http://www.apache.org/~gozer/mp1/mod_perl-1.31-rc8.tar.gz SHA1(mod_perl-1.31-rc8.tar.gz)= 36c0e59a374dbd490da061c6b45b8e11d1f80309 MD5(mod_perl-1.31-rc8.tar.gz)= 0c2808ccf669fea79760636e425f38b3 Please give it a spin in your favorite configuration and report any problems. Especially needed against Perl-5.10 and on Windows. I'm trying to compile it on Vista against MSVC 2005, but it seems that I'm unable to do it. I tried compiling via the Makefile src/os/win32/makefile.win, or even src/Apache.mak but the first error I see is: regerror.c(62) : warning C4996: 'errcode' was declared deprecated C:\dev\msvc2005\VC\INCLUDE\crtdefs.h(506) : see declaration of 'errcode' Message: 'This name was supported during some Whidbey pre-releases. Instead, use the standard name errno_t.' regerror.c(62) : error C2081: 'preg' : name in formal parameter list illegal regerror.c(62) : error C2081: 'errbuf' : name in formal parameter list illegal regerror.c(62) : error C2081: 'errbuf_size' : name in formal parameter list illegal regerror.c(63) : warning C4028: formal parameter 2 different from declaration regerror.c(63) : warning C4028: formal parameter 3 different from declaration regerror.c(63) : warning C4028: formal parameter 4 different from declaration ... Then I tried importing the Apache.dsp but VC complains it's a corrupted project file. Tried to look into the READMEs/etc... and found nothing in particular. Maybe Apache 1.3.41 requires a newer MSVC version? Any hint? -- Cosimo
RE: [RELEASE CANDIDATE] mod_perl-1.31 RC8
Cosimo Streppone wrote on 2009-05-12: In data 11 mai 2009 alle ore 03:40:25, Philippe M. Chiasson go...@apache.org ha scritto: The mod_perl 1.31 release candidate 8 is ready. It can be downloaded here: http://www.apache.org/~gozer/mp1/mod_perl-1.31-rc8.tar.gz SHA1(mod_perl-1.31-rc8.tar.gz)= 36c0e59a374dbd490da061c6b45b8e11d1f80309 MD5(mod_perl-1.31-rc8.tar.gz)= 0c2808ccf669fea79760636e425f38b3 Please give it a spin in your favorite configuration and report any problems. Especially needed against Perl-5.10 and on Windows. I'm trying to compile it on Vista against MSVC 2005, but it seems that I'm unable to do it. [...] Tried to look into the READMEs/etc... and found nothing in particular. Maybe Apache 1.3.41 requires a newer MSVC version? This is Apache that you're trying to compile, not mod_perl, so you're asking on the wrong list really. I previously had trouble running Apache 1.3.x on Vista, and found that the best solution was simply to upgrade to Apache 2.x. Apache 1.3.x is really too old to support Vista, although I think it did get it running after a fashion eventually. Likewise, I've only ever built Apache 1.3.x using VC6. I don't think there is any support in it for VC8 or later, so it is actually an older MSVC version that you need rather than a newer one!
Connection rate limiting with Apache2::ConnectionUtil pnotes
Greetings, I ran into an issue today where I had a load surge in my application server, so I looked around for a suitable throttling module and didn't see anything simple. So I put together this snippet (very rough) which uses the connection pnotes data structure to track how many requests are made over a connection, and return a 503 if the client requests too much. I thought about using something that shared the data across processes, but was in a jam and needed to slow down some egregious user agents which were making multiple rapid requests in succession. I had to turn on KeepAlives for this to work, but it has been working pretty well. Thought I would share this (the code was written under some duress so isn't all that pretty). MIN_COUNT is the minimum number of requests to trigger a violation, and MAX_RATE is the maximum allowed request rate over one connection. my $c = $r-connection; if (my $attempts = $c-pnotes($c-remote_ip)) { my $count = $attempts-{count}; my @times = @{$attempts-{times}}; my $idx; if ($#times 9) { # take the last 10 points $count = 10; $idx=$#times-$count; } else { $idx=0; } my $total_time = $times[$#times] - $times[$idx]; push @{$attempts-{times}}, time(); $attempts-{count}++; $c-pnotes($c-remote_ip = $attempts); if ($total_time != 0) { my $rate = ($count / $total_time); $r-log-debug(throttle check ip $ip, count $count, time $total_time, rate $rate) if DEBUG; if (($count MIN_COUNT) ($rate MAX_RATE)) { $r-log-error(rate violation ip $ip, total time $total_time, count $count, rate $rate); # make 'em wait sleep 5; return Apache2::Const::HTTP_SERVICE_UNAVAILABLE; } } } else { # start tracking this client my %attempts = ( 'count' = 1, 'times' = [ time() ]); $r-log-debug(setting new limit check for ip $ip, count 1, time . time()) if DEBUG; $c-pnotes($c-remote_ip = \%attempts); }
[ANNOUNCE] mod_perl 1.31
The uploaded file mod_perl-1.31.tar.gz has entered CPAN as file: $CPAN/authors/id/G/GO/GOZER/mod_perl-1.31.tar.gz size: 389960 bytes md5: d2188bf500e9f00cd78dc97c3fbf6b97 It's finally here! After quite a few release candidates, I am happy to share with you all this new mod_perl release. Enjoy! Changes since 1.30: Fix static APACI build on Mac OS X. [Gozer] Fix XSS vulnerability in Apache::Status reported by Richard J. Brain, CVE-2009-0796 [Fred Moyer] On Win32, mod_perl.h needs to include malloc.h before the perl headers, at least when built with USE_ITHREADS [Steve Hay] Win32 needs PERL_SYS_INIT/PERL_SYS_TERM calls when built with USE_ITHREADS [sic--that's different to USE_THREADS]. In fact, they ought to be always called if they are defined [Steve Hay] Fix potential segfault when the environment contains NULL values [Mike Schilli] Fix static APACI build against newer apache-1.3.38+ [Gozer] Fixed modules/regex.t test 4 on Win32 [Steve Hay] Avoid possible segfault when PerlFreshRestart is On. [Michael Rendell mich...@cs.mun.ca] Prevent segfault when running with perl = 5.9.3 [Steve Hay] Fix shared libary extensions on Win32 to be .dll not .so [Nikolay Ananiev anan...@thegdb.com] Patch to mod_perl.dsp to remove /D _WINSOCK2API_ on Win32 for perl = 5.8.6 [Steve Hay] -- Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/ signature.asc Description: OpenPGP digital signature
Re: Connection rate limiting with Apache2::ConnectionUtil pnotes
On 12/05/09 21:50 , Fred Moyer wrote: Greetings, I ran into an issue today where I had a load surge in my application server, so I looked around for a suitable throttling module and didn't see anything simple. I personally have used mod_cband quite successfully for stuff like this, give it a look. Otherwise, nice solution! Especially if coded under the gun ;-) Gozer out. -- Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/ signature.asc Description: OpenPGP digital signature
executing PerlHandler after default_handler?
Does anyone if it's possible to fall through the default_handler (decline?) to a PerlHandler? What I want to do is issue a redirect if the file that was requested is not on disk, and I don't want the extra stat due to an NFS mount. Of course I can serve up the file myself, but it seems as though I should be able to leverage the default_handler. -wjt
svn commit: r774171 - /perl/modperl/trunk/RELEASE
Author: gozer Date: Wed May 13 02:40:20 2009 New Revision: 774171 URL: http://svn.apache.org/viewvc?rev=774171view=rev Log: We no longer have direct access to perl.apache.org. people.apache.org replaces it for all release purposes, except it's on a delayed rsync from there to the live site. Updating RELEASE instructions accordingly Modified: perl/modperl/trunk/RELEASE Modified: perl/modperl/trunk/RELEASE URL: http://svn.apache.org/viewvc/perl/modperl/trunk/RELEASE?rev=774171r1=774170r2=774171view=diff == --- perl/modperl/trunk/RELEASE (original) +++ perl/modperl/trunk/RELEASE Wed May 13 02:40:20 2009 @@ -102,14 +102,14 @@ 4. Release the package and update links (e.g. mod_perl-2.0.5.tar.gz) - a. upload to perl.apache.org:/www/perl.apache.org/dist/ + a. upload to people.apache.org:/www/perl.apache.org/dist/ -% scp mod_perl-2.0.5.tar.gz perl.apache.org:/www/perl.apache.org/dist/ +% scp mod_perl-2.0.5.tar.gz people.apache.org:/www/perl.apache.org/dist/ - b. ssh to perl.apache.org, unpack the package, update symlinks to the + b. ssh to people.apache.org, unpack the package, update symlinks to the tar ball and unpacked distro: -% ssh perl.apache.org +% ssh people.apache.org % cd /www/perl.apache.org/dist/ % ln -sf mod_perl-2.0.5.tar.gz mod_perl-2.0-current.tar.gz % tar -xzvf mod_perl-2.0.5.tar.gz @@ -152,10 +152,10 @@ % pgps -b --armor mod_perl-2.0.5.tar.gz - b. upload the generated sig file to perl.apache.org: + b. upload the generated sig file to people.apache.org: -% scp mod_perl-2.0.5.tar.gz.asc perl.apache.org:/www/perl.apache.org/dist/ -% ssh perl.apache.org +% scp mod_perl-2.0.5.tar.gz.asc people.apache.org:/www/perl.apache.org/dist/ +% ssh people.apache.org % cd /www/perl.apache.org/dist/ % chmod 0664 mod_perl-2.0.5.tar.gz.asc % ln -sf mod_perl-2.0.5.tar.gz.asc mod_perl-2.0-current.tar.gz.asc