Which request-method returns the whole REQUEST_URI?


Hi all

I need to display the whole address that’s in the address bar of the
browser in a view.


I tried with request.request_uri, but sadly this only gives me the path
after the domain and port:


I saw that request.env_table[‘REQUEST_URI’] gives me the wanted result,
but it seems that this is not available in testing environment.

So i hacked this dirty little helper:

def whole_url
protocol + host_with_port + request_uri

But I guess it’s not very error proven, because what happens when the
default port is used and I only need


but whole_url gives me


? So I guess there’s for sure a better way to solve my problem… Any
hints? Thanks. :slight_smile: