Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.3.X] Fixes #16532 -- Clearer explanation of how the test client ex…

…pects HTTP headers to be passed. Thanks for the patch, Ricardo Bánffy.

Backport of r16554 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 41e086cfb5c25901b39e7d0e387ca0a5425868f9 1 parent 2a18745
@SmileyChris SmileyChris authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/topics/testing.txt
View
9 docs/topics/testing.txt
@@ -710,6 +710,15 @@ arguments at time of construction:
details view, which is a good way to test code paths that use the
:meth:`django.http.HttpRequest.is_ajax()` method.
+ .. admonition:: CGI specification
+
+ The headers sent via ``**extra`` should follow CGI_ specification.
+ For example, emulating a different "Host" header as sent in the
+ HTTP request from the browser to the server should be passed
+ as ``HTTP_HOST``.
+
+ .. _CGI: http://www.w3.org/CGI/
+
If you already have the GET arguments in URL-encoded form, you can
use that encoding instead of using the data argument. For example,
the previous GET request could also be posed as::
Please sign in to comment.
Something went wrong with that request. Please try again.