[issue14562] urllib2 maybe blocks too long with small chunks

2012-04-13 Thread Anrs Hu
Anrs Hu anders.x...@gmail.com added the comment: Okay, there's a test case of web.py: Server codes are following: import web class index(object): def GET(self): yield 'hello\n' yield 'world\n' time.sleep(60) client is Python interpreter resp = urllib.urlopen(URL

[issue14562] urllib2 maybe blocks too long

2012-04-12 Thread Anrs Hu
New submission from Anrs Hu anders.x...@gmail.com: If HTTP URL response's Transfer-Encoding is 'Chunked', then the urllib2.urlopen(URL).readline() will block until there're enough 8192 bytes, even though the first chunk is just a line. Every chunks should be processed as soon as posible, so