{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/californium/issues/5","repository_url":"https://api.github.com/repos/eclipse/californium","labels_url":"https://api.github.com/repos/eclipse/californium/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/californium/issues/5/comments","events_url":"https://api.github.com/repos/eclipse/californium/issues/5/events","html_url":"https://github.com/eclipse/californium/issues/5","id":130812959,"number":5,"title":"issue with url-encoded path segments on server-side","user":{"login":"h0ru5","id":587286,"avatar_url":"https://avatars.githubusercontent.com/u/587286?v=3","gravatar_id":"","url":"https://api.github.com/users/h0ru5","html_url":"https://github.com/h0ru5","followers_url":"https://api.github.com/users/h0ru5/followers","following_url":"https://api.github.com/users/h0ru5/following{/other_user}","gists_url":"https://api.github.com/users/h0ru5/gists{/gist_id}","starred_url":"https://api.github.com/users/h0ru5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h0ru5/subscriptions","organizations_url":"https://api.github.com/users/h0ru5/orgs","repos_url":"https://api.github.com/users/h0ru5/repos","events_url":"https://api.github.com/users/h0ru5/events{/privacy}","received_events_url":"https://api.github.com/users/h0ru5/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-02T20:52:27Z","updated_at":"2016-02-03T09:26:12Z","closed_at":null,"body":"If you are unlucky enough to find yourself in the situation that you get non-ascii chars or even blanks in the path, its crucial to uri-decode the path segments. Quick fix:\r\n\r\nreplace line:\r\nhttps://github.com/eclipse/californium/blob/master/californium-core/src/main/java/org/eclipse/californium/core/server/ServerMessageDeliverer.java#L142\r\n\r\nby something like:\r\n```java\r\nString name = path.removeFirst();\r\nString sanitizedName = java.net.URLDecoder.decode(name, \"UTF-8\");\r\ncurrent = current.getChild(sanitizedName);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/eclipse/californium/issues/comments/179118380","html_url":"https://github.com/eclipse/californium/issues/5#issuecomment-179118380","issue_url":"https://api.github.com/repos/eclipse/californium/issues/5","id":179118380,"user":{"login":"mkovatsc","id":664090,"avatar_url":"https://avatars.githubusercontent.com/u/664090?v=3","gravatar_id":"","url":"https://api.github.com/users/mkovatsc","html_url":"https://github.com/mkovatsc","followers_url":"https://api.github.com/users/mkovatsc/followers","following_url":"https://api.github.com/users/mkovatsc/following{/other_user}","gists_url":"https://api.github.com/users/mkovatsc/gists{/gist_id}","starred_url":"https://api.github.com/users/mkovatsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkovatsc/subscriptions","organizations_url":"https://api.github.com/users/mkovatsc/orgs","repos_url":"https://api.github.com/users/mkovatsc/repos","events_url":"https://api.github.com/users/mkovatsc/events{/privacy}","received_events_url":"https://api.github.com/users/mkovatsc/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T09:26:12Z","updated_at":"2016-02-03T09:26:12Z","body":"What I mean is that at this point the string should already be exactly what it is supposed to mean. It must be identical to the UTF-8-encoded bytes in the Uri-Option. If the Uri-Option already carried an encoded string, the client has to be fixed. For Cf, we have to make sure, we do not convert any URI option into an encoded string. The later, however, might happen when using the URI class to handle the full URI (e.g., sanity checks, normalizing, etc.).\r\n\r\nI know of a similar problem when creating resources with a whitespace in the name."}}