Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #9712 -- Documented how HTTP headers are converted to request.M…

…ETA keys.

Based on a patch from masklinn.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 04ff1aff12b2603c055d50daa4649754eb995e0a 1 parent 84cc008
@malcolmt malcolmt authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 docs/ref/request-response.txt
7 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
.. attribute:: HttpRequest.user
A ``django.contrib.auth.models.User`` object representing the currently

0 comments on commit 04ff1af

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