mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-01 18:56:41 +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):
|
def render_GET(self, request):
|
||||||
uri = DecodedURL.from_text(request.uri.decode('utf8'))
|
uri = DecodedURL.from_text(request.uri.decode('utf8'))
|
||||||
# XXX FIXME
|
capability = None
|
||||||
capability = uri.query[0][1]
|
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:
|
if self._data is None or capability not in self._data:
|
||||||
return u"No data for '{}'".format(capability).decode("ascii")
|
return u"No data for '{}'".format(capability).decode("ascii")
|
||||||
|
Loading…
Reference in New Issue
Block a user