ah, so what i really have to do, then, is change ctx.status?
i just skimmed through the (not very user-friendly) documentation looking
for how to tell the server to issue a 404, and found notfound().  i wanted
it to reply with a 404 code and also send the contents of 404.html. i'll try
changing ctx.status.

the reason i wrote the routine is essentially so that the browser can access
status/somefile.ext with a uri of domain.net/somefile.ext instead of
domain.net/static/somefile.ext.

ok, changing web.ctx.status worked.  i still can't get the images to render,
though. i tried adding header('Content-Type', 'image/gif')  and changing the
file mode from 'r' to 'rb', still doesn't work.



>
> if you dont want the not found, then why are you calling notfound()?
> you're essentially writing your own routing which is unnecessary or
> maybe i'm just missing the point.
> if not,  just let your webserver do the work. otherwise, you have to
> choose a correct header, etc.
>
> so it's clear, here's the source in .23
>
> def notfound():
>    """Returns a `404 Not Found` error."""
>    ctx.status = '404 Not Found'
>    header('Content-Type', 'text/html')
>    return output('not found')
>
>
> -brentp
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to