{"action":"created","issue":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/100","labels_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/100/comments","events_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/100/events","html_url":"https://github.com/scality/ScalitySproxydSwift/issues/100","id":67630535,"number":100,"title":"A swift object with a leading '/' character in its name is not properly handled.","user":{"login":"cazino","id":287542,"avatar_url":"https://avatars.githubusercontent.com/u/287542?v=3","gravatar_id":"","url":"https://api.github.com/users/cazino","html_url":"https://github.com/cazino","followers_url":"https://api.github.com/users/cazino/followers","following_url":"https://api.github.com/users/cazino/following{/other_user}","gists_url":"https://api.github.com/users/cazino/gists{/gist_id}","starred_url":"https://api.github.com/users/cazino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazino/subscriptions","organizations_url":"https://api.github.com/users/cazino/orgs","repos_url":"https://api.github.com/users/cazino/repos","events_url":"https://api.github.com/users/cazino/events{/privacy}","received_events_url":"https://api.github.com/users/cazino/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-10T16:23:06Z","updated_at":"2015-04-13T15:05:18Z","closed_at":null,"body":"According to the code of the swift functional test suite, a leading '/' is meaningfull in an object name.\r\n\r\nSee here https://github.com/openstack/swift/blob/master/test/functional/tests.py#L639 and here https://github.com/openstack/swift/blob/master/test/functional/tests.py#L656. These are supposed to be 2 different objects.\r\n\r\nThe driver make no difference between these two objects, a '/x' object and 'x' are the same.\r\n\r\nThis leads to bug like this one : https://37.187.159.67:5443/job/swift-functional-tests/DEVSTACK_BRANCH=stable%2Fjuno,host=ubuntu14-large/103/testReport/junit/test.functional.tests/TestContainerUTF8/testContainerExistenceCachingProblem/ where a 'dir1/' object can't be found (HTTP 404) because a '/dir1/' object was deleted before.\r\n\r\nThe reason is here : https://github.com/scality/ScalitySproxydSwift/blob/master/swift_scality_backend/diskfile.py#L215\r\nWe send HTTP request to sproxyd with double '/' in the url. I suppose that a double '/' is silently transformed into single '/' by most http server; at least I can't find any double '/' in sproxyd logs.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/comments/92392714","html_url":"https://github.com/scality/ScalitySproxydSwift/issues/100#issuecomment-92392714","issue_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/100","id":92392714,"user":{"login":"cazino","id":287542,"avatar_url":"https://avatars.githubusercontent.com/u/287542?v=3","gravatar_id":"","url":"https://api.github.com/users/cazino","html_url":"https://github.com/cazino","followers_url":"https://api.github.com/users/cazino/followers","following_url":"https://api.github.com/users/cazino/following{/other_user}","gists_url":"https://api.github.com/users/cazino/gists{/gist_id}","starred_url":"https://api.github.com/users/cazino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazino/subscriptions","organizations_url":"https://api.github.com/users/cazino/orgs","repos_url":"https://api.github.com/users/cazino/repos","events_url":"https://api.github.com/users/cazino/events{/privacy}","received_events_url":"https://api.github.com/users/cazino/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T15:05:18Z","updated_at":"2015-04-13T15:05:18Z","body":"In my opinion the problem with option 4 is that the object name will be quoted two times, one time by the swift_scality_backend, one time by the  scality_sproxyd_client."}}