[mod_python] How check permissions to GET JPG image

Mike Looijmans nlv11281 at natlab.research.philips.com
Tue Dec 6 02:20:55 EST 2005

Enot wrote:
> I need check permissions to GET JPG images and ZIP files.

Use any authorization/authentication scheme you like. There are plenty. 
Simplest is to program "if password == 's3cret': ..." Even apache will 
do it for you.

> After that i need convert JPG image name and URL to internal form.

No idea what you mean ???

> When I use req.sendfile() all works exept for download resume. After
> download stops at middle, resume is impossibe. Error in download
> manager when trying resume.

You will probably have to implement the HTTP/1.1 "Range" header. Is not 
hard to program, but will take a little finger typing. Find the HTTP RFC 
2616, and look for "Range".


More information about the Mod_python mailing list