{"action":"opened","issue":{"url":"https://api.github.com/repos/http4s/http4s/issues/676","repository_url":"https://api.github.com/repos/http4s/http4s","labels_url":"https://api.github.com/repos/http4s/http4s/issues/676/labels{/name}","comments_url":"https://api.github.com/repos/http4s/http4s/issues/676/comments","events_url":"https://api.github.com/repos/http4s/http4s/issues/676/events","html_url":"https://github.com/http4s/http4s/issues/676","id":172492589,"number":676,"title":"toString/equality discrepancy for Uris with trailing slashes","user":{"login":"ceedubs","id":977929,"avatar_url":"https://avatars.githubusercontent.com/u/977929?v=3","gravatar_id":"","url":"https://api.github.com/users/ceedubs","html_url":"https://github.com/ceedubs","followers_url":"https://api.github.com/users/ceedubs/followers","following_url":"https://api.github.com/users/ceedubs/following{/other_user}","gists_url":"https://api.github.com/users/ceedubs/gists{/gist_id}","starred_url":"https://api.github.com/users/ceedubs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceedubs/subscriptions","organizations_url":"https://api.github.com/users/ceedubs/orgs","repos_url":"https://api.github.com/users/ceedubs/repos","events_url":"https://api.github.com/users/ceedubs/events{/privacy}","received_events_url":"https://api.github.com/users/ceedubs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-22T16:10:39Z","updated_at":"2016-08-22T16:10:39Z","closed_at":null,"body":"If two `Uri`s are equivalent except for a trailing slash then they are not considered equal, but it's tough to diagnose how they differ because their `toString` and `renderString` methods return the same value. See the example below.\r\n\r\nI'm not entirely sure in which direction this should be changed (to make their string version match or change their equality implementation). I do think it's confusing behavior that was worth flagging though.\r\n\r\n```scala\r\nscala> import org.http4s.Uri.uri\r\nimport org.http4s.Uri.uri\r\n\r\nscala> val withSlash = uri(\"http://foo.bar/\")\r\nwithSlash: org.http4s.Uri = http://foo.bar\r\n\r\nscala> val withoutSlash = uri(\"http://foo.bar\")\r\nwithoutSlash: org.http4s.Uri = http://foo.bar\r\n\r\nscala> withSlash == withoutSlash\r\nres0: Boolean = false\r\n\r\nscala> withSlash.renderString == withoutSlash.renderString\r\nres1: Boolean = true\r\n\r\nscala> withSlash.toString == withoutSlash.toString\r\nres2: Boolean = true\r\n```"}}
{"actor":{"display_login":"ceedubs"}}