The easiest method to generate this is probably:
URL(args=request.args, vars=request.get_vars, host=True)
You could also assemble the URL this way:
'%s://%s%s' % (request.env.wsgi_url_scheme, request.env.http_host,
request.env.web2py_original_uri)