Changes between and of Initial VersionVersion 6Ticket #6083
- Timestamp:
- 10/08/2012 03:28:27 PM (8 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6083
- Property milestone changed from Twisted-12.3 to
-
Ticket #6083 – description
initial v6 1 1 I'm not 100% sure which part here you consider a bug, but it definitely is rather unfortunate how it's right now: 2 2 3 If transport.writeSequence()is called with a generator on a vanilla TCP transport, it silently does nothing. The reason is that the iterable is checked for unicode strings first in a for-loop. When it tries to reuse the iterable for actually sending data, it’s exhausted so nothing is written: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/internet/abstract.py#L3403 If `transport.writeSequence()` is called with a generator on a vanilla TCP transport, it silently does nothing. The reason is that the iterable is checked for unicode strings first in a for-loop. When it tries to reuse the iterable for actually sending data, it’s exhausted so nothing is written: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/internet/abstract.py#L340 4 4 5 OTOH the TLS version doesn't check for unicode but does a simple ''.join(iovec)instead, therefor it works perfectly: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/protocols/tls.py#L5325 OTOH the TLS version doesn't check for unicode but does a simple `''.join(iovec)` instead, therefor it works perfectly: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/protocols/tls.py#L532 6 6 7 7 The situation means that if you write your code for TLS and start testing for vanilla, your protocols freeze and you have no idea why.
