]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF patch #1055159 via Titus Brown: Document redirect limitation.
authorJeremy Hylton <jeremy@alum.mit.edu>
Wed, 22 Dec 2004 14:19:09 +0000 (14:19 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Wed, 22 Dec 2004 14:19:09 +0000 (14:19 +0000)
Bug fix candidate.

Doc/lib/libcgihttp.tex
Lib/CGIHTTPServer.py

index 3381c64e4a0d82e801db17577e3565aad1819fb2..df0728e3f182a5172de338eee713d965cfa8a1f8 100644 (file)
@@ -18,6 +18,11 @@ run CGI scripts.
 on Mac OS it will only be able to run Python scripts within the same
 process as itself.}
 
+\note{CGI scripts run by the \class{CGIHTTPRequestHandler} class cannot execute
+redirects (HTTP code 302), because code 200 (script output follows)
+is sent prior to execution of the CGI script.  This pre-empts the status
+code.}
+
 The \module{CGIHTTPServer} module defines the following class:
 
 \begin{classdesc}{CGIHTTPRequestHandler}{request, client_address, server}
index 47a0e2c37a6eb38cc806a0aa65f65028e303bc96..7a5c8190d82c689d8dd52293ad345be07de402ad 100644 (file)
@@ -14,6 +14,8 @@ requests are executed sychronously.
 SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL
 -- it may execute arbitrary Python code or external programs.
 
+Note that status code 200 is sent prior to execution of a CGI script, so
+scripts cannot send other status codes such as 302 (redirect).
 """