wsgi.Middleware forward-compatibility with webob 1.2b1 or later

Response.request is None by default
(http://docs.webob.org/en/latest/news.html#b1), but is used in the
CacheFilter WSGI middleware.

Fixes bug 1045179

Change-Id: I28f5ca92fe517f4f56af934799db32650e079ba7
This commit is contained in:
Sascha Peilicke 2012-12-10 19:20:26 +01:00
parent 3968b7cc8b
commit 7324ffd4c5

View File

@ -329,6 +329,7 @@ class Middleware(object):
if response:
return response
response = req.get_response(self.application)
response.request = req
return self.process_response(response)