[Twisted-Python] HTML shoudl not be baked into twisted.web HTTPimplementation
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Wed Dec 9 21:05:58 EST 2009
On 01:10 am, jared.gisin at isilon.com wrote:
>It's unambiguously the correct default if you incorrectly assume that
>you're always dealing with a web browser client, which is an invalid
>assumption.
You've said that the current behavior is wrong, and you're saying that
it's wrong to preserve the current behavior as the default but to allow
it to be overridden. The only suggestion for new behavior that you've
made, I think, is that the traceback should be text/plain instead of
text/html. Is that what you're advocating?
>The bottom line is that twisted.web contains the only implement of HTTP
>in twisted which unfortunately is muddled in HTML.
You keep saying things like this, but I think you're blowing the issue
far out of proportion. As far as I can tell, there is one place in
Twisted Web where HTML will be output when the application doesn't
explicitly request it. I don't think that's "muddled" or
"inextricable". It's simple to address; probably it could be fixed with
not much more time than has been spent writing messages in this thread.
>Get the HTML out of the HTTP protocol implementation. It flat out does
>not belong there.
>
>Twisted should provide a clean, clear interface for working with HTTP.
>Call it twisted.protocols.http, then twisted.web with all of it's
>desire
>to act like apache and serve up static content and run CGI's and speak
>the default language of HTML can be built upon twisted.protocols.http
>thus leaving me with a pure HTTP protocol implementation I can do other
>this with as per RFC 2616 that have nothing to do with browsers or
>HTML.
Please, file a ticket and attach a patch. Take a look at the
TwistedDevelopment and ReviewProcess pages on the wiki. Someone will
take a look, we can have some discussion about the specifics of the
implementation, and more likely than not, the issue can be resolved to
everyone's satisfaction.
Thanks!
Jean-Paul
More information about the Twisted-Python
mailing list