comparison Doc/library/cgihttpserver.rst @ 46556:8b718fc15f3d

Merged revisions 62490 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62490 | benjamin.peterson | 2008-04-24 20:29:10 -0500 (Thu, 24 Apr 2008) | 2 lines reformat some documentation of classes so methods and attributes are under the class directive ........
author Benjamin Peterson <benjamin@python.org>
date Fri, 25 Apr 2008 01:59:09 +0000
parents 9e1529bf0442
children 662d15af52df
comparison
equal deleted inserted replaced
46554:1cf3b34df6c6 46556:8b718fc15f3d
41 41
42 The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI scripts 42 The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI scripts
43 and serve the output, instead of serving files, if the request leads to 43 and serve the output, instead of serving files, if the request leads to
44 somewhere below the ``cgi_directories`` path. 44 somewhere below the ``cgi_directories`` path.
45 45
46 The :class:`CGIHTTPRequestHandler` defines the following data member: 46 The :class:`CGIHTTPRequestHandler` defines the following data member:
47 47
48 48
49 .. attribute:: CGIHTTPRequestHandler.cgi_directories 49 .. attribute:: cgi_directories
50 50
51 This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to treat 51 This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to
52 as containing CGI scripts. 52 treat as containing CGI scripts.
53 53
54 The :class:`CGIHTTPRequestHandler` defines the following methods: 54 The :class:`CGIHTTPRequestHandler` defines the following methods:
55 55
56 56
57 .. method:: CGIHTTPRequestHandler.do_POST() 57 .. method:: do_POST()
58 58
59 This method serves the ``'POST'`` request type, only allowed for CGI scripts. 59 This method serves the ``'POST'`` request type, only allowed for CGI
60 Error 501, "Can only POST to CGI scripts", is output when trying to POST to a 60 scripts. Error 501, "Can only POST to CGI scripts", is output when trying
61 non-CGI url. 61 to POST to a non-CGI url.
62 62
63 Note that CGI scripts will be run with UID of user nobody, for security reasons. 63 Note that CGI scripts will be run with UID of user nobody, for security reasons.
64 Problems with the CGI script will be translated to error 403. 64 Problems with the CGI script will be translated to error 403.
65 65
66 For example usage, see the implementation of the :func:`test` function. 66 For example usage, see the implementation of the :func:`test` function.