Closed GoogleCodeExporter closed 9 years ago
I think the page in question has been fixed, but the error was that the page was
gzipped, but a Wordpress extension added a HTML comment after the gzipped
content.
Original comment by zelo.z...@gmail.com
on 17 Mar 2009 at 12:45
Yes, some Wordpress extensions will add unzipped content after the zipped
content,
which makes the entire body unzippable. In your application code you can catch
the
error and retry the request after setting an Accept-Encoding: header that
doesn't
include gzip, such as:
h.request(uri, headers={'accept-encoding': 'identity'})
Not sure if such functionality should be folded into the core library, but I'm
willing to listen to arguments.
Original comment by joe.gregorio@gmail.com
on 16 Jul 2009 at 4:36
The web as we know it is definitely broken in many ways. The browsers have
adopted to
that and they (apparently) automatically retry request with gzip disabled,
since the
browser knows how to display the content. I think that including this might
improve
the experience, but to not loosen the control, an option could be added to set
retry
values.
However, it seems that this is more of a political issue than technical and I
may not
understand correctly what the goal of httplib2 is.
Original comment by zelo.z...@gmail.com
on 11 Aug 2009 at 1:39
I have problems with a server that sends the wrong Content-Encoding header no
matter what I do (gzip, but gets me FailedToDecompressContent).
Setting a custom Accept-Encoding doesn't help here, so I think httplib2 should
handle that internally, by just not trying to unzip.
Original comment by julian....@gmail.com
on 2 Aug 2010 at 6:46
Original issue reported on code.google.com by
zelo.z...@gmail.com
on 9 Mar 2009 at 9:16Attachments: