1
0
Fork 0
python-docs-fr/library/http.server.po

558 lines
20 KiB
Plaintext
Raw Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
2018-06-28 13:32:56 +00:00
"POT-Creation-Date: 2018-06-28 15:29+0200\n"
2016-10-30 09:46:26 +00:00
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/http.server.rst:2
msgid ":mod:`http.server` --- HTTP servers"
msgstr ""
#: ../Doc/library/http.server.rst:7
msgid "**Source code:** :source:`Lib/http/server.py`"
msgstr ""
#: ../Doc/library/http.server.rst:17
msgid ""
"This module defines classes for implementing HTTP servers (Web servers)."
msgstr ""
#: ../Doc/library/http.server.rst:19
msgid ""
"One class, :class:`HTTPServer`, is a :class:`socketserver.TCPServer` "
"subclass. It creates and listens at the HTTP socket, dispatching the "
"requests to a handler. Code to create and run the server looks like this::"
msgstr ""
#: ../Doc/library/http.server.rst:31
msgid ""
"This class builds on the :class:`~socketserver.TCPServer` class by storing "
"the server address as instance variables named :attr:`server_name` and :attr:"
"`server_port`. The server is accessible by the handler, typically through "
"the handler's :attr:`server` instance variable."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:38
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"This class is identical to HTTPServer but uses threads to handle requests by "
"using the :class:`~socketserver.ThreadingMixIn`. This is useful to handle "
"web browsers pre-opening sockets, on which :class:`HTTPServer` would wait "
"indefinitely."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:46
msgid ""
"The :class:`HTTPServer` and :class:`ThreadingHTTPServer` must be given a "
"*RequestHandlerClass* on instantiation, of which this module provides three "
"different variants:"
msgstr ""
#: ../Doc/library/http.server.rst:52
2016-10-30 09:46:26 +00:00
msgid ""
"This class is used to handle the HTTP requests that arrive at the server. "
"By itself, it cannot respond to any actual HTTP requests; it must be "
"subclassed to handle each request method (e.g. GET or POST). :class:"
"`BaseHTTPRequestHandler` provides a number of class and instance variables, "
"and methods for use by subclasses."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:58
2016-10-30 09:46:26 +00:00
msgid ""
"The handler will parse the request and the headers, then call a method "
"specific to the request type. The method name is constructed from the "
"request. For example, for the request method ``SPAM``, the :meth:`do_SPAM` "
"method will be called with no arguments. All of the relevant information is "
"stored in instance variables of the handler. Subclasses should not need to "
"override or extend the :meth:`__init__` method."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:65
2016-10-30 09:46:26 +00:00
msgid ":class:`BaseHTTPRequestHandler` has the following instance variables:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:69
2016-10-30 09:46:26 +00:00
msgid ""
"Contains a tuple of the form ``(host, port)`` referring to the client's "
"address."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:74
2016-10-30 09:46:26 +00:00
msgid "Contains the server instance."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:78
2016-10-30 09:46:26 +00:00
msgid ""
"Boolean that should be set before :meth:`handle_one_request` returns, "
"indicating if another request may be expected, or if the connection should "
"be shut down."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:84
2016-10-30 09:46:26 +00:00
msgid ""
"Contains the string representation of the HTTP request line. The terminating "
"CRLF is stripped. This attribute should be set by :meth:"
"`handle_one_request`. If no valid request line was processed, it should be "
"set to the empty string."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:91
2016-10-30 09:46:26 +00:00
msgid "Contains the command (request type). For example, ``'GET'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:95
2016-10-30 09:46:26 +00:00
msgid "Contains the request path."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:99
2016-10-30 09:46:26 +00:00
msgid ""
"Contains the version string from the request. For example, ``'HTTP/1.0'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:103
2016-10-30 09:46:26 +00:00
msgid ""
"Holds an instance of the class specified by the :attr:`MessageClass` class "
"variable. This instance parses and manages the headers in the HTTP request. "
"The :func:`~http.client.parse_headers` function from :mod:`http.client` is "
"used to parse the headers and it requires that the HTTP request provide a "
"valid :rfc:`2822` style header."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:111
2016-10-30 09:46:26 +00:00
msgid ""
"An :class:`io.BufferedIOBase` input stream, ready to read from the start of "
"the optional input data."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:116
2016-10-30 09:46:26 +00:00
msgid ""
"Contains the output stream for writing a response back to the client. Proper "
2017-08-01 11:29:09 +00:00
"adherence to the HTTP protocol must be used when writing to this stream in "
"order to achieve successful interoperation with HTTP clients."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:121
2016-10-30 09:46:26 +00:00
msgid "This is an :class:`io.BufferedIOBase` stream."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:124
2016-10-30 09:46:26 +00:00
msgid ":class:`BaseHTTPRequestHandler` has the following attributes:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:128
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies the server software version. You may want to override this. The "
"format is multiple whitespace-separated strings, where each string is of the "
"form name[/version]. For example, ``'BaseHTTP/0.2'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:134
2016-10-30 09:46:26 +00:00
msgid ""
"Contains the Python system version, in a form usable by the :attr:"
"`version_string` method and the :attr:`server_version` class variable. For "
"example, ``'Python/1.4'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:140
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies a format string that should be used by :meth:`send_error` method "
"for building an error response to the client. The string is filled by "
"default with variables from :attr:`responses` based on the status code that "
"passed to :meth:`send_error`."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:147
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies the Content-Type HTTP header of error responses sent to the "
"client. The default value is ``'text/html'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:152
2016-10-30 09:46:26 +00:00
msgid ""
"This specifies the HTTP protocol version used in responses. If set to "
"``'HTTP/1.1'``, the server will permit HTTP persistent connections; however, "
"your server *must* then include an accurate ``Content-Length`` header "
"(using :meth:`send_header`) in all of its responses to clients. For "
"backwards compatibility, the setting defaults to ``'HTTP/1.0'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:160
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies an :class:`email.message.Message`\\ -like class to parse HTTP "
"headers. Typically, this is not overridden, and it defaults to :class:`http."
"client.HTTPMessage`."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:166
2016-10-30 09:46:26 +00:00
msgid ""
"This attribute contains a mapping of error code integers to two-element "
"tuples containing a short and long message. For example, ``{code: "
"(shortmessage, longmessage)}``. The *shortmessage* is usually used as the "
"*message* key in an error response, and *longmessage* as the *explain* key. "
"It is used by :meth:`send_response_only` and :meth:`send_error` methods."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:172
2016-10-30 09:46:26 +00:00
msgid "A :class:`BaseHTTPRequestHandler` instance has the following methods:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:176
2016-10-30 09:46:26 +00:00
msgid ""
"Calls :meth:`handle_one_request` once (or, if persistent connections are "
"enabled, multiple times) to handle incoming HTTP requests. You should never "
"need to override it; instead, implement appropriate :meth:`do_\\*` methods."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:183
2016-10-30 09:46:26 +00:00
msgid ""
"This method will parse and dispatch the request to the appropriate :meth:`do_"
"\\*` method. You should never need to override it."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:188
2016-10-30 09:46:26 +00:00
msgid ""
"When a HTTP/1.1 compliant server receives an ``Expect: 100-continue`` "
"request header it responds back with a ``100 Continue`` followed by ``200 "
"OK`` headers. This method can be overridden to raise an error if the server "
"does not want the client to continue. For e.g. server can chose to send "
"``417 Expectation Failed`` as a response header and ``return False``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:199
2016-10-30 09:46:26 +00:00
msgid ""
"Sends and logs a complete error reply to the client. The numeric *code* "
"specifies the HTTP error code, with *message* as an optional, short, human "
"readable description of the error. The *explain* argument can be used to "
"provide more detailed information about the error; it will be formatted "
"using the :attr:`error_message_format` attribute and emitted, after a "
"complete set of headers, as the response body. The :attr:`responses` "
"attribute holds the default values for *message* and *explain* that will be "
"used if no value is provided; for unknown codes the default value for both "
"is the string ``???``. The body will be empty if the method is HEAD or the "
"response code is one of the following: ``1xx``, ``204 No Content``, ``205 "
"Reset Content``, ``304 Not Modified``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:211
2016-10-30 09:46:26 +00:00
msgid ""
"The error response includes a Content-Length header. Added the *explain* "
"argument."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:217
2016-10-30 09:46:26 +00:00
msgid ""
"Adds a response header to the headers buffer and logs the accepted request. "
"The HTTP response line is written to the internal buffer, followed by "
"*Server* and *Date* headers. The values for these two headers are picked up "
"from the :meth:`version_string` and :meth:`date_time_string` methods, "
"respectively. If the server does not intend to send any other headers using "
"the :meth:`send_header` method, then :meth:`send_response` should be "
"followed by an :meth:`end_headers` call."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:226
2016-10-30 09:46:26 +00:00
msgid ""
"Headers are stored to an internal buffer and :meth:`end_headers` needs to be "
"called explicitly."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:232
2016-10-30 09:46:26 +00:00
msgid ""
"Adds the HTTP header to an internal buffer which will be written to the "
"output stream when either :meth:`end_headers` or :meth:`flush_headers` is "
"invoked. *keyword* should specify the header keyword, with *value* "
"specifying its value. Note that, after the send_header calls are done, :meth:"
"`end_headers` MUST BE called in order to complete the operation."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:238
2016-10-30 09:46:26 +00:00
msgid "Headers are stored in an internal buffer."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:243
2016-10-30 09:46:26 +00:00
msgid ""
"Sends the response header only, used for the purposes when ``100 Continue`` "
"response is sent by the server to the client. The headers not buffered and "
"sent directly the output stream.If the *message* is not specified, the HTTP "
"message corresponding the response *code* is sent."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:252
2016-10-30 09:46:26 +00:00
msgid ""
"Adds a blank line (indicating the end of the HTTP headers in the response) "
"to the headers buffer and calls :meth:`flush_headers()`."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:256
2016-10-30 09:46:26 +00:00
msgid "The buffered headers are written to the output stream."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:261
2016-10-30 09:46:26 +00:00
msgid ""
"Finally send the headers to the output stream and flush the internal headers "
"buffer."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:268
2016-10-30 09:46:26 +00:00
msgid ""
"Logs an accepted (successful) request. *code* should specify the numeric "
"HTTP code associated with the response. If a size of the response is "
"available, then it should be passed as the *size* parameter."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:274
2016-10-30 09:46:26 +00:00
msgid ""
"Logs an error when a request cannot be fulfilled. By default, it passes the "
"message to :meth:`log_message`, so it takes the same arguments (*format* and "
"additional values)."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:281
2016-10-30 09:46:26 +00:00
msgid ""
"Logs an arbitrary message to ``sys.stderr``. This is typically overridden to "
"create custom error logging mechanisms. The *format* argument is a standard "
"printf-style format string, where the additional arguments to :meth:"
"`log_message` are applied as inputs to the formatting. The client ip address "
"and current date and time are prefixed to every message logged."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:289
2016-10-30 09:46:26 +00:00
msgid ""
"Returns the server software's version string. This is a combination of the :"
"attr:`server_version` and :attr:`sys_version` attributes."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:294
2016-10-30 09:46:26 +00:00
msgid ""
"Returns the date and time given by *timestamp* (which must be ``None`` or in "
"the format returned by :func:`time.time`), formatted for a message header. "
"If *timestamp* is omitted, it uses the current date and time."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:298
2016-10-30 09:46:26 +00:00
msgid "The result looks like ``'Sun, 06 Nov 1994 08:49:37 GMT'``."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:302
2016-10-30 09:46:26 +00:00
msgid "Returns the current date and time, formatted for logging."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:306
2016-10-30 09:46:26 +00:00
msgid "Returns the client address."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:308
2016-10-30 09:46:26 +00:00
msgid ""
"Previously, a name lookup was performed. To avoid name resolution delays, it "
"now always returns the IP address."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:315
2016-10-30 09:46:26 +00:00
msgid ""
"This class serves files from the current directory and below, directly "
"mapping the directory structure to HTTP requests."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:318
2016-10-30 09:46:26 +00:00
msgid ""
"A lot of the work, such as parsing the request, is done by the base class :"
"class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET` "
"and :func:`do_HEAD` functions."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:322
2016-10-30 09:46:26 +00:00
msgid ""
"The following are defined as class-level attributes of :class:"
"`SimpleHTTPRequestHandler`:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:327
2016-10-30 09:46:26 +00:00
msgid ""
"This will be ``\"SimpleHTTP/\" + __version__``, where ``__version__`` is "
"defined at the module level."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:332
2016-10-30 09:46:26 +00:00
msgid ""
"A dictionary mapping suffixes into MIME types. The default is signified by "
"an empty string, and is considered to be ``application/octet-stream``. The "
"mapping is used case-insensitively, and so should contain only lower-cased "
"keys."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:339
msgid ""
"If not specified, the directory to serve is the current working directory."
msgstr ""
#: ../Doc/library/http.server.rst:341
2016-10-30 09:46:26 +00:00
msgid ""
"The :class:`SimpleHTTPRequestHandler` class defines the following methods:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:345
2016-10-30 09:46:26 +00:00
msgid ""
"This method serves the ``'HEAD'`` request type: it sends the headers it "
"would send for the equivalent ``GET`` request. See the :meth:`do_GET` method "
"for a more complete explanation of the possible headers."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:351
2016-10-30 09:46:26 +00:00
msgid ""
"The request is mapped to a local file by interpreting the request as a path "
"relative to the current working directory."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:354
2016-10-30 09:46:26 +00:00
msgid ""
"If the request was mapped to a directory, the directory is checked for a "
"file named ``index.html`` or ``index.htm`` (in that order). If found, the "
"file's contents are returned; otherwise a directory listing is generated by "
"calling the :meth:`list_directory` method. This method uses :func:`os."
"listdir` to scan the directory, and returns a ``404`` error response if the :"
"func:`~os.listdir` fails."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:361
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"If the request was mapped to a file, it is opened. Any :exc:`OSError` "
"exception in opening the requested file is mapped to a ``404``, ``'File not "
"found'`` error. If there was a ``'If-Modified-Since'`` header in the "
"request, and the file was not modified after this time, a ``304``, ``'Not "
"Modified'`` response is sent. Otherwise, the content type is guessed by "
"calling the :meth:`guess_type` method, which in turn uses the "
"*extensions_map* variable, and the file contents are returned."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:369
2016-10-30 09:46:26 +00:00
msgid ""
"A ``'Content-type:'`` header with the guessed content type is output, "
"followed by a ``'Content-Length:'`` header with the file's size and a "
"``'Last-Modified:'`` header with the file's modification time."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:373
2016-10-30 09:46:26 +00:00
msgid ""
"Then follows a blank line signifying the end of the headers, and then the "
"contents of the file are output. If the file's MIME type starts with ``text/"
"`` the file is opened in text mode; otherwise binary mode is used."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:377
2016-10-30 09:46:26 +00:00
msgid ""
"For example usage, see the implementation of the :func:`test` function "
"invocation in the :mod:`http.server` module."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:380
msgid "Support of the ``'If-Modified-Since'`` header."
msgstr ""
#: ../Doc/library/http.server.rst:383
2016-10-30 09:46:26 +00:00
msgid ""
"The :class:`SimpleHTTPRequestHandler` class can be used in the following "
"manner in order to create a very basic webserver serving files relative to "
"the current directory::"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:400
2016-10-30 09:46:26 +00:00
msgid ""
":mod:`http.server` can also be invoked directly using the :option:`-m` "
"switch of the interpreter with a ``port number`` argument. Similar to the "
"previous example, this serves files relative to the current directory::"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:406
2016-10-30 09:46:26 +00:00
msgid ""
"By default, server binds itself to all interfaces. The option ``-b/--bind`` "
"specifies a specific address to which it should bind. For example, the "
"following command causes the server to bind to localhost only::"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:412
2016-10-30 09:46:26 +00:00
msgid "``--bind`` argument was introduced."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:415
msgid ""
"By default, server uses the current directory. The option ``-d/--directory`` "
"specifies a directory to which it should serve the files. For example, the "
"following command uses a specific directory::"
msgstr ""
#: ../Doc/library/http.server.rst:421
msgid "``--directory`` specify alternate directory"
msgstr ""
#: ../Doc/library/http.server.rst:426
2016-10-30 09:46:26 +00:00
msgid ""
"This class is used to serve either files or output of CGI scripts from the "
"current directory and below. Note that mapping HTTP hierarchic structure to "
"local directory structure is exactly as in :class:`SimpleHTTPRequestHandler`."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:432
2016-10-30 09:46:26 +00:00
msgid ""
"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."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:437
2016-10-30 09:46:26 +00:00
msgid ""
"The class will however, run the CGI script, instead of serving it as a file, "
"if it guesses it to be a CGI script. Only directory-based CGI are used --- "
"the other common server configuration is to treat special extensions as "
"denoting CGI scripts."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:442
2016-10-30 09:46:26 +00:00
msgid ""
"The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI "
"scripts and serve the output, instead of serving files, if the request leads "
"to somewhere below the ``cgi_directories`` path."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:446
2016-10-30 09:46:26 +00:00
msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:450
2016-10-30 09:46:26 +00:00
msgid ""
"This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to "
"treat as containing CGI scripts."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:453
2016-10-30 09:46:26 +00:00
msgid "The :class:`CGIHTTPRequestHandler` defines the following method:"
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:457
2016-10-30 09:46:26 +00:00
msgid ""
"This method serves the ``'POST'`` request type, only allowed for CGI "
"scripts. Error 501, \"Can only POST to CGI scripts\", is output when trying "
"to POST to a non-CGI url."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:461
2016-10-30 09:46:26 +00:00
msgid ""
"Note that CGI scripts will be run with UID of user nobody, for security "
"reasons. Problems with the CGI script will be translated to error 403."
msgstr ""
2018-06-28 13:32:56 +00:00
#: ../Doc/library/http.server.rst:464
2016-10-30 09:46:26 +00:00
msgid ""
":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing "
"the ``--cgi`` option::"
msgstr ""