From e70d7e60640e280f8d410d41c1f9cb6195483c4e Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 14 Sep 2007 05:28:00 +0000 Subject: Fixed #987 -- Convert relative URI portions into absolute URIs in HTTP Location headers. Based on a patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6164 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/request_response.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/request_response.txt b/docs/request_response.txt index cf68505066..5c1abfa2ad 100644 --- a/docs/request_response.txt +++ b/docs/request_response.txt @@ -161,6 +161,16 @@ Methods Example: ``"/music/bands/the_beatles/?print=true"`` +``build_absolute_uri(location)`` + Returns the absolute URI form of ``location``. If no location is provided, + the location will be set to ``request.get_full_path()``. + + If the location is already an absolute URI, it will not be altered. + Otherwise the absolute URI is built using the server variables available in + this request. + + Example: ``"http://example.com/music/bands/the_beatles/?print=true"`` + ``is_secure()`` Returns ``True`` if the request is secure; that is, if it was made with HTTPS. -- cgit v1.3