Subversion Repositories SmartDukaan

Rev

Rev 14993 | Rev 15089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14993 Rev 14994
Line 83... Line 83...
83
    mc.set("category_cash_back", cashBackMap, 24 * 60 * 60)
83
    mc.set("category_cash_back", cashBackMap, 24 * 60 * 60)
84
 
84
 
85
def ungzipResponse(r):
85
def ungzipResponse(r):
86
    headers = r.info()
86
    headers = r.info()
87
    if headers.get('Content-Encoding')=='gzip':
87
    if headers.get('Content-Encoding')=='gzip':
88
        print "********************"
-
 
89
        print "Deflating gzip response"
-
 
90
        print "********************"
-
 
91
        url_f = StringIO.StringIO(r.read())
88
        url_f = StringIO.StringIO(r.read())
92
        gz = gzip.GzipFile(fileobj=url_f)
89
        gz = gzip.GzipFile(fileobj=url_f)
93
        html = gz.read()
90
        html = gz.read()
94
        gz.close()
91
        gz.close()
95
        return html
92
        return html