423f340174
Currently glance v2 API incorrectly accepts ‘Content-Range’ header for random image access and does not set response headers. As per rfc7233, ‘Range’ requests should be accepted and ‘Content-Range’ must be returned in the response headers. This patch enables Glance v2 API to accept the more appropriate ‘Range’ requests and sets ‘Content-Range’ response header. For backward compatibility with pre-Pike Glance clients, the incorrect 'Content-Range' header will be accepted silently in perpetuity. Thus this patch contains tests for 'Content-Range' in requests to prevent regressions. DocImpact Implements lite-spec I5bdadde682a0c50836bd95e2a6651d6e7e18f172 Closes-Bug: #1677391 Co-Authored-By: Hemanth Makkapati <hemanth.makkapati@rackspace.com> Change-Id: Ib7ebc792c32995751744be3f36cbc9a0c1eead2a
14 lines
582 B
YAML
14 lines
582 B
YAML
---
|
|
fixes:
|
|
- |
|
|
Glance had been accepting the Content-Range header for GET v2/images/{image_id}/file requests,
|
|
contrary to RFC 7233.
|
|
Following RFC 7233, Glance will now:
|
|
|
|
* Accept the Range header in requests to serve partial images.
|
|
* Include a ``Content-Range`` header upon successful delivery of the requested partial content.
|
|
|
|
Please note that not all Glance storage backends support partial downloads. A Range request to a
|
|
Glance server with such a backend will result in the entire image content being delivered
|
|
despite the 206 response code.
|