[mod_python] Download authorisation

jarrod roberson jarrod.roberson at gmail.com
Thu Jun 23 02:17:47 EDT 2005


On 6/22/05, Wouter van Marle <wouter at squirrel-systems.com> wrote:
> 
> On Wed, 2005-06-22 at 01:18 -0400, jarrod roberson wrote:
> >
> >
> > On 6/17/05, Wouter van Marle <wouter at squirrel-systems.com> wrote:
> > Hi all,
> >
> > I've a problem that I'm struggling with: how to allow a
> > certain user a download, so that the user can download it once
> > and only once? The authorisation part I have; what I'm
> > struggling with is how to open the download for that specific
> > file to the user (not too hard), and mainly how to check
> > whether the file has been downloaded completely. Taking into
> > account that a user may only be able to download it partly
> > now, and has to resume later.
> > I can't find anything with google... can't think of a specific
> > enough query.
> >
> > Wouter.
> >
> >
> > you could try just write a cleanup handler that deleted the file when
> > the download was completed 200 OK.
> 
> The clean-up handler is the easy part :)
> How to capture such a 200 OK message?


you have the request and response references, and lots of other stuff in the 
api

> If you want to allow ranged gets for partial downloads you will have
> > to store what parts the person has downloaded somewhere in a file and
> > update that and check for completion in a cleanup handler somewhere.
> 
> No partial downloads other than later resumes - and as I understand from
> Jim Gallacher the client should request this, so no need to store
> progress info on my side.


if you don't store that they downloaded parts and total them up how are you 
going to stop them
from downloading the file over and over, one part at a time? Since the parts 
can be arbitrary lenghts
this is an EASY way to game the system.

Wouter.
> 
> >
> > this is just a data tracking problem, if you have a single server this
> > is easy to solve, if you have a cluster of servers it gets more
> > complicated very quicklly
> >
> >
> >
> >
> >
> > --
> > If you don't know what you want, you probably need a nap.
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
> 



-- 
If you don't know what you want, you probably need a nap.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050623/0a8bedfd/attachment.html


More information about the Mod_python mailing list