You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expecting a redirect that browsers interpret as http://localhost:5000/parent/child/
Possible solution:
The code strips the front '/' which leads to this situation. i.e. the returned location header is relative: 'parent/child/'
Use environ["PATH_INFO"].rstrip("/") + "/" instead
The text was updated successfully, but these errors were encountered:
file
test.py
run
FLASK_APP=test.py flask run
A request for http://localhost:5000/parent/child gives a redirect that browsers interpret as
http://localhost:5000/parent/parent/child/
Expecting a redirect that browsers interpret as
http://localhost:5000/parent/child/
Possible solution:
The code strips the front '/' which leads to this situation. i.e. the returned location header is relative: 'parent/child/'
Use
environ["PATH_INFO"].rstrip("/") + "/"
insteadThe text was updated successfully, but these errors were encountered: