COPY with ranges
Bug #1521359 reported by
John Dickinson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
send 1 or more ranges with a copy request that copies just those ranges of the source to the destination
To post a comment you must log in.
This already works for one range, right?
$ curl -sv -H x-auth- token:$ OS_AUTH_ TOKEN $OS_STORAGE_ URL/c/1range -X PUT -H x-copy- from:c/ tox.ini -H range:bytes=0-10 -H content-length:0 test/c/ 1range HTTP/1.1 token:AUTH_ tk21005e3514774 1cca1ac947e2717 2b69 from:c/ tox.ini Meta-Mtime: 1446154503.000000 From-Last- Modified: Tue, 22 Dec 2015 21:51:12 GMT c7a93aa48577ca1 46 From-Account: AUTH_test 25381ddd- 005679c677
* Trying 192.168.8.80...
* Connected to saio (192.168.8.80) port 8080 (#0)
> PUT /v1/AUTH_
> Host: saio:8080
> User-Agent: curl/7.43.0
> Accept: */*
> x-auth-
> x-copy-
> range:bytes=0-10
> content-length:0
>
< HTTP/1.1 201 Created
< Content-Length: 0
< X-Object-
< X-Copied-
< X-Copied-From: c/tox.ini
< Last-Modified: Tue, 22 Dec 2015 21:54:00 GMT
< Etag: f935b2c50837722
< X-Copied-
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx16fd8a9ed5c44
< Date: Tue, 22 Dec 2015 21:53:59 GMT
<
* Connection #0 to host saio left intact
$ curl -sv -H x-auth- token:$ OS_AUTH_ TOKEN $OS_STORAGE_ URL/c/1range test/c/ 1range HTTP/1.1 token:AUTH_ tk21005e3514774 1cca1ac947e2717 2b69 Meta-Mtime: 1446154503.000000 c7a93aa48577ca1 46 octet-stream 800bb861- 005679c683
* Trying 192.168.8.80...
* Connected to saio (192.168.8.80) port 8080 (#0)
> GET /v1/AUTH_
> Host: saio:8080
> User-Agent: curl/7.43.0
> Accept: */*
> x-auth-
>
< HTTP/1.1 200 OK
< Content-Length: 11
< X-Object-
< Last-Modified: Tue, 22 Dec 2015 21:54:00 GMT
< Connection: close
< Etag: f935b2c50837722
< X-Timestamp: 1450821239.57875
< Date: Tue, 22 Dec 2015 21:54:11 GMT
< Content-Type: application/
< X-Trans-Id: txaecde39127ee4
<
[tox]
* Closing connection 0
minve
It kind of works for multiple ranges, too, but not in the way that a user might expect: the raw multipart MIME document gets written as the new object, with subsequent GETs responding 200 (rather than 206).
$ curl -sv -H x-auth- token:$ OS_AUTH_ TOKEN $OS_STORAGE_ URL/c/2ranges -X PUT -H x-copy- from:c/ tox.ini -H range:bytes= 0-10,5- 10 -H content-length:0 test/c/ 2ranges HTTP/1.1 token:AUTH_ tk21005e3514774 1cca1ac947e2717 2b69 from:c/ tox.ini 0-10,5- 10 Meta-Mtime: 1446154503.000000 From-Last- Modified: Tue, 22 Dec 2015 21:51:12 GMT 9bf121e524106a6 fb From-Account: AUTH_test 900b6d26- 005679c6a0
* Trying 192.168.8.80...
* Connected to saio (192.168.8.80) port 8080 (#0)
> PUT /v1/AUTH_
> Host: saio:8080
> User-Agent: curl/7.43.0
> Accept: */*
> x-auth-
> x-copy-
> range:bytes=
> content-length:0
>
< HTTP/1.1 201 Created
< Content-Length: 0
< X-Object-
< X-Copied-
< X-Copied-From: c/tox.ini
< Last-Modified: Tue, 22 Dec 2015 21:54:41 GMT
< Etag: 5d0c4072b5cfd90
< X-Copied-
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx12f9178a03134
< Date: Tue, 22 Dec 2015 21:54:40 GMT
<
* Connection #0 to host saio left intact
$ curl -sv -H x-auth- token:$ OS_AUTH_ TOKEN $OS_STORAGE_ URL/c/2ranges
* Trying 192.168.8.80...
* Connected to saio (192.168.8.80) port 8080 (#0)
> GET ...