[Flask] URL rewriting (url_for) issues with Flask 0.11.1 and fastcgi

Erik Lindqvist eriksmejl at gmail.com
Tue Oct 18 15:52:55 EDT 2016


Thanks for the suggestions Pete!

However, just wanted to clarify that with "environment" I meant the WSGI
environment. See
https://github.com/pallets/flask/blob/master/flask/app.py#L1963
I am not sure how it is passed to Flask but my guess is that mod_fastcgi is
passing it to Flask via Flup. Hence, the issue with SCRIPT_NAME being != ""
might be due to mod_fastcgi (lighttpd).
Anyone with lighttpd/fastcgi knowledge who can chime in?

//Erik

On Tue, Oct 18, 2016 at 7:47 PM Pete Forman <petef4+usenet at gmail.com> wrote:

> Pete Forman <petef4+usenet at gmail.com>
> writes:
> > This Python code may help your diagnosis. I have used it to print
> > command lines and environment up the calling tree on Linux.
>
> I dusted that code down a bit too quickly. Line 14 should have been
> print() rather than a bare print statement for Python 3 compatibility.
>
> --
> Pete Forman
> https://payg-petef.rhcloud.com
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20161018/80076cb8/attachment.html>


More information about the Flask mailing list