Reviewed: https://review.openstack.org/367528 Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=400230cd9d72f00caf6c1d5824da906ea335a1ad Submitter: Jenkins Branch: master
commit 400230cd9d72f00caf6c1d5824da906ea335a1ad Author: Dharini Chandrasekar <[email protected]> Date: Thu Sep 8 17:03:40 2016 +0000 Handling HTTP range requests in Glance Currently Glance does not send Partial response codes while handling HTTP range requests. Also, content length is not appropriately set. This patch is to send partial response code and to set the correct content length based on the range request for image download. Upon success status code 206 is sent and the content length is set to the requested range. Upon failure, there can be 2 cases: * If the HTTP range request for the image download is bad (For example, requesting download of range of bytes 10 to 50 bytes when there are only 48 bytes), status code is set to 416 and HTTPRequestRangeNotSatisfiable is raised. * If the content range is valid, but the request is not satisfiable due to glance_store side erros or privacy issues, appropriate exceptions are raised. APIImpact DocImpact Closes-Bug: #1417069 Closes-Bug: #1624508 Closes-Bug: #1399851 Closes-Bug: #1618928 Change-Id: I3cd47b998be79604511b3cd4879209820cf776b7 ** Changed in: glance Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1399851 Title: Glance should return 206 when fulfilling a request using the Range header Status in Glance: Fix Released Bug description: When downloading a specific image from glance, a user can specify a Range to download. If the server successfully fulfills that request it should return a 206 (Partial Content) response described in RFC 7233 [1]. Currently, the v2 controller [2] does not properly set the 206 response code for a partial response. [1]: https://tools.ietf.org/html/rfc7233#section-4 [2]: https://github.com/openstack/glance/blob/038cf5403e5b7b3620884db6d7534541b5515eac/glance/api/v2/image_data.py#L196..L228 To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1399851/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

