Hi everyone!

I want to catch all the URLs in my Flask app, with this piece of code

@app.route('/<path:path>')def catch_all(path):
    return path

Just a basic app with shows the relative path of each page. So this works 
fine for most of the paths (localhost/whatever/I/want for example prints 
whatever/I/want).

EXCEPT in one case. For example if I type 
localhost/foo/http://google.com/bar in the URL bar, what I expected to be 
shown is foo/http://google.com/bar, but what I actually get is only bar. So 
actually Flask finds the last valid URL and takes the path following this 
URL.

Is there anyway to catch the real path of our URL?
I posted the same issue on stack 
overflow: 
http://stackoverflow.com/questions/23164678/catch-all-url-with-flask-when-the-path-also-contains-a-url
but I think it might be more relevant here.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to