[mod_python] apache.DECLINED not working as expected

webograph webograph at eml.cc
Sun Jul 2 16:50:43 EDT 2006


hi,

i'm currently implementing a server that provides downsampled and
cropped versions of available images.
the idea is to have a regular directory structure and a python handler
that does (in pseudocode):

if exists(requested_file):
    return apache.DECLINED

image=open(original(requested_file))
image=image.scale_down()
image.save(requested_file)

return apache.DECLINED

the problem is that i always get a 404 when i request a file that has
just been created; it's not a timing problem.

i've solved it using a req.internal_redirect, but i don't think that
that is the ideal solution

regards
webograph


More information about the Mod_python mailing list