Glance server ignores Accept-Encoding

Bug #1150380 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Wishlist
Flavio Percoco

Bug Description

Glance server doesn't compress responses even thought the request correctly sends Accept-Encoding.

$ glance --debug image-list
curl -i -X GET -H 'X-Auth-Token: aca2aa0abfb347fe8b807034baa32ddb' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' http://192.168.25.25:9292http://192.168.25.25:9292//v1/images/detail?sort_key=name&sort_dir=asc&limit=20

HTTP/1.1 200 OK
date: Wed, 06 Mar 2013 20:47:44 GMT
content-length: 2267
content-type: application/json; charset=UTF-8
x-openstack-request-id: req-2091d29f-8afd-4bd7-86a4-e12829fdd6c0

Changed in glance:
assignee: nobody → Flavio Percoco Premoli (flaper87)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23739

Changed in glance:
status: New → In Progress
Brian Waldon (bcwaldon)
Changed in glance:
importance: Undecided → Wishlist
Changed in glance:
milestone: none → havana-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/27622

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

Reviewed: https://review.openstack.org/27622
Committed: http://github.com/openstack/glance/commit/0a4f4aff6c0ef7b74492dab6a88a2f4e40a3a422
Submitter: Jenkins
Branch: master

commit 0a4f4aff6c0ef7b74492dab6a88a2f4e40a3a422
Author: Flaper Fesp <email address hidden>
Date: Sat Apr 27 14:42:15 2013 +0200

    Compress response's content according to client's accepted encoding

    Currently Glance ignores the Accept-Encoding header and returns
    responses as they are regardless the client accepts gzip or other type
    of compression.

    This patch adds this capability to glance (by using a middleware)
    supporting just gzip for now.

    Important note:
        - The patch uses a lazy compression for Content-Type
        application/octet-stream but in order to do that, the
        content-length has to be unset which means that when an image is
        downloaded the content-length will be unknown to the client.

    Fixes bug: 1150380

    Change-Id: Ieb65837d4e3fe310f97d9666882ecc572b14956a

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.