Projet

Général

Profil

Development #946

Support content-encoding header

Ajouté par Jérôme Schneider il y a plus de 12 ans. Mis à jour il y a environ 12 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Jérôme Schneider
Catégorie:
-
Version cible:
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

Révision ae61b7a4 (diff)
Ajouté par Jérôme Schneider il y a environ 12 ans

Fix #946: Mandaye could now decompress http response

  • config.py: add option auto_decompress which allow mandaye to
    decompress response * dispatcher.py: support decompression * http.py: add decompress method in Response class

Historique

#1

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
#2

Mis à jour par Jérôme Schneider il y a environ 12 ans

  • Sujet changé de Support content-coding header à Support content-encoding header
#3

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.

#4

Mis à jour par Jérôme Schneider il y a environ 12 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF