image cache middleware should only used unconsumed request path

Bug #1026222 reported by Brian Waldon on 2012-07-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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.

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) on 2012-08-15
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers