{"action":"opened","issue":{"url":"https://api.github.com/repos/fjl/go-couchdb/issues/6","labels_url":"https://api.github.com/repos/fjl/go-couchdb/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/fjl/go-couchdb/issues/6/comments","events_url":"https://api.github.com/repos/fjl/go-couchdb/issues/6/events","html_url":"https://github.com/fjl/go-couchdb/issues/6","id":104375279,"number":6,"title":"Design documents improperly escaped","user":{"login":"flimzy","id":8555063,"avatar_url":"https://avatars.githubusercontent.com/u/8555063?v=3","gravatar_id":"","url":"https://api.github.com/users/flimzy","html_url":"https://github.com/flimzy","followers_url":"https://api.github.com/users/flimzy/followers","following_url":"https://api.github.com/users/flimzy/following{/other_user}","gists_url":"https://api.github.com/users/flimzy/gists{/gist_id}","starred_url":"https://api.github.com/users/flimzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flimzy/subscriptions","organizations_url":"https://api.github.com/users/flimzy/orgs","repos_url":"https://api.github.com/users/flimzy/repos","events_url":"https://api.github.com/users/flimzy/events{/privacy}","received_events_url":"https://api.github.com/users/flimzy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-01T23:40:47Z","updated_at":"2015-09-01T23:40:47Z","closed_at":null,"body":"While trying to query a view, I discovered that design documents are improperly escaped.\r\n\r\nThe first indication of a problem was that go-couchdb was complaining of insufficient permissions to access the view:\r\n\r\n> GET http://xxx.xxx.xxx/_users/_design/users/_view/by_provider: (403) forbidden: Only admins can access design document actions for system databases.\r\n\r\nAnd my couch log showed these requests:\r\n\r\n> [Tue, 01 Sep 2015 22:54:29 GMT] [info] [<0.268.0>] xxx.xxx.xxx.xxx - - GET /_users/_design%2Fusers/_view/by_provider 301\r\n> [Tue, 01 Sep 2015 22:54:30 GMT] [info] [<0.269.0>] xxx.xxx.xxx.xxx  - - GET /_users/_design/users/_view/by_provider 403\r\n\r\nSo it turns out the redirect wasn't getting the necessary auth headers.  But the *real* problem here is that the slash in `_design/users` shouldn't be escaped at all.\r\n\r\nI have a PR coming soon."}}