John Machin wrote: > On 29/05/2006 10:47 PM, Serge Orlov wrote: > > Maybe urllib2 in > > python 2.4 reports to the server that it supports compressed data but > > doesn't decompress it when receives the reply? > > > > Something funny is happening here. Others reported it working with 2.4.3 > and Rocco's original code as posted in this thread -- which works for me > on 2.4.2, Windows XP.
It "works" for me too, returning raw uncompressed data. > There was one suss thing about Rocco's problem description: > First message ended with d=takefeed(url) > But next message said print rss > Is rss == d? Nope. If you look at html tags, 2.3 code returns <feed> <generator> ... whereas 2.4 code returns <rss> <channel> <generator> ... That may explain why 2.3 result is not compressed and 2.4 result is compressed, but that doesn't explain why 2.4 *is* compressed. I looked at python 2.4 httplib, I'm sure it's not a problem, quote from httplib: # we only want a Content-Encoding of "identity" since we don't # support encodings such as x-gzip or x-deflate. I think there is a web accellerator sitting somewhere between Rocco and Google server that is confused that Rocco is "misinforming" web server saying he's using Firefox, but at the same time claiming that he cannot handle compressed data. That's why they teach little kids: don't lie :) -- http://mail.python.org/mailman/listinfo/python-list