Ë ‚Ö¦i2À ã ól — d Z dZg d¢ZddlZddlZddlZddlZddlZ ddl Z ddlZddlZddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddl mZ dZdZdZ G d „ d ej6 « Z G d„ dej: e« Z G d „ dej> « Z G d„ de « Z!d„ Z"da#d„ Z$d„ Z% G d„ de!« Z&d„ Z'e edddfd„Z(e)dk( rêddl*Z*ddl+Z+ e*jX « Z-e-j] ddd¬« e-j] dd d!d"¬#« e-j] d$d% e j^ « d&¬'« e-j] d(d)d*dd+¬,« e-j] d-de0d.d/¬0« e-jc « Z2e2jf re&Z4ne!Z4 G d1„ d2e« Z5 e(e4e5e2jl e2jn e2jp ¬3« yy)4a@ HTTP server classes. Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST, and CGIHTTPRequestHandler for CGI scripts. It does, however, optionally implement HTTP/1.1 persistent connections, as of version 0.3. Notes on CGIHTTPRequestHandler ------------------------------ This class implements GET and POST requests to cgi-bin scripts. If the os.fork() function is not present (e.g. on Windows), subprocess.Popen() is used as a fallback, with slightly altered semantics. In all cases, the implementation is intentionally naive -- all requests are executed synchronously. 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). XXX To do: - log requests even later (to capture byte count) - log user-agent header and other interesting goodies - send error log to separate file z0.6)Ú HTTPServerÚThreadingHTTPServerÚBaseHTTPRequestHandlerÚSimpleHTTPRequestHandlerÚCGIHTTPRequestHandleré N)Ú HTTPStatusaD
Error code: %(code)d
Message: %(message)s.
Error code explanation: %(code)s - %(explain)s.
ztext/html;charset=utf-8i c ó — e Zd ZdZd„ Zy)r é c ó¨ — t j j | « | j dd \ }}t j |« | _ || _ y)z.Override server_bind to store the server name.Né )ÚsocketserverÚ TCPServerÚserver_bindÚserver_addressÚsocketÚgetfqdnÚserver_nameÚserver_port)ÚselfÚhostÚports ú$/usr/lib64/python3.12/http/server.pyr zHTTPServer.server_bindŠ sE € ä×Ñ×*Ñ*¨4Ô0Ø×(Ñ(¨¨!Ð,‰ ˆˆdÜ!Ÿ>™>¨$Ó/ˆÔ؈Õó N)Ú__name__Ú __module__Ú__qualname__Úallow_reuse_addressr © r r r r † s „ àÐó r r c ó — e Zd ZdZy)r TN)r r r Údaemon_threadsr r r r r ’ s „ Ø�Nr r c óN — e Zd ZdZdej j « d z Zdez Z e ZeZ dZd„ Zd„ Zd„ Zd „ Zd"d„Zd#d„Zd#d „Zd„ Zd„ Zd„ Zd$d„Zd„ Zej9 ej<