2015-05-28 08:09:40 |
Björn Schuberg |
description |
When attempting to download a part[1] of an image, glance always returns the entire image. Neither the 'Range' nor the 'Content-Range' headers are not accounted for.
Both requests below aims to get the first 50 bytes of an image, but instead the complete image is returned with a 200 OK status.
curl ${glance_host}/v2/images/:image_id/file -H 'Range: bytes=0-49'
curl ${glance_host}/v2/images/:image_id/file -H 'Content-Range: bytes 0-49/*'
This will become more of an issue once #1399851 is solved.
Produced on a devstack install, at commit bcc772 of glance.
[1]: https://tools.ietf.org/html/rfc7233#section-4 |
When attempting to download a part[1] of an image, the glance cache always returns the entire image. Neither the 'Range' nor the 'Content-Range' headers are not accounted for.
Both requests below aims to get the first 50 bytes of an image, but instead the complete image is returned with a 200 OK status.
curl ${glance_host}/v2/images/:image_id/file -H 'Range: bytes=0-49'
curl ${glance_host}/v2/images/:image_id/file -H 'Content-Range: bytes 0-49/*'
This will become more of an issue once #1399851 is solved.
Produced on a devstack install, at commit bcc772 of glance.
[1]: https://tools.ietf.org/html/rfc7233#section-4 |
|