diff options
author | chenghuiyu <yuchenghui@unionpay.com> | 2017-09-04 11:37:09 +0800 |
---|---|---|
committer | chenghuiyu <yuchenghui@unionpay.com> | 2017-09-04 11:37:09 +0800 |
commit | 8b923aea35022b374473e4484230768a1d30a934 (patch) | |
tree | a898abb6a521fb138d4b4b3fb1baa3187cf3524f /oslo_middleware | |
parent | 8812bc3fc490f0db4977418eaedf58190a0df394 (diff) | |
download | oslo-middleware-8b923aea35022b374473e4484230768a1d30a934.tar.gz |
Remove Class HTTPProxyToWSGIMiddleware
Class HTTPProxyToWSGIMiddleware was no longer necessary in new release,
and it was deprecated for removal.
Change-Id: Id442cc216723dbe875f817c91d90d258f1bb2db6
Closes-Bug: #1714860
Diffstat (limited to 'oslo_middleware')
-rw-r--r-- | oslo_middleware/http_proxy_to_wsgi.py | 6 | ||||
-rw-r--r-- | oslo_middleware/tests/test_http_proxy_to_wsgi.py | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/oslo_middleware/http_proxy_to_wsgi.py b/oslo_middleware/http_proxy_to_wsgi.py index 701e5c8..632f5ca 100644 --- a/oslo_middleware/http_proxy_to_wsgi.py +++ b/oslo_middleware/http_proxy_to_wsgi.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. See the License for the specific language governing permissions and # limitations under the License. -from debtcollector import removals from oslo_config import cfg from oslo_middleware import base @@ -92,8 +91,3 @@ class HTTPProxyToWSGI(base.ConfigurableMiddleware): v = req.environ.get("HTTP_X_FORWARDED_PREFIX") if v: req.environ['SCRIPT_NAME'] = v + req.environ['SCRIPT_NAME'] - - -@removals.remove -class HTTPProxyToWSGIMiddleware(HTTPProxyToWSGI): - """Placeholder for backward compatibility""" diff --git a/oslo_middleware/tests/test_http_proxy_to_wsgi.py b/oslo_middleware/tests/test_http_proxy_to_wsgi.py index 7fe9a2a..d138021 100644 --- a/oslo_middleware/tests/test_http_proxy_to_wsgi.py +++ b/oslo_middleware/tests/test_http_proxy_to_wsgi.py @@ -39,8 +39,7 @@ class TestHTTPProxyToWSGI(test_base.BaseTestCase): def fake_app(req): return util.application_uri(req.environ) - self.middleware = http_proxy_to_wsgi.HTTPProxyToWSGIMiddleware( - fake_app) + self.middleware = http_proxy_to_wsgi.HTTPProxyToWSGI(fake_app) response = self.request.get_response(self.middleware) self.assertEqual(b"http://localhost:80/", response.body) @@ -119,8 +118,7 @@ class TestHTTPProxyToWSGI(test_base.BaseTestCase): def fake_app(req): return req.environ['REMOTE_ADDR'] - self.middleware = http_proxy_to_wsgi.HTTPProxyToWSGIMiddleware( - fake_app) + self.middleware = http_proxy_to_wsgi.HTTPProxyToWSGI(fake_app) forwarded_for_addr = '1.2.3.4' forwarded_addr = '8.8.8.8' |