image cache middleware should only used unconsumed request path

Bug #1026222 reported by Brian Waldon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Brian Waldon

Bug Description

The image cache middleware uses webob.Request.path for its url matching. It should use path_info. An upstream middleware is setting the full path to something like /v1/v1/images/XXX. The regular expression in the image cache does work for this match, but it has to take into account the multiple versions. It shouldn't have to do that.

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/9970

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

Reviewed: https://review.openstack.org/9970
Committed: http://github.com/openstack/glance/commit/dc2f241c115507f8e5c4e7841739f2b8303943e2
Submitter: Jenkins
Branch: master

commit dc2f241c115507f8e5c4e7841739f2b8303943e2
Author: Brian Waldon <email address hidden>
Date: Wed Jul 18 09:22:02 2012 -0700

    Match path_info in image cache middleware

    The url matching code in the image cache middleware should only look at
    the unconsumed path, not the full path. Webob denotes this by using
    'path_info' instead of 'path.'

    This also adds some tests for the version negotiation middleware to ensure
    it is returning a sane path for the image cache middleware to match.

    Fixes bug 1026222

    Change-Id: I522e2210e2b7272f9bb47602510a2910fa193415

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: folsom-3 → 2012.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.