>
> Be aware of proxies. Many ISPs use proxies, in this situation your are
> excluding all people using the same proxy because one of their users is
> accessing a directory/file.
>

I'm not worried about this aspect.  I'm going to validate using cookies and
can use cookies along with their ip, user agent, and lang var to come up with a scheme.

I'm more worried about whether or not I am on the right track with this
section of code layout.

IF i wanted to allow a validated user to download one file at a time from a certain folder 
sub handler {
    #  validate user first to see if they belong in this area
    # check and see if this user already has an active connection and is currently downloading a file by maintaining this information in some way(memory cache, flat file, db)don't know or can you poll the active connections on the server or would that take too more resources
    # if already active return FORBIDDEN else
    # add user to active connections list if not already active
    $r->push_handlers(PerlCleanupHandler => \&cleanup);
    return OK;

}
sub cleanup {
    # remove active connections here b/c I won't be called until either the file is through being sent or user terminated connection freeing up services for this user to download another file
}


Is this correct.
John Michael

Reply via email to