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

Slashes in IDs not encoded #1

Closed
mmalecki opened this issue Dec 31, 2013 · 3 comments
Closed

Slashes in IDs not encoded #1

mmalecki opened this issue Dec 31, 2013 · 3 comments

Comments

@mmalecki
Copy link

I'm doing Db.Get("user/foo"), but the slash isn't encoded, resulting in requesting /db/user/foo from CouchDB (the slash should be encoded to %2F).

@mmalecki
Copy link
Author

So I dug a little and it appears that the value is encoded properly when it's passed to NewRequest. However, on tcpdump it shows up unencoded.

@fjl
Copy link
Owner

fjl commented Feb 4, 2014

I'm not sure how to fix this in a good way yet. The problem is that design documents
go through the same code path and I don't want to change that. I guess I'll just have
add a special case for them.

pegli added a commit to obscure-com/go-couchdb that referenced this issue Apr 15, 2015
…r non-design document doc IDs and substitute %2F for / in the name. Modified the newRequest function to construct a url.URL object that does not decode path elements (see notes at http://godoc.org/net/url#URL)
@fjl
Copy link
Owner

fjl commented Nov 8, 2020

Fixed in 9bc16a4

@fjl fjl closed this as completed Nov 8, 2020
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

No branches or pull requests

2 participants