Hi!

On Sat, Nov 29, 2003 at 02:49:20AM -0600, John Michael wrote:
> But This:
> 
>  if ($h->r->connection->aborted) {
> 
> would not be called until this
> 
> $h->r->send_fd($fh);
> 
> were already through.  For a large file, wouldn't that it too late.
> or would a real aborted connection cause send_fd($fh) to go ahead and stop
> sending the file.

I think that's exactly what's happening. If the connection is aborted,
send_fd stops (because it cannot write to the client) and sets
$r->connection->aborted.

To tell the thruth, I'm not enterly sure this is correct (maybe somebody
with (better) knowings of the internals (mod_perl 1.x, BTW) can confirm
this..).

> Say I want to only allow one coneection per ip to a certain folder.
> I think I need to create an access handle to determine and monitor whether
> to allow someone another connection from their ip.  Return OK if they are
> allowed, update a list of some sort showing that the ip does have an active
> connection.
> 
> I need to know where to remove the active connection.
> WOuld I then create a handler to run in the logging phase to remove the the
> IP from the active connection list.

I'm not sure if there's an Perl interface to it, but mod_status reports all
open connections to clients.

-- 
#!/usr/bin/perl                               http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to