[Twisted-Python] Configuration options for twisted code

Adi Roiban adi at roiban.ro
Mon Mar 3 11:09:11 MST 2014


While using twisted.web (but not only) I had to sub-class twisted code to
implement the following:

HTTPChannel
* reduce limit of HTTP headers length
* reduce number of HTTP headers
* connection timeout

HTTPRequest
* change HTTP server signature
* change HTTP cookie name and secure/HTTPOnly flag

Static.File
* resource for child not found
* resource for forbidden
* template for directory listing.

During review process, one feedback was to add these options as part of
__init__ method for the required classes and another one was to design some
configuration system, which allows changing these options without
sub-classing.

What do you think? Should I go ahead and add options as __init__ arguments
or think of a configuration system?

Thanks!

-- 
Adi Roiban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140303/4e37be9c/attachment.html>


More information about the Twisted-Python mailing list