ProPeler
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib
/
python3
/
dist-packages
/
twisted
/
web
/
__pycache__
/
Filename :
static.cpython-38.pyc
back
Copy
U W[w� � @ s> d Z ddlmZmZ ddlZddlZddlZddlZddlZddl Z ddl mZ ddlm Z ddlmZ ddlmZ ddlmZ dd lmZmZmZmZ dd lmZ ddlmZmZmZ ddlmZmZ dd lm Z ddl!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( e�rddl)m*Z*m+Z+ nddl,m*Z*m+Z+ e�-d�Z.dd� Z/G dd� dej0�Z1e(e&dddd��dd� �Z2dd� Z3G dd� dej0�Z4G d d!� d!ej5�Z6dej7fd"d#�Z8d$d%� Z9G d&d'� d'ej0ej:�Z;eej<�G d(d)� d)e=��Z>G d*d+� d+e>�Z?G d,d-� d-e>�Z@G d.d/� d/e>�ZAG d0d1� d1ej0�ZBd2d3� ZCG d4d5� d5ej0�ZDdS )6z& Static resources for L{twisted.web}. � )�division�absolute_importN)�implementer)�server)�resource)�http)� redirectTo)�_PY3� intToBytes�nativeString� networkString)�escape)� components�filepath�log)�abstract� interfaces)�InsensitiveDict)�platformType)�URL)�Version)� deprecated)�quote�unquotezInvalid request URL.c C s | dkpd| kpt tj�| kS )Ns ..� /)r �os�sep��path� r �4/usr/lib/python3/dist-packages/twisted/web/static.py�isDangerous, s r! c @ s$ e Zd ZdZdd� Zdd� ZeZdS )�Dataz/ This is a static, in-memory resource. c C s t j�| � || _|| _dS )z� @param data: The bytes that make up this data resource. @type data: L{bytes} @param type: A native string giving the Internet media type for this content. @type type: L{str} N)r �Resource�__init__�data�type)�selfr% r&