관리-도구
편집 파일: falcon.cpython-38.pyc
U �Mg�$ � @ s� d dl Z d dlmZmZ d dlmZ d dlmZ d dlm Z d dl mZmZm Z mZ d dlmZ er�d dlmZ d d lmZ d d lmZ d dlmZmZ zd dlZd dlmZ W n ek r� ed ��Y nX zd dlZejZejZdZ W n. ek �r d dl!Zej"Zej#ZdZ Y nX G dd� de�Z$G dd� d�Z%dZ&G dd� de�Z'dd� Z(dd� Z)dd� Z*dd� Z+dd � Z,d!d"� Z-d#d$� Z.dS )%� N)�Integration�DidNotEnable)�RequestExtractor)�SentryWsgiMiddleware)�SOURCE_FOR_STYLE)�capture_internal_exceptions�ensure_integration_enabled�event_from_exception� parse_version)� TYPE_CHECKING)�Any)�Dict)�Optional)�Event�EventProcessor)�__version__zFalcon not installedTFc @ sJ e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zer>dd� Z nd d� Z dS )�FalconRequestExtractorc C s | j jS �N)�request�env��self� r �L/opt/hc_python/lib/python3.8/site-packages/sentry_sdk/integrations/falcon.pyr / s zFalconRequestExtractor.envc C s | j jS r )r �cookiesr r r r r 3 s zFalconRequestExtractor.cookiesc C s d S r r r r r r �form7 s zFalconRequestExtractor.formc C s d S r r r r r r �files; s zFalconRequestExtractor.filesc C s | � � }|dkrdS d S d S )Nr z[REQUEST_CONTAINING_RAW_DATA])�content_length)r r r r r �raw_data? s zFalconRequestExtractor.raw_datac C s* z | j jW S tjjk r$ Y d S X d S r )r �media�falcon�errors�HTTPBadRequestr r r r �jsonN s zFalconRequestExtractor.jsonc C s0 z | j jW S tjjk r* | j j Y S X d S r )r r r r! r"