swift tool upload does't strip initial "/" of an object when object
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Marcelo Martins |
Bug Description
Example:
swift -A https:/
/etc/vim/vimrc.tiny
So a ReST request on the object above would require double "/" as shown below:
curl -ik -H "$XT" -X GET $XU/backup3/
curl -Ik -H "$XT" -X HEAD $XU/backup3/
HTTP/1.1 200 OK
Last-Modified: Thu, 28 Jul 2011 21:02:56 GMT
Etag: 3b4112567ad92c7
X-Object-
Accept-Ranges: bytes
Content-Length: 662
Content-Type: application/
X-Trans-Id: tx127ae006b1e04
Date: Thu, 28 Jul 2011 21:39:34 GMT
curl -Ik -H "$XT" -X HEAD $XU/backup3/
HTTP/1.1 404 Not Found
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx9d1b4bbde4bc4
Date: Thu, 28 Jul 2011 21:39:38 GMT
Related branches
- John Dickinson: Approve
- gholt (community): Approve
- Jay Payne: Pending requested
-
Diff: 12 lines (+2/-0)1 file modifiedbin/swift (+2/-0)
Changed in swift: | |
assignee: | nobody → Marcelo Martins (btorch) |
status: | New → Fix Committed |
Changed in swift: | |
milestone: | none → 1.4.3 |
status: | Fix Committed → Fix Released |
=== modified file 'bin/swift' './') or obj.startswith( '.\\'):
obj = obj[2:] '/'):
put_ headers = {'x-object- meta-mtime' : str(getmtime( path))}
--- bin/swift 2011-07-07 14:24:37 +0000
+++ bin/swift 2011-07-28 22:29:36 +0000
@@ -1607,6 +1607,8 @@
obj = path
if obj.startswith(
+ if obj.startswith(
+ obj = obj[1:]
if dir_marker:
if options.changed: