Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #6119 -- Documented HttpRequest.get_host(). Thanks, PJCrosier.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 133aa5eb4bae0c274a3f695dec3afc7b16a1fd83 1 parent ec72071
@malcolmt malcolmt authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 docs/request_response.txt
12 docs/request_response.txt
@@ -156,6 +156,18 @@ Methods
Returns ``True`` or ``False``, designating whether ``request.GET`` or
``request.POST`` has the given key.
+ **New in Django development version**
+ Returns the originating host of the request using information from the
+ ``HTTP_X_FORWARDED_HOST`` and ``HTTP_HOST`` headers (in that order). If
+ they don't provide a value, the method uses a combination of
+ ``SERVER_NAME`` and ``SERVER_PORT`` as detailed in `PEP 333`_.
+ .. _PEP 333:
+ Example: ``""``
Returns the ``path``, plus an appended query string, if applicable.

0 comments on commit 133aa5e

Please sign in to comment.
Something went wrong with that request. Please try again.