httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Conner <...@conman.org>
Subject Re: [users@httpd] Apache with ExtFilterDefine problem
Date Fri, 22 Sep 2006 20:25:57 GMT
It was thus said that the Great host.md once stated:
> Hi to all. I am running a site with free hosting on apache. Everything works
> fine..until some of our free users, by mistake runs some infinite loops. The
> current configuration of the apache is based on ExtFilterOutput, which sends
> all the output to a script in perl that adds some banners. The problem is
> when users by mistake, generate Gigs of output, back to client,  our server
> hangs. The perl script takes all the output that apache sends via <STDIN>
> and adds, as i said, the banner:
> 
> #perl output filter
> $stdin=<STDIN>."some_banner_path_here";
> print $stdin;

  A better way would be to:

  while ($line = <STDIN>)
    print $line;
  print "some_banner_path_here";

  Less memory usage, doesn't break on huge output, and runs just as fast (if
not a bit faster since there's no memory resizing going on).

  -spc (But you may want to test it first ... )

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message