diff --git a/pywb/apps/frontendapp.py b/pywb/apps/frontendapp.py index a10c7a42..f3367e05 100644 --- a/pywb/apps/frontendapp.py +++ b/pywb/apps/frontendapp.py @@ -1,7 +1,7 @@ from gevent.monkey import patch_all; patch_all() from werkzeug.routing import Map, Rule, RequestRedirect, Submount -from werkzeug.wsgi import pop_path_info +from wsgiref.util import shift_path_info from six.moves.urllib.parse import urljoin, parse_qsl from six import iteritems from warcio.utils import to_native_str @@ -558,9 +558,9 @@ def setup_paths(self, environ, coll, record=False): return if coll != '$root': - pop_path_info(environ) + shift_path_info(environ) if record: - pop_path_info(environ) + shift_path_info(environ) paths = [self.warcserver.root_dir] @@ -669,7 +669,7 @@ def handle_request(self, environ, start_response): lang = args.pop('lang', self.default_locale) if lang: - pop_path_info(environ) + shift_path_info(environ) environ['pywb_lang'] = lang response = endpoint(environ, **args)