Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /opt/alt/python38/lib64/python3.8/http/__pycache__/ |
U ��,a�� � @ s� d Z dddddgZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl Z ddlZddlZddlZddlZddlZddlZddlZddlmZ dd lmZ d ZdZG dd� dej�ZG d d� deje�ZG dd� dej�Z G dd� de �Z!dd� Z"da#dd� Z$dd� Z%G dd� de!�Z&dd� Z'e edddfdd�Z(e)dk�r�ddl*Z*e*�+� Z,e,j-ddd d!� e,j-d"d#d$d%d&� e,j-d'd(e�.� d)d*� e,j-d+d,de/d-d.d/� e,�0� Z1e1j2�r�e&Z3nee!e1j4d0�Z3G d1d2� d2e�Z5e(e3e5e1j6e1j7d3� dS )4z0.6� HTTPServer�ThreadingHTTPServer�BaseHTTPRequestHandler�SimpleHTTPRequestHandler�CGIHTTPRequestHandler� N)�partial)� HTTPStatusa� <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;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> ztext/html;charset=utf-8c @ s e Zd ZdZdd� ZdS )r � c C s4 t j�| � | jd d� \}}t�|�| _|| _d S )N� )�socketserver� TCPServer�server_bindZserver_address�socketZgetfqdn�server_name�server_port)�self�host�port� r �0/opt/alt/python38/lib64/python3.8/http/server.pyr � s zHTTPServer.server_bindN)�__name__� __module__�__qualname__Zallow_reuse_addressr r r r r r � s c @ s e Zd ZdZdS )r TN)r r r Zdaemon_threadsr r r r r � s c @ s e Zd Zdej�� d Zde Ze Z eZdZ dd� Zdd� Zd d � Zdd� Zd?dd�Zd@dd�ZdAdd�Zdd� Zdd� Zdd� ZdBdd�Zdd� Zdd � Zd!d"� ZdCd#d$�Zd%d&� Zd'd(d)d*d+d,d-gZd d.d/d0d1d2d3d4d5d6d7d8d9g Zd:d;� Z d<Z!e"j#j$Z%d=d>� e&j'�(� D �Z)d S )Dr zPython/r z BaseHTTP/�HTTP/0.9c C s� d | _ | j | _}d| _t| jd�}|�d�}|| _|�� }t |�dkrLdS t |�dk�r&|d }zT|� d�srt�|�d d �d }|�d�}t |�dkr�t�t|d �t|d �f}W n, tt fk r� | �tjd | � Y dS X |dk�r | jdk�r d| _|dk�r | �tjd| � dS || _dt |� k�rBdk�sZn | �tjd| � dS |d d� \}}t |�dk�r�d| _|dk�r�| �tjd| � dS || | _ | _ztjj| j| jd�| _W n� tjjk �r } z| �tjdt|�� W Y �dS d }~X Y nB tjjk �rH } z| �tjdt|�� W Y �dS d }~X Y nX | j�dd�} | �� dk�rnd| _n | �� dk�r�| jdk�r�d| _| j�dd�} | �� dk�r�| jdk�r�| jdk�r�| �� �s�dS dS )NTz iso-8859-1z r F� ���zHTTP/�/r �.r zBad request version (%r))r r zHTTP/1.1)r r zInvalid HTTP version (%s)zBad request syntax (%r)ZGETzBad HTTP/0.9 request type (%r))Z_classz Line too longzToo many headers� Connection� �close� keep-aliveZExpectz100-continue) �command�default_request_version�request_version�close_connection�str�raw_requestline�rstrip�requestline�split�len� startswith� ValueError�int� IndexError� send_errorr ZBAD_REQUEST�protocol_versionZHTTP_VERSION_NOT_SUPPORTED�path�http�clientZ parse_headers�rfile�MessageClass�headersZLineTooLongZREQUEST_HEADER_FIELDS_TOO_LARGEZ HTTPException�get�lower�handle_expect_100)r �versionr) �wordsZbase_version_numberZversion_numberr"