{"action":"created","issue":{"url":"https://api.github.com/repos/go-mgo/mgo/issues/323","repository_url":"https://api.github.com/repos/go-mgo/mgo","labels_url":"https://api.github.com/repos/go-mgo/mgo/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/go-mgo/mgo/issues/323/comments","events_url":"https://api.github.com/repos/go-mgo/mgo/issues/323/events","html_url":"https://github.com/go-mgo/mgo/issues/323","id":172629601,"number":323,"title":"RFC3986 3.2.1 user/password encoding","user":{"login":"swynter-ladbrokes","id":8284169,"avatar_url":"https://avatars.githubusercontent.com/u/8284169?v=3","gravatar_id":"","url":"https://api.github.com/users/swynter-ladbrokes","html_url":"https://github.com/swynter-ladbrokes","followers_url":"https://api.github.com/users/swynter-ladbrokes/followers","following_url":"https://api.github.com/users/swynter-ladbrokes/following{/other_user}","gists_url":"https://api.github.com/users/swynter-ladbrokes/gists{/gist_id}","starred_url":"https://api.github.com/users/swynter-ladbrokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swynter-ladbrokes/subscriptions","organizations_url":"https://api.github.com/users/swynter-ladbrokes/orgs","repos_url":"https://api.github.com/users/swynter-ladbrokes/repos","events_url":"https://api.github.com/users/swynter-ladbrokes/events{/privacy}","received_events_url":"https://api.github.com/users/swynter-ladbrokes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-23T07:25:43Z","updated_at":"2016-08-23T07:30:38Z","closed_at":null,"body":"Something that's causing us a little trouble is mgo seems to be decoding the provided url as a whole without being aware of RFCs\r\n\r\nI'm aware I can manually encode things like +'s in urls but that's just not how they're stored in configs (because php and nodejs can use them just fine)\r\n\r\nI thought I'd work around it by hand crafting the url with net/url but turns out that respects the rfc.\r\n\r\nhttps://tools.ietf.org/html/rfc3986#section-3.2.1 permits\r\n\r\nuserinfo    = *( unreserved / pct-encoded / sub-delims / \":\" )\r\n\r\nunreserved  = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\r\npct-encoded = \"%\" HEXDIG HEXDIG\r\nsub-delims  = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\" / \"*\" / \"+\" / \",\" / \";\" / \"=\"\r\n\r\nSo\r\nmongodb://username:pass+word@host:port/database\r\n\r\nShould be \"username\", \"pass+word\" but is being sent to mongo as \"username\", \"pass word\""},"comment":{"url":"https://api.github.com/repos/go-mgo/mgo/issues/comments/241650157","html_url":"https://github.com/go-mgo/mgo/issues/323#issuecomment-241650157","issue_url":"https://api.github.com/repos/go-mgo/mgo/issues/323","id":241650157,"user":{"login":"freman","id":506680,"avatar_url":"https://avatars.githubusercontent.com/u/506680?v=3","gravatar_id":"","url":"https://api.github.com/users/freman","html_url":"https://github.com/freman","followers_url":"https://api.github.com/users/freman/followers","following_url":"https://api.github.com/users/freman/following{/other_user}","gists_url":"https://api.github.com/users/freman/gists{/gist_id}","starred_url":"https://api.github.com/users/freman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freman/subscriptions","organizations_url":"https://api.github.com/users/freman/orgs","repos_url":"https://api.github.com/users/freman/repos","events_url":"https://api.github.com/users/freman/events{/privacy}","received_events_url":"https://api.github.com/users/freman/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T07:30:38Z","updated_at":"2016-08-23T07:30:38Z","body":"This would be a breaking api change, I'm aware.... so perhaps a new dial method that takes a url.URL and deals with it correctly?\r\n\r\nHere's where go is implementing it\r\nhttps://golang.org/src/net/url/url.go#L138"}}
{"actor":{"display_login":"freman"}}