Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tidy up python script

  • Loading branch information...
commit 980372a2b6a3c6bdc59c388086f8319e76fc36a7 1 parent 24d6818
Robert Newson authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 couchdb-external-hook.py
View
7 couchdb-external-hook.py
@@ -65,10 +65,13 @@ def respond(res, req, host, port):
])
return mkresp(400, body, {"Content-Type": "text/plain"})
+ # Drop name of external hook.
+ del path[1]
+
if req["query"] == {}:
- path = '/'.join(['', 'info', host, str(port), path[0], path[2], path[3]])
+ path = '/'.join(['', 'info', host, str(port)] + path)
else:
- path = '/'.join(['', 'search', host, str(port), path[0], path[2], path[3]])
+ path = '/'.join(['', 'search', host, str(port)] + path)
path = '?'.join([path, urllib.urlencode(req["query"])])
req_headers = {}
Please sign in to comment.
Something went wrong with that request. Please try again.