Format of HTTP headers in request.META not clear
|Reported by:||masklinn||Owned by:||nobody|
|Has patch:||yes||Needs documentation:|
|Needs tests:||Patch needs improvement:|
The documentation for HttpRequest.META clearly indicates that HTTP headers are stored in it, but it doesn't clearly spell the format: Content-Length becomes CONTENT_LENGTH, but Accept-Encoding becomes HTTP_ACCEPT_ENCODING.
It might be useful to specify that (apart from special cases), all HTTP headers get prefixed by HTTP_ and all "-" characters are replaced by "_" characters (e.g. X-Forwarded-For becomes HTTP_X_FORWARDED_FROM).
A basic patch is provided, applies cleanly against branch 1.0.X @rev 9534