Development #946
Support content-encoding header
Début:
17 novembre 2011
Echéance:
% réalisé:
90%
Temps estimé:
Patch proposed:
Planning:
Description
Actually Mandaye doesn't decompress HTTP response for the filters. Mandaye should support decompression of text content like text/html, text/css, application/x-javascript, ..
urllib2 doesn't support this automatically.
We need to integrate this code in an urllib2 handler (http://stackoverflow.com/questions/1704754/convert-gzipped-data-fetched-by-urllib2-to-html) :
import StringIO data = StringIO.StringIO(data) import gzip gzipper = gzip.GzipFile(fileobj=data) html = gzipper.read()
Révisions associées
Historique
Mis à jour par Jérôme Schneider il y a plus de 12 ans
- Assigné à mis à Jérôme Schneider
- Version cible mis à 1.1
Mis à jour par Jérôme Schneider il y a environ 12 ans
- Sujet changé de Support content-coding header à Support content-encoding header
Mis à jour par Jérôme Schneider il y a environ 12 ans
- Statut changé de Nouveau à Solution déployée
- % réalisé changé de 0 à 90
Appliqué par commit commit:ae61b7a47b971d47d416da97d06d919125ab302f.
Fix #946: Mandaye could now decompress http response
decompress response * dispatcher.py: support decompression * http.py: add decompress method in Response class