I suppose you can check in GET() to see if the file exists,
and if not, return a 404?

On Tue, Jan 12, 2010 at 10:30 PM, Herman <[email protected]> wrote:
> I want to proxy image files through webpy.  I have a very simple
> index.py that I am testing with, but webpy is automagically serving up
> fake image files before I can process them.
>
> index.py:
> import web
>
> urls = ("/.*", "hello")
> app = web.application(urls, globals())
>
> class hello:
>    def GET(self):
>        return 'Hello, world!'
>
> if __name__ == "__main__":
>    app.run()
>
> Output from webserver:
> $ ./index.py 192.168.1.3:8881
> http://192.168.1.3:8881/
> 192.168.1.5:50327 - - [12/Jan/2010 22:21:00] "HTTP/1.1 GET /foo.jpg" -
> 200 OK
>
> My web output:
> http://192.168.1.3:8881/foo.jpg
>
> How can I prevent webpy from serving up this fake file?
>
> --
> 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.
>
>
>
>
-- 
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