Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/web/__pycache__/ |
Upload File : |
o �b�. � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZm Z mZmZ G dd � d e jej�ZG d d� de j�ZG dd � d e�ZG dd� deje j�ZdS )zH I hold resource classes and helper classes that deal with CGI scripts. � N)�protocol)�Logger)�filepath)�pb)�http�resource�server�staticc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�CGIDirectoryc C s t j�| � tj�| |� d S �N)r �Resource�__init__r �FilePath)�self�pathname� r �3/usr/lib/python3/dist-packages/twisted/web/twcgi.pyr s zCGIDirectory.__init__c C s6 | � |�}|�� s tjjS |�� rt|j�S t|j�S r ) �child�existsr �File� childNotFound�isdirr �path� CGIScript)r r �request�fnpr r r �getChild s zCGIDirectory.getChildc C s t �d�}|�|�S )Nz1CGI directories do not support directory listing.)r � NoResource�render)r r �notFoundr r r r $ s � zCGIDirectory.renderN)�__name__� __module__�__qualname__r r r r r r r r s r c @ s2 e Zd ZdZdZd dd�Zdd� Zg fdd �ZdS )r z� L{CGIScript} is a resource which runs child processes according to the CGI specification. The implementation is complex due to the fact that it requires asynchronous IPC with an external process with an unpleasant protocol. � Nc C s$ || _ |du r ddlm} || _dS )zA Initialize, with the name of a CGI script file. Nr )�reactor)�filename�twisted.internetr$ �_reactor)r r% �registryr$ r r r r 6 s zCGIScript.__init__c C s� dd� |j� }|�� �d�d }tj|d|jt|�� j �|j || j|jd� }|� � j}|dur4||d<