Skip to content

Commit

Permalink
pop_path_info
Browse files Browse the repository at this point in the history
This was removed in werkzeug 2.3 and exists as shift_pop_info in
wsgiref:

pallets/werkzeug#2415
  • Loading branch information
edsu committed Jun 29, 2023
1 parent 3ccc7ea commit e824ffd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pywb/apps/frontendapp.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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]

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e824ffd

Please sign in to comment.