Join GitHub today
Don't accidently create relative links #1538
@davidism at least in my case this doesn't work.
see here the environ:
So far I see SCRIPT_NAME is not anywhere used within the redirect function, that's why I'm wondering who is responsible to create absolute links?
My setup is nginx <-> uwsgi <-> flask/werkzeug
okay than it is wekrzeug, who creates the absolute url wrongly ;D
See line 607:
IMO current_url is wrong to use there, instead SCRIPT_NAME needs to been taking into account.
@davidism: can you point me to some documentation for this?
I still think absolute links needs to handled different than relative ones. As in the case I need this fix 'SCRIPT_NAME' is '/' and 'PATH_INFO' is '/help/foo'. And I need to create a link to '/nonhelp'. With the current implementation I never can create links to '/nonhelp', as I always end up in '/help/nonhelp'. But '/nonhelp is still in namespace of SCRIPT_NAME and that means it is a valid PATH_INFO to request for.