On Mon, Feb 11, 2013 at 9:24 AM, Michael Schlenker <msc@contact.de> wrote:
Is there some pre-made solution, or would i have to hook into the connection setup of twisted.web and check the first few bytes for the signs of an SSL Handshake signature?
Subclassing the HTTP protocol class and just adding a check in dataReceived is probably the easiest thing to do, yes. Might be worth filing a ticket for this as well. My guess is the logic would be something like "in dataReceived, if you've not hit first line, and any byte is non-ASCII, close connection", which has the nice property of being more general than just SSL. Or perhaps check what Apache does exactly. -- Itamar Turner-Trauring, Future Foundries LLC http://futurefoundries.com/ — Twisted consulting, training and support.