diff options
author | isaacs <i@izs.me> | 2011-01-08 01:04:50 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-01-08 01:04:50 +0300 |
commit | e8823b3b66c2c369add808fd388410881993529a (patch) | |
tree | dcf8dec929cbefd0263279351db11091b696def5 | |
parent | 9b395ed180372734e83eb74751514204dc3abcd0 (diff) |
Support for non-root registry URLs
-rw-r--r-- | lib/utils/registry/request.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils/registry/request.js b/lib/utils/registry/request.js index a5bd9085b..489e6ff0d 100644 --- a/lib/utils/registry/request.js +++ b/lib/utils/registry/request.js @@ -33,7 +33,8 @@ function request (method, where, what, etag, nofollow, cb) { || where.match(adduserChange) || method === "DELETE" if (!where.match(/^https?:\/\//)) { - where = where.split("/").map(function (p) { + if (where.charAt(0) !== "/") where = "/" + where + where = "." + where.split("/").map(function (p) { p = p.trim() if (p.match(/^org.couchdb.user/)) { return p.replace(/\//g, encodeURIComponent("/")) |