diff web/index.py @ 29:048143905092

work on web interface
author Matt Johnston <matt@ucc.asn.au>
date Tue, 12 Jun 2012 23:27:53 +0800
parents e3e0ed7758f9
children 13fcf497f8b7
line wrap: on
line diff
--- a/web/index.py	Tue Jun 12 00:35:23 2012 +0800
+++ b/web/index.py	Tue Jun 12 23:27:53 2012 +0800
@@ -2,6 +2,7 @@
 
 import binascii
 import hmac
+import zlib
 
 import bottle
 from bottle import route, request
@@ -17,7 +18,7 @@
     if hmac.new(config.HMAC_KEY, enc_lines).hexdigest() != mac:
         raise HTTPError(code = 403, output = "Bad key")
 
-    lines = binascii.a2b_base64(enc_lines).split('\n')
+    lines = zlib.decompress(binascii.a2b_base64(enc_lines)).split('\n')
 
     log.parse(lines)