Proper fallback from referer to REQUEST_URI
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.
Signed-off-by: Simo Sorce <firstname.lastname@example.org>
Reviewed-by: Nathan Kinder <email@example.com>