If the referer is present but does not contain a transaction ID we still
need to fallback to the REQUEST_URI. Fix the code to check the url and
then fallback to REQUEST_URI rathe than decide upfront merely on the
fact a referer is available.
https://fedorahosted.org/ipsilon/ticket/74
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Nathan Kinder <nkinder@redhat.com>
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))