{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10937","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10937/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10937/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10937/events","html_url":"https://github.com/emberjs/ember.js/issues/10937","id":70232488,"number":10937,"title":"Double slashes in URLs cause issues","user":{"login":"jonathanKingston","id":338988,"avatar_url":"https://avatars.githubusercontent.com/u/338988?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanKingston","html_url":"https://github.com/jonathanKingston","followers_url":"https://api.github.com/users/jonathanKingston/followers","following_url":"https://api.github.com/users/jonathanKingston/following{/other_user}","gists_url":"https://api.github.com/users/jonathanKingston/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanKingston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanKingston/subscriptions","organizations_url":"https://api.github.com/users/jonathanKingston/orgs","repos_url":"https://api.github.com/users/jonathanKingston/repos","events_url":"https://api.github.com/users/jonathanKingston/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanKingston/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-22T20:55:26Z","updated_at":"2015-07-16T21:40:25Z","closed_at":null,"body":"When I visit a URL with double slashes there are two separate but different issues however I am putting them both here mostly as a question.\r\n\r\n## Double slash at URL base\r\n\r\nWhen I go to:\r\nhttp://www.emberaddons.com//?query=asdasd\r\n\r\nI get the following error(Along with no application and a blank page):\r\n```\r\nUncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'http:/?query=asdasd' cannot be created in a document with origin 'http://www.emberaddons.com'.\r\n```\r\n\r\nThis is caused by:\r\n```\r\nhistory.pushState({}, '', '//urlhere')\r\n```\r\n\r\nThis is reproducible on both Firefox and Chrome (No others tested).\r\n\r\n## Double slash in the middle of a URL\r\n\r\nI'm not certain if this has been introduced recently however a valid URL of: `/info/privacy` when browsed as: `/info//privacy` does not match the router route.\r\n\r\n## Caused by\r\n\r\nI have not had time to git bisect which commit caused this issue however it has only happened recently, I suspect knowing how nasty `history.pushState` can be this is the cause: https://github.com/emberjs/ember.js/commit/e23ce41c9480a456fedf513aeaf73aa1beb69878\r\n\r\nProdding @tomdale as this is your commit.\r\n\r\n## Question\r\n\r\nSo this could be solved by always removing double slashes before it is routed, which would solve both issues.\r\n\r\nHowever this could quite easily not be desired as dynamic variables Ember might want to be blank, so a route of: `/info/:page/:thing/page` might want to match if URL is: `/info///page`. (I personally don't like this and could be solved by some form of keyword too, Catalyst permits this however most frameworks don't).\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/122110446","html_url":"https://github.com/emberjs/ember.js/issues/10937#issuecomment-122110446","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10937","id":122110446,"user":{"login":"railsjedi","id":206662,"avatar_url":"https://avatars.githubusercontent.com/u/206662?v=3","gravatar_id":"","url":"https://api.github.com/users/railsjedi","html_url":"https://github.com/railsjedi","followers_url":"https://api.github.com/users/railsjedi/followers","following_url":"https://api.github.com/users/railsjedi/following{/other_user}","gists_url":"https://api.github.com/users/railsjedi/gists{/gist_id}","starred_url":"https://api.github.com/users/railsjedi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/railsjedi/subscriptions","organizations_url":"https://api.github.com/users/railsjedi/orgs","repos_url":"https://api.github.com/users/railsjedi/repos","events_url":"https://api.github.com/users/railsjedi/events{/privacy}","received_events_url":"https://api.github.com/users/railsjedi/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T21:40:25Z","updated_at":"2015-07-16T21:40:25Z","body":"i'm running into this issue as well, ended up patching it server side but would be nice if ember didnt explode :)"}}