{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1365","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1365/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1365/comments","events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1365/events","html_url":"https://github.com/ipfs/go-ipfs/issues/1365","id":87775811,"number":1365,"title":".. links in http proxy borked unless url ends with a slash","user":{"login":"JasonWoof","id":31515,"avatar_url":"https://avatars.githubusercontent.com/u/31515?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonWoof","html_url":"https://github.com/JasonWoof","followers_url":"https://api.github.com/users/JasonWoof/followers","following_url":"https://api.github.com/users/JasonWoof/following{/other_user}","gists_url":"https://api.github.com/users/JasonWoof/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonWoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonWoof/subscriptions","organizations_url":"https://api.github.com/users/JasonWoof/orgs","repos_url":"https://api.github.com/users/JasonWoof/repos","events_url":"https://api.github.com/users/JasonWoof/events{/privacy}","received_events_url":"https://api.github.com/users/JasonWoof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-12T16:12:33Z","updated_at":"2015-06-13T02:31:23Z","closed_at":null,"body":"To reproduce:\r\n\r\nhttp://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye\r\n\r\nclick b\r\n\r\nclick c\r\n\r\nNow you should be at http://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye/b/c\r\n\r\nclick \"..\"\r\n\r\nThis takes you to\r\n\r\nhttp://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye/\r\n\r\nbut should take you to http://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye/b or maybe http://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye/b/\r\n\r\n\r\nExplanation: the \"..\" link goes to \"./..\". The browsers interpret this differently depending on whether the URL ends with a slash or not. When navigating deeper into the file tree (eg from b -> c) the links do not end with /, and after doing that, the \"./..\" doesn't go to the right place.\r\n\r\nTo be clear, the \"..\" link works fine for this url:\r\n\r\nhttp://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye/b/c/\r\n\r\nBut not this one:\r\n\r\nhttp://gateway.ipfs.io/ipfs/QmWELkZ7N7CUByagkkGVKD7euc9w2f8F9fAX4E6cMi6wye/b/c\r\n\r\n(the only difference being whether there's a \"/\" at the end or not).\r\n\r\nThis is particularly problematic, because the http proxy is generating urls like the latter."},"comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments/111657816","html_url":"https://github.com/ipfs/go-ipfs/issues/1365#issuecomment-111657816","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/1365","id":111657816,"user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T02:31:23Z","updated_at":"2015-06-13T02:31:23Z","body":"Ah, right that makes sense nvm. \r\n\r\nMy one worry is that it becomes root-specific -- i.e. the index changes based on the path you accessed it on. What other solutions can we try here?"}}