Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

call 'info' for calls without query argument

  • Loading branch information...
commit 24d6818101ecda000bc0d800318f70add43558d1 1 parent bfea51b
@rnewson authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 couchdb-external-hook.py
View
7 couchdb-external-hook.py
@@ -65,8 +65,11 @@ def respond(res, req, host, port):
])
return mkresp(400, body, {"Content-Type": "text/plain"})
- path = '/'.join(['', 'search', host, str(port), path[0], path[2], path[3]])
- path = '?'.join([path, urllib.urlencode(req["query"])])
+ if req["query"] == {}:
+ path = '/'.join(['', 'info', host, str(port), path[0], path[2], path[3]])
+ else:
+ path = '/'.join(['', 'search', host, str(port), path[0], path[2], path[3]])
+ path = '?'.join([path, urllib.urlencode(req["query"])])
req_headers = {}
for h in req.get("headers", []):
Please sign in to comment.
Something went wrong with that request. Please try again.