can not upload object name that starts with slash

Bug #1682258 reported by clayg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
New
Undecided
Unassigned

Bug Description

I can't seem to get swiftclient to upload an object-name that starts with slash from the command line.

ubuntu@saio:~$ swift upload test blah --object-name "/blah"
blah
ubuntu@saio:~$ swift list test
blah
ubuntu@saio:~$ swift upload test blah --object-name "//blah"
blah
ubuntu@saio:~$ swift list test
blah
ubuntu@saio:~$ swift stat -v test
                   URL: http://saio:8080/v1/AUTH_test/test
            Auth Token: AUTH_tkbbacdcc6abb04947ac498a80ca4394ab
               Account: AUTH_test
             Container: test
               Objects: 1
                 Bytes: 8
              Read ACL:
             Write ACL:
               Sync To:
              Sync Key:
         Accept-Ranges: bytes
      X-Storage-Policy: default
         Last-Modified: Wed, 12 Apr 2017 21:51:52 GMT
           X-Timestamp: 1492033905.09800
            X-Trans-Id: tx3cd6541ea11448b59422c-0058eea181
          Content-Type: text/plain; charset=utf-8
X-Openstack-Request-Id: tx3cd6541ea11448b59422c-0058eea181

... but it's a totally reasonable object name

ubuntu@saio:~$ curl -H 'x-auth-token: AUTH_tkbbacdcc6abb04947ac498a80ca4394ab' http://saio:8080/v1/AUTH_test/test//blah -d awesome -XPUT
ubuntu@saio:~$ swift list test
/blah
blah

an --object-name that contains a slash, or ends with slash is fine.

I can't think of a reasonable way to get the cli to craft an object name that starts with a slash from a path on disk - so it may only be an issue with the --object-name option.

I haven't tried to demonstrate the issue with the service, but I wouldn't imagine it'd be a problem with the Connection class.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.