diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-12-07 03:41:54 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-12-07 03:41:54 +0000 |
| commit | 04ff1aff12b2603c055d50daa4649754eb995e0a (patch) | |
| tree | af3c1e733ec4576564453977ff3f0b1fbd6ab5a1 /docs/ref/request-response.txt | |
| parent | 84cc0084733b08e5df0b65069c3fc07184c5f7e9 (diff) | |
Fixed #9712 -- Documented how HTTP headers are converted to request.META keys.
Based on a patch from masklinn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/request-response.txt')
| -rw-r--r-- | docs/ref/request-response.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 18b8f665a5..fcf4523218 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -142,6 +142,13 @@ All attributes except ``session`` should be considered read-only. * ``SERVER_NAME`` -- The hostname of the server. * ``SERVER_PORT`` -- The port of the server. + With the exception of ``CONTENT_LENGTH`` and ``CONTENT_TYPE``, as given + above, any HTTP headers in the request are converted to ``META`` keys by + converting all characters to uppercase, replacing any hyphens with + underscores and adding an ``HTTP_`` prefix to the name. So, for example, a + header called ``X-Bender`` would be mapped to the ``META`` key + ``HTTP_X_BENDER``. + .. attribute:: HttpRequest.user A ``django.contrib.auth.models.User`` object representing the currently |
