temboz - Check-in [429]
Not logged in
[Honeypot]  [Browse]  [Help]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline]  [Wiki
  [Patchset]  [Tagging/Branching
Check-in Number: 429
Date: 2009-Sep-26 00:56:41 (local)
2009-Sep-26 07:56:41 (UTC)
User:majid
Branch:
Comment: disabled gzip compression for IE, as IE8 at least is buggy in its handling of it and can enter an infinite loop
Tickets:
Inspections:
Files:
temboz/server.py      1.41 -> 1.42     4 inserted, 2 deleted

temboz/server.py 1.41 -> 1.42
--- /tmp/T0Rcaaa6	Mon Sep  6 18:26:28 2010
+++ /tmp/T1Scaaa6	Mon Sep  6 18:26:28 2010
@@ -1,5 +1,5 @@
 #!/usr/local/bin/python
-# $Id: server.py,v 1.41 2009/09/18 08:33:49 majid Exp $
+# $Id: server.py,v 1.42 2009/09/26 07:56:41 majid Exp $
 import sys, os, stat, logging, base64, time, imp, gzip, imp
 import BaseHTTPServer, SocketServer, cgi, cStringIO, urlparse
 import param, update, filters, util
@@ -99,7 +99,9 @@
     # gzip compression
     if ct and ct.startswith('text') and len(output) > 1500 \
            and 'accept-encoding' in self.headers.dict \
-           and 'gzip' in self.headers.dict['accept-encoding']:
+           and 'gzip' in self.headers.dict['accept-encoding'] \
+           and 'user-agent' in self.headers.dict \
+           and 'MSIE' not in self.headers.dict['user-agent']:
       http_headers.append('Content-Encoding: gzip')
       gzbuf = cStringIO.StringIO()
       gzfile = gzip.GzipFile(fileobj=gzbuf, mode='wb', compresslevel=9)