{"action":"created","issue":{"url":"https://api.github.com/repos/liqd/adhocracy3.mercator/issues/1798","labels_url":"https://api.github.com/repos/liqd/adhocracy3.mercator/issues/1798/labels{/name}","comments_url":"https://api.github.com/repos/liqd/adhocracy3.mercator/issues/1798/comments","events_url":"https://api.github.com/repos/liqd/adhocracy3.mercator/issues/1798/events","html_url":"https://github.com/liqd/adhocracy3.mercator/pull/1798","id":114069841,"number":1798,"title":"Parse URLs instead of doing string slicing that breaks in the presence of small variations in the URL","user":{"login":"fhartwig","id":83271,"avatar_url":"https://avatars.githubusercontent.com/u/83271?v=3","gravatar_id":"","url":"https://api.github.com/users/fhartwig","html_url":"https://github.com/fhartwig","followers_url":"https://api.github.com/users/fhartwig/followers","following_url":"https://api.github.com/users/fhartwig/following{/other_user}","gists_url":"https://api.github.com/users/fhartwig/gists{/gist_id}","starred_url":"https://api.github.com/users/fhartwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhartwig/subscriptions","organizations_url":"https://api.github.com/users/fhartwig/orgs","repos_url":"https://api.github.com/users/fhartwig/repos","events_url":"https://api.github.com/users/fhartwig/events{/privacy}","received_events_url":"https://api.github.com/users/fhartwig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/liqd/adhocracy3.mercator/labels/backend","name":"backend","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-29T15:06:06Z","updated_at":"2015-11-10T16:45:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/liqd/adhocracy3.mercator/pulls/1798","html_url":"https://github.com/liqd/adhocracy3.mercator/pull/1798","diff_url":"https://github.com/liqd/adhocracy3.mercator/pull/1798.diff","patch_url":"https://github.com/liqd/adhocracy3.mercator/pull/1798.patch"},"body":"Fixes #1797 \r\nWith this patch, A3 seems to work when using virtual hosting. I hope I didn't miss any problems with this. Tests still pass. I might add a regression test once I figure out how."},"comment":{"url":"https://api.github.com/repos/liqd/adhocracy3.mercator/issues/comments/155482535","html_url":"https://github.com/liqd/adhocracy3.mercator/pull/1798#issuecomment-155482535","issue_url":"https://api.github.com/repos/liqd/adhocracy3.mercator/issues/1798","id":155482535,"user":{"login":"fhartwig","id":83271,"avatar_url":"https://avatars.githubusercontent.com/u/83271?v=3","gravatar_id":"","url":"https://api.github.com/users/fhartwig","html_url":"https://github.com/fhartwig","followers_url":"https://api.github.com/users/fhartwig/followers","following_url":"https://api.github.com/users/fhartwig/following{/other_user}","gists_url":"https://api.github.com/users/fhartwig/gists{/gist_id}","starred_url":"https://api.github.com/users/fhartwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhartwig/subscriptions","organizations_url":"https://api.github.com/users/fhartwig/orgs","repos_url":"https://api.github.com/users/fhartwig/repos","events_url":"https://api.github.com/users/fhartwig/events{/privacy}","received_events_url":"https://api.github.com/users/fhartwig/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T16:45:56Z","updated_at":"2015-11-10T16:45:56Z","body":"Sorry, the \"virtual hosting\" stuff was me being confused. The problem that this solves is that Thentos and A3 can have slightly different (but equivalent) ideas what the backend's URL is. E.g. Thentos thinks the backend lives at `https://example.com:443` and A3 thinks the backend is at `https://example.com`. If this happens, the code that extracts the path from an URL mangles the path because its its assumptions about the length of the first part of the domain are invalid."}}