Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't encode username/pass unless necessary #854

Closed
wants to merge 1 commit into from

Conversation

nolanlawson
Copy link
Member

This along with pouchdb/pouchdb-server#170 should fix pouchdb/express-pouchdb#430.

The goal is just to avoid encoding the username/password if we're in admin party mode and neither is required. This avoids the http://null:@localhost bug.

Unfortunately this doesn't 100% fix the problem, because it relies on the URL of fauxton being the same as the URL of the CouchDB itself, which is not always the case. But it'll at least fix things for pouchdb-server as-is.

@nolanlawson
Copy link
Member Author

One thing I was very confused about with this code is that, to replicate to or from local DBs, you don't need to specify the full URL; you can just specify the DB name. E.g.:

curl -X POST http://localhost:6984/_replicator \
  -H 'content-type:application/json' \
  -d '{"_id": "test_replication1", "source": "http://examples.cloudant.com/animaldb", "target": "animaldb", "create_target": true}'

This works fine; is there any reason to use the full URL for local DBs? It also breaks when you run Fauxton at a different root than the database itself.

@garrensmith
Copy link
Member

@nolanlawson I've added a test and continued this work here #858

If the tests all pass I'll merge it all in.

@garrensmith
Copy link
Member

One thing, we need full urls because CouchDB 2.0 requires it.

@nolanlawson
Copy link
Member Author

okay, closing in favor of #858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fauxton: can't replicate from remote DB
2 participants