jjlee / mechanize

Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize .
http://wwwsearch.sourceforge.net/mechanize/
618 stars 123 forks source link

Browser.open() hangs if Transfer-Encoding: chunked #50

Closed gbrindisi closed 3 years ago

gbrindisi commented 12 years ago

Hello there,

I am having issues when trying to open pages when getting Transfer-Encoding: chunked in responses.

Browser.open() simply hangs without raising any exception. I don't have stacktrace to show, but here is the debug output of the request:

send: 'GET http://www.tuttosport.com/robots.txt HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.tuttosport.com\r\nConnection: close\r\nUser-Agent: Python-urllib/2.6\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Length: 28
header: ETag: "5417a9-1c-44692ef7da100"
header: Date: Sat, 01 Oct 2011 01:00:29 GMT
header: Last-Modified: Wed, 20 Feb 2008 08:40:04 GMT
header: Expires: Sat, 01 Oct 2011 01:05:29 GMT
header: Server: Apache
header: Accept-Ranges: bytes
header: Content-Type: text/plain
header: Connection: close
send: 'GET http://www.tuttosport.com/ HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.tuttosport.com\r\nConnection: close\r\nUser-Agent: Python-urllib/2.6\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Sat, 01 Oct 2011 01:00:30 GMT
header: Expires: Sat, 01 Oct 2011 01:05:30 GMT
header: Server: Apache
header: Accept-Ranges: bytes
header: Content-Type: text/html
header: Transfer-Encoding: chunked
header: Age: 1
header: Connection: close
simone commented 12 years ago

any news? I have the same problem using twill (that use mechanize)

phototrope commented 7 years ago

I'm having the same problem with Mechanize. Has this ever been looked at?

jjlee commented 7 years ago

@phototrope mechanize development moved to https://github.com/python-mechanize/mechanize