mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-30 08:04:08 +00:00
match query args
This commit is contained in:
parent
24899dae8e
commit
b952ef066c
@ -177,8 +177,16 @@ class _FakeTahoeUriHandler(Resource, object):
|
||||
|
||||
def render_GET(self, request):
|
||||
uri = DecodedURL.from_text(request.uri.decode('utf8'))
|
||||
# XXX FIXME
|
||||
capability = uri.query[0][1]
|
||||
capability = None
|
||||
for arg, value in uri.query:
|
||||
if arg == u"uri":
|
||||
capability = value
|
||||
if capability is None:
|
||||
raise Exception(
|
||||
"No ?uri= arguent in GET '{}'".format(
|
||||
uri.to_string()
|
||||
)
|
||||
)
|
||||
|
||||
if self._data is None or capability not in self._data:
|
||||
return u"No data for '{}'".format(capability).decode("ascii")
|
||||
|
Loading…
x
Reference in New Issue
Block a user