diff options
author | Jan Lehnardt <jan@apache.org> | 2009-08-29 13:42:50 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-08-29 13:42:50 +0000 |
commit | 69d5b41e7ecfa8d1b31628af5e0b2297984ea943 (patch) | |
tree | d260e4c19e2b2ebc43f599e7b2dcc2e1c97a944c /share/www/script/couch.js | |
parent | 69e03ccc8e6e39750943e298d633acb4650e56b7 (diff) |
merge cascading auth patch by Jason Davies, closes COUCHDB-478, fix tests
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@809134 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r-- | share/www/script/couch.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js index e902a730..81e25f1b 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -324,7 +324,9 @@ CouchDB.createUser = function(username, password, email, roles, basicAuth) { } } var headers = {"Content-Type": "application/x-www-form-urlencoded"}; - if (!basicAuth) { + if (basicAuth) { + headers['Authorization'] = basicAuth + } else { headers['X-CouchDB-WWW-Authenticate'] = 'Cookie'; } |