From 41e086cfb5c25901b39e7d0e387ca0a5425868f9 Mon Sep 17 00:00:00 2001 From: Chris Beaven Date: Thu, 28 Jul 2011 22:10:27 +0000 Subject: [PATCH] =?UTF-8?q?[1.3.X]=20Fixes=20#16532=20--=20Clearer=20expla?= =?UTF-8?q?nation=20of=20how=20the=20test=20client=20expects=20HTTP=20head?= =?UTF-8?q?ers=20to=20be=20passed.=20Thanks=20for=20the=20patch,=20Ricardo?= =?UTF-8?q?=20B=C3=A1nffy.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docs/topics/testing.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 165395525a..325e73bb35 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::