[Twisted-web] Garbage SSL application data

Tommi Virtanen tv at twistedmatrix.com
Thu Aug 18 02:08:13 MDT 2005

Joshua Boverhof wrote:
> that works just fine.  I'm only having a problem w/HTTPS via
> twisted.web.client.  I can use httplib.HTTPSConnection just fine, it
> doesn't have the "garbage" ssl application data.

Make the server end be "openssl s_server -accept 443 -www ...", see
what that tells you.

>>> I'm also getting a few failures w/ "twisted.test.test_ssl".  I'm
>>> interpretting the error message below "startTLS doesn't empty buffer
>>> before starting TLS. :(" as the cause of my problem...
>> HTTP doesn't use STARTTLS.
> I figure if there are problems w/ test_ssl it's probably got something
> to do w/my problem...

As far as I understand, the failing test covers _only_ this case:

there is outgoing data in a buffer
twisted is told to use starttls
it switches to TLS immediately, including the data in the buffer

For non-STARTTLS protocols, TLS is used from the very beginning, so
there really can't be anything in the buffer.

More information about the Twisted-web mailing list