{"action":"created","issue":{"url":"https://api.github.com/repos/golang/groupcache/issues/18","labels_url":"https://api.github.com/repos/golang/groupcache/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/golang/groupcache/issues/18/comments","events_url":"https://api.github.com/repos/golang/groupcache/issues/18/events","html_url":"https://github.com/golang/groupcache/issues/18","id":22593134,"number":18,"title":"A bug in getting from peers","user":{"login":"lazywei","id":2840571,"avatar_url":"https://avatars.githubusercontent.com/u/2840571?v=3","gravatar_id":"","url":"https://api.github.com/users/lazywei","html_url":"https://github.com/lazywei","followers_url":"https://api.github.com/users/lazywei/followers","following_url":"https://api.github.com/users/lazywei/following{/other_user}","gists_url":"https://api.github.com/users/lazywei/gists{/gist_id}","starred_url":"https://api.github.com/users/lazywei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazywei/subscriptions","organizations_url":"https://api.github.com/users/lazywei/orgs","repos_url":"https://api.github.com/users/lazywei/repos","events_url":"https://api.github.com/users/lazywei/events{/privacy}","received_events_url":"https://api.github.com/users/lazywei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2013-11-13T14:09:36Z","updated_at":"2015-07-10T10:31:03Z","closed_at":null,"body":"Reproduce steps\r\n```go\r\npool := groupcache.NewHTTPPool(\"http://127.0.0.1:\"+os.Getenv(\"PORT\"))\r\ncache := groupcache.NewGroup(\"cacher\", 64<<20, someGetterFunc)\r\npool.Set(\"http://127.0.0.1:50000\", \"http://127.0.0.1:50001\")\r\n```\r\nand run it in two port `:50000` and `:50001`\r\nNow, if use `/xxx` as a key, then the groupcacher will act like there is no any peer.\r\ni.e. It will only get data from locally, instead of getting from peers.\r\n\r\nThe problem is the **slash** in the head of the key (i.e. if the key is `xxx` then everything goes right), and I still can't figure out why."},"comment":{"url":"https://api.github.com/repos/golang/groupcache/issues/comments/120365378","html_url":"https://github.com/golang/groupcache/issues/18#issuecomment-120365378","issue_url":"https://api.github.com/repos/golang/groupcache/issues/18","id":120365378,"user":{"login":"codeskyblue","id":3281689,"avatar_url":"https://avatars.githubusercontent.com/u/3281689?v=3","gravatar_id":"","url":"https://api.github.com/users/codeskyblue","html_url":"https://github.com/codeskyblue","followers_url":"https://api.github.com/users/codeskyblue/followers","following_url":"https://api.github.com/users/codeskyblue/following{/other_user}","gists_url":"https://api.github.com/users/codeskyblue/gists{/gist_id}","starred_url":"https://api.github.com/users/codeskyblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeskyblue/subscriptions","organizations_url":"https://api.github.com/users/codeskyblue/orgs","repos_url":"https://api.github.com/users/codeskyblue/repos","events_url":"https://api.github.com/users/codeskyblue/events{/privacy}","received_events_url":"https://api.github.com/users/codeskyblue/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T10:31:03Z","updated_at":"2015-07-10T10:31:03Z","body":"This is 2015 and this bug is 2013, very funny. I began to use this in my `minicdn` project recently and meet this problem, too. I almost reviewed the whole code. The fix is very simple and I already send a pull request, waiting for merge."}}