Skip to content

Commit

Permalink
MB-5581: Revert "removed strange header magic for username = default"
Browse files Browse the repository at this point in the history
This reverts commit 415b8f4.
Since default bucket has no password, we don't need to do sasl
authentication. It is the special case we need to keep it as is.

Change-Id: Ic2cf0499c251f24c9cb57fb16588be035f6b9a3f
Reviewed-on: http://review.couchbase.org/17290
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
  • Loading branch information
bcui6611 authored and Benjamin Young committed Jun 15, 2012
1 parent baf9240 commit a92223f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions couchbase/rest_client.py
Expand Up @@ -284,9 +284,12 @@ def _create_capi_headers(self):

#authorization must be a base64 string of username:password
def _create_headers(self):
authorization = base64.encodestring('%s:%s' % (self.username,
self.password))
return {'Content-Type': 'application/x-www-form-urlencoded',
if self.username == "default":
return {'Content-Type': 'application/json', 'Accept': '*/*'}
else:
authorization = base64.encodestring('%s:%s' % (self.username,
self.password))
return {'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic %s' % authorization,
'Accept': '*/*'}

Expand Down

0 comments on commit a92223f

Please sign in to comment.