diff options
-rw-r--r-- | ipsilon/util/page.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ipsilon/util/page.py b/ipsilon/util/page.py index 50585ca..7e88534 100644 --- a/ipsilon/util/page.py +++ b/ipsilon/util/page.py @@ -143,9 +143,11 @@ class Page(Endpoint): url = None if 'referer' in cherrypy.request.headers: url = cherrypy.request.headers['referer'] - elif 'REQUEST_URI' in cherrypy.request.wsgi_environ: + r = urlparse(unquote(url)) + if r.query: + tid = t.find_tid(parse_qs(r.query)) + if not tid and 'REQUEST_URI' in cherrypy.request.wsgi_environ: url = cherrypy.request.wsgi_environ['REQUEST_URI'] - if url: r = urlparse(unquote(url)) if r.query: tid = t.find_tid(parse_qs(r.query)) |