[Twisted-Python] confusion with general web serving
Phil Mayers
p.mayers at imperial.ac.uk
Sun Apr 15 05:45:14 MDT 2007
Jonathan Vanasco wrote:
> i'm missing a key piece of connectivity here:
>
> i'm building a twisted daemon to serve files. right now it will serve
> off a local structure, in the future it will do that + handle proxying
> to s3.
>
> I stripped out all the app specific code below. my issue is that i
> can't figure out how to display a file on the system for a url, short of
> slurping it
>
> i thought static.File would have soemthing to do with it, but I can't
> figure out how to get it into the http.Request.process routine.
You're asking on the wrong list really - you should ask on twisted-web
Your problem is that you're trying to implement the HTTP protocol. Don't
do that, it's not needed. You need to hook the protocol up to a "site"
into which you can put components.
This is well documented. See:
http://twistedmatrix.com/projects/web/documentation/howto/using-twistedweb.html#auto2
More information about the Twisted-Python
mailing list