Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « wsgiref.simple_server » Python 3.11.3

Classe « WSGIRequestHandler »

Informations générales

Héritage

builtins.object
    BaseRequestHandler
        StreamRequestHandler
            BaseHTTPRequestHandler
                WSGIRequestHandler

Définition

class WSGIRequestHandler(BaseHTTPRequestHandler):

Constructeur(s)

Signature du constructeur Description
__init__(self, request, client_address, server)

Liste des attributs statiques

Nom de l'attribut Valeur
default_request_versionHTTP/0.9
disable_nagle_algorithmFalse
error_content_typetext/html;charset=utf-8
error_message_format<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <title>Error response</title> </head> <body> <h1>Error response</h1> <p>Error code: %(code)d</p> <p>Message: %(message)s.</p> <p>Error code explanation: %(code)s - %(explain)s.</p> </body> </html>
monthname[None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
protocol_versionHTTP/1.0
rbufsize-1
responses{<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request received, please continue'), <HTTPStatus.SWITCHING_PROTOCOLS: 101>: ('Switching Protocols', 'Switching to new protocol; obey Upgrade header'), <HTTPStatus.PROCESSING: 102>: ('Processing', ''), <HTTPStatus.EARLY_HINTS: 103>: ('Early Hints', ''), <HTTPStatus.OK: 200>: ('OK', 'Request fulfilled, document follows'), <HTTPStatus.CREATED: 201>: ('Created', 'Document created, URL follows'), <HTTPStatus.ACCEPTED: 202>: ('Accepted', 'Request accepted, processing continues off-line'), <HTTPStatus.NON_AUTHORITATIVE_INFORMATION: 203>: ('Non-Authoritative Information', 'Request fulfilled from cache'), <HTTPStatus.NO_CONTENT: 204>: ('No Content', 'Request fulfilled, nothing follows'), <HTTPStatus.RESET_CONTENT: 205>: ('Reset Content', 'Clear input form for further input'), <HTTPStatus.PARTIAL_CONTENT: 206>: ('Partial Content', 'Partial content follows'), <HTTPStatus.MULTI_STATUS: 207>: ('Multi-Status', ''), <HTTPStatus.ALREADY_REPORTED: 208>: ('Already Reported', ''), <HTTPStatus.IM_USED: 226>: ('IM Used', ''), <HTTPStatus.MULTIPLE_CHOICES: 300>: ('Multiple Choices', 'Object has several resources -- see URI list'), <HTTPStatus.MOVED_PERMANENTLY: 301>: ('Moved Permanently', 'Object moved permanently -- see URI list'), <HTTPStatus.FOUND: 302>: ('Found', 'Object moved temporarily -- see URI list'), <HTTPStatus.SEE_OTHER: 303>: ('See Other', 'Object moved -- see Method and URL list'), <HTTPStatus.NOT_MODIFIED: 304>: ('Not Modified', 'Document has not changed since given time'), <HTTPStatus.USE_PROXY: 305>: ('Use Proxy', 'You must use proxy specified in Location to access this resource'), <HTTPStatus.TEMPORARY_REDIRECT: 307>: ('Temporary Redirect', 'Object moved temporarily -- see URI list'), <HTTPStatus.PERMANENT_REDIRECT: 308>: ('Permanent Redirect', 'Object moved permanently -- see URI list'), <HTTPStatus.BAD_REQUEST: 400>: ('Bad Request', 'Bad request syntax or unsupported method'), <HTTPStatus.UNAUTHORIZED: 401>: ('Unauthorized', 'No permission -- see authorization schemes'), <HTTPStatus.PAYMENT_REQUIRED: 402>: ('Payment Required', 'No payment -- see charging schemes'), <HTTPStatus.FORBIDDEN: 403>: ('Forbidden', 'Request forbidden -- authorization will not help'), <HTTPStatus.NOT_FOUND: 404>: ('Not Found', 'Nothing matches the given URI'), <HTTPStatus.METHOD_NOT_ALLOWED: 405>: ('Method Not Allowed', 'Specified method is invalid for this resource'), <HTTPStatus.NOT_ACCEPTABLE: 406>: ('Not Acceptable', 'URI not available in preferred format'), <HTTPStatus.PROXY_AUTHENTICATION_REQUIRED: 407>: ('Proxy Authentication Required', 'You must authenticate with this proxy before proceeding'), <HTTPStatus.REQUEST_TIMEOUT: 408>: ('Request Timeout', 'Request timed out; try again later'), <HTTPStatus.CONFLICT: 409>: ('Conflict', 'Request conflict'), <HTTPStatus.GONE: 410>: ('Gone', 'URI no longer exists and has been permanently removed'), <HTTPStatus.LENGTH_REQUIRED: 411>: ('Length Required', 'Client must specify Content-Length'), <HTTPStatus.PRECONDITION_FAILED: 412>: ('Precondition Failed', 'Precondition in headers is false'), <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413>: ('Request Entity Too Large', 'Entity is too large'), <HTTPStatus.REQUEST_URI_TOO_LONG: 414>: ('Request-URI Too Long', 'URI is too long'), <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415>: ('Unsupported Media Type', 'Entity body in unsupported format'), <HTTPStatus.REQUESTED_RANGE_NOT_SATISFIABLE: 416>: ('Requested Range Not Satisfiable', 'Cannot satisfy request range'), <HTTPStatus.EXPECTATION_FAILED: 417>: ('Expectation Failed', 'Expect condition could not be satisfied'), <HTTPStatus.IM_A_TEAPOT: 418>: ("I'm a Teapot", 'Server refuses to brew coffee because it is a teapot.'), <HTTPStatus.MISDIRECTED_REQUEST: 421>: ('Misdirected Request', 'Server is not able to produce a response'), <HTTPStatus.UNPROCESSABLE_ENTITY: 422>: ('Unprocessable Entity', ''), <HTTPStatus.LOCKED: 423>: ('Locked', ''), <HTTPStatus.FAILED_DEPENDENCY: 424>: ('Failed Dependency', ''), <HTTPStatus.TOO_EARLY: 425>: ('Too Early', ''), <HTTPStatus.UPGRADE_REQUIRED: 426>: ('Upgrade Required', ''), <HTTPStatus.PRECONDITION_REQUIRED: 428>: ('Precondition Required', 'The origin server requires the request to be conditional'), <HTTPStatus.TOO_MANY_REQUESTS: 429>: ('Too Many Requests', 'The user has sent too many requests in a given amount of time ("rate limiting")'), <HTTPStatus.REQUEST_HEADER_FIELDS_TOO_LARGE: 431>: ('Request Header Fields Too Large', 'The server is unwilling to process the request because its header fields are too large'), <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REASONS: 451>: ('Unavailable For Legal Reasons', 'The server is denying access to the resource as a consequence of a legal demand'), <HTTPStatus.INTERNAL_SERVER_ERROR: 500>: ('Internal Server Error', 'Server got itself in trouble'), <HTTPStatus.NOT_IMPLEMENTED: 501>: ('Not Implemented', 'Server does not support this operation'), <HTTPStatus.BAD_GATEWAY: 502>: ('Bad Gateway', 'Invalid responses from another server/proxy'), <HTTPStatus.SERVICE_UNAVAILABLE: 503>: ('Service Unavailable', 'The server cannot process the request due to a high load'), <HTTPStatus.GATEWAY_TIMEOUT: 504>: ('Gateway Timeout', 'The gateway server did not receive a timely response'), <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 505>: ('HTTP Version Not Supported', 'Cannot fulfill request'), <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506>: ('Variant Also Negotiates', ''), <HTTPStatus.INSUFFICIENT_STORAGE: 507>: ('Insufficient Storage', ''), <HTTPStatus.LOOP_DETECTED: 508>: ('Loop Detected', ''), <HTTPStatus.NOT_EXTENDED: 510>: ('Not Extended', ''), <HTTPStatus.NETWORK_AUTHENTICATION_REQUIRED: 511>: ('Network Authentication Required', 'The client needs to authenticate to gain network access')}
server_versionWSGIServer/0.2
sys_versionPython/3.11.3
timeoutNone
wbufsize0
weekdayname['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
get_environ(self)
get_stderr(self)
handle(self) Handle a single HTTP request [extrait de handle.__doc__]

Méthodes héritées de la classe BaseHTTPRequestHandler

__init_subclass__, __subclasshook__, address_string, date_time_string, end_headers, flush_headers, handle_expect_100, handle_one_request, log_date_time_string, log_error, log_message, log_request, parse_request, send_error, send_header, send_response, send_response_only, version_string

Méthodes héritées de la classe StreamRequestHandler

finish, setup

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__