Skip to content

Commit

Permalink
prefixes is a list... and passing a string ended up treating it as a …
Browse files Browse the repository at this point in the history
…list of characters. ouch!

git-svn-id: https://xpra.org/svn/Xpra/trunk@4541 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 17, 2013
1 parent 058a3c9 commit 37cce96
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/xpra/server/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,20 @@ def filter_client_caps(self, caps):
def filter_server_caps(self, caps):
if caps.get("rencode", False):
self.server_protocol.enable_rencode()
return self.filter_caps(caps, "aliases")
return self.filter_caps(caps, ("aliases", ))

def filter_caps(self, caps, prefixes):
#removes caps that the proxy overrides / does not use:
#(not very pythonic!)
pcaps = {}
for k,v in caps.items():
removed = []
for k in caps.keys():
skip = len([e for e in prefixes if k.startswith(e)])
if skip==0:
pcaps[k] = v
pcaps[k] = caps[k]
else:
removed.append(k)
log("filtered out %s matching %s", removed, prefixes)
#replace the network caps with the proxy's own:
pcaps.update(get_network_caps())
#then add the proxy info:
Expand Down

0 comments on commit 37cce96

Please sign in to comment.