diff options
| author | Chris Beaven <smileychris@gmail.com> | 2011-07-28 22:09:26 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2011-07-28 22:09:26 +0000 |
| commit | 4f50d248a888f04f3ba93b04aaf40aa65a7d5fee (patch) | |
| tree | 34a0a2873742e87fe9a2ef8621d337d44514ce41 /docs | |
| parent | d99b86d6c1287029f45bc043c2e004e5dc1bb9af (diff) | |
Fixes #16532 -- Clearer explanation of how the test client expects HTTP headers to be passed. Thanks for the patch, Ricardo Bánffy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 6595c51957..2362193960 100644 --- a/docs/topics/testing.txt +++ b/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:: |
