Hello, dear Twisted developers!
Attached is a twisted.protocol for PIRP, DJB's publishing protocol.
I think it would be interesting to write an interface for twisted.web
so Resources would be publishable both by the web and by PIRP (and
possibly, later, other protocols?)
The big point would probably to think up an interface to the request
which is portable enough.
I think something like:
- request.components(): return the requested path as a list of components
- request.received_headers(): return the headers
- request.write(packet): write a packet to the user
I'm still not sure how to signal failure: while in PIRP there's a single
form of failure, HTTP defines millions of them.
Anyway, I'll go off an implement a PIRP client now.
--
Moshe Zadka