<br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 9:24 AM, Michael Schlenker <span dir="ltr">&lt;<a href="mailto:msc@contact.de" target="_blank">msc@contact.de</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Is there some pre-made solution, or would i have to hook into the<br>
connection setup of twisted.web and check the first few bytes for the<br>
signs of an SSL Handshake signature?<br></blockquote><div><br></div><div>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 &quot;in dataReceived, if you&#39;ve not hit first line, and any byte is non-ASCII, close connection&quot;, which has the nice property of being more general than just SSL. Or perhaps check what Apache does exactly.</div>
</div><div><br></div>-- <br>Itamar Turner-Trauring, Future Foundries LLC<br><a href="http://futurefoundries.com/" target="_blank">http://futurefoundries.com/</a> — Twisted consulting, training and support.<br>