Comment 3 for bug 1193310

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/35954
Committed: http://github.com/openstack/glance/commit/5e71b5e11f056fc082e61e0e3a4515fcf1b9948f
Submitter: Jenkins
Branch: master

commit 5e71b5e11f056fc082e61e0e3a4515fcf1b9948f
Author: Fei Long Wang <email address hidden>
Date: Thu Jul 11 21:17:07 2013 +0800

    Fixes image-download error of v2

    When trying to retrieve a Glance image using the v2 api, user will
    get an error:

    'utf8' codec can't decode byte 0xcc in position 1217: invalid continuation byte

    This is because Glance client expects a response of type content-type:
    application/octet-stream but it's getting a Content-Type:

    text/html; charset=UTF-8 Transfer-Encoding: chunked

    The root cause is Glance will return the image data from cache if
    there is. However, in method _process_v2_request, the content type
    has never been configured. See:
    https://github.com/openstack/glance/blob/master/glance/api/middleware/cache.py#L162

    Fixes bug 1193310

    Change-Id: Icab5e28db63455358ab3919bd94c484411987e39