From d905c4cc97220acdb7809758eefe4ed6fa86fd76 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Wed, 20 Nov 2013 14:02:26 -0500 Subject: [PATCH] Server should preferuncompressed by default --- hgwebcachingproxy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hgwebcachingproxy.py b/hgwebcachingproxy.py index 2ec18df..4c0a629 100644 --- a/hgwebcachingproxy.py +++ b/hgwebcachingproxy.py @@ -86,8 +86,9 @@ commands.norepo += " proxy" peercache = dict() class proxyserver(object): - def __init__(self, ui, serverurl, cachepath, anonymous): + def __init__(self, ui, serverurl, cachepath, anonymous, unc=True): self.ui = ui or uimod.ui() + self.ui.setconfig('server', 'preferuncompressed', str(bool(unc))), self.serverurl = (serverurl or self.ui.config('hgwebcachingproxy', 'serverurl')) self.cachepath = (cachepath or @@ -322,5 +323,5 @@ def proxy(ui, serverurl, cachepath, **opts): service = commands.httpservice(ui, app, opts) cmdutil.service(opts, initfn=service.init, runfn=service.run) -def wsgi(ui=None, serverurl=None, cachepath=None, anonymous=None): - return proxyserver(ui, serverurl, cachepath, anonymous) +def wsgi(ui=None, serverurl=None, cachepath=None, anonymous=None, unc=True): + return proxyserver(ui, serverurl, cachepath, anonymous, unc=unc)