Message123038
| Author |
orsenthil |
| Recipients |
catlee, davide.rizzo, eric.araujo, georg.brandl, jhylton, orsenthil, pitrou, rcoyner, rhettinger, xuanji |
| Date |
2010年12月02日.02:19:07 |
| SpamBayes Score |
6.511231e-06 |
| Marked as misclassified |
No |
| Message-id |
<20101202021857.GA1873@rubuntu> |
| In-reply-to |
<1291197985.58.0.52800759882.issue3243@psf.upfronthosting.co.za> |
| Content |
On Wed, Dec 01, 2010 at 10:06:25AM +0000, Antoine Pitrou wrote:
> + try:
> + self.sock.sendall(data)
>
> Indentation problem here.
I could notice it now. Shall fix it.
>
> + if isinstance(data,str):
> + content_length = len(data)
>
> I'm not sure I understand. What does sending an unicode string mean?
That's my mistake with understanding, I just realized (again) that
socket.send, socket.sendall does only bytes. And we don't encode the
unicode code string to send as bytes too.
> + def iterable_body():
> + yield "one"
> + yield "two"
> + yield "three"
>
> Iterables of strings? this doesn't seem supported in the patch.
It should be:
+ yield b"one"
+ yield b"two"
+ yield b"three" |
|