Mercurial > libervia-backend
comparison src/tools/common/uri.py @ 2229:761fa220a717
tools (common/uri): minor comment update
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 20 Apr 2017 17:20:44 +0200 |
parents | bdc64c487e21 |
children | e5e54ff0b775 |
comparison
equal
deleted
inserted
replaced
2228:cf6c539672c7 | 2229:761fa220a717 |
---|---|
41 """ | 41 """ |
42 uri_split = urlparse.urlsplit(uri.encode('utf-8')) | 42 uri_split = urlparse.urlsplit(uri.encode('utf-8')) |
43 if uri_split.scheme != 'xmpp': | 43 if uri_split.scheme != 'xmpp': |
44 raise ValueError(u'this is not a XMPP URI') | 44 raise ValueError(u'this is not a XMPP URI') |
45 | 45 |
46 # XXX: we don't use jid.JID for path as it can be used both in backend and frontend | |
47 # which may use different JID classes | |
46 data = {u'path': urllib.unquote(uri_split.path).decode('utf-8')} | 48 data = {u'path': urllib.unquote(uri_split.path).decode('utf-8')} |
47 | 49 |
48 query_end = uri_split.query.find(';') | 50 query_end = uri_split.query.find(';') |
49 query_type = uri_split.query[:query_end] | 51 query_type = uri_split.query[:query_end] |
50 if query_end == -1 or '=' in query_type: | 52 if query_end == -1 or '=' in query_type: |