Roundup Tracker - Issues


Author rouilj
Recipients rouilj
Date 2018-08-11.01:56:45
Message-id <>
The roundup-server never compresses data even if accept-encoding 
includes gzip.

This code from:

Building on @velis answer above, here is how I do it. gZipping small 
data is not worth the time and can increase its size. Tested with 
Dalvik client.

def do_GET(self):
    ... get content
    self.send_response(returnCode)       # 200, 401, etc
    ...your other headers, etc...
    if len(content) > 100:                       # don't bother 
compressing small data
        if 'accept-encoding' in self.headers:    # case insensitive
            if 'gzip' in self.headers['accept-encoding']:
                content = gzipencode(content)    # gzipencode defined 
above in @velis answer
                self.send_header('content-encoding', 'gzip')
    self.send_header('content-length', len(content))
    self.end_headers()          # send a blank line


could be modified to compress static assets (@@file) if the browser 
will accept gzippped data. For images, javascript (e.g. bootstrap used 
by jinja templates) etc this could be a real win.

Some proxy servers (e.g. hiawatha) can't compress the data being
returned by roundup-server, so the roundup server needs to do the 
Date User Action Args
2018-08-11 01:56:46rouiljsetrecipients: + rouilj
2018-08-11 01:56:46rouiljsetmessageid: <>
2018-08-11 01:56:46rouiljlinkissue2550990 messages
2018-08-11 01:56:45rouiljcreate