[issue3243] Support iterable bodies in httplib

Antoine Pitrou report at bugs.python.org
Wed Dec 1 11:06:25 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Senthil:

+        try:
+           self.sock.sendall(data)

Indentation problem here.

+                if isinstance(data,str):
+                    content_length = len(data)

I'm not sure I understand. What does sending an unicode string mean?

+        # Check iterable body support
+        def iterable_body():
+            yield "one"
+            yield "two"
+            yield "three"

Iterables of strings? this doesn't seem supported in the patch.

Also, it would be nice if the tests checked that the sent data is as expected.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3243>
_______________________________________


More information about the Python-bugs-list mailing list