관리-도구
편집 파일: wsgi.cpython-38.pyc
U ��\� � @ s� d dl Z d dlmZmZ d dlmZmZ d dlmZm Z d dl mZ erTddd �Zn dd d �Zdd� Zd d� ZG dd� de�Zdd� Zdd� Zdd� Zdd� ZG dd� de�Zdd� ZdS )� N)�Hub�_should_send_default_pii)�capture_internal_exceptions�event_from_exception)�PY2�reraise)�_filter_headers�utf-8�replacec C s | � ||�S �N)�decode��s�charset�errors� r �M/opt/alt/python38/lib/python3.8/site-packages/sentry_sdk/integrations/wsgi.py�wsgi_decoding_dance s r c C s | � d��||�S )N�latin1)�encoder r r r r r s c C s� | � d�rZ| d }| d dkr6|�d�r6|dd� }q�| d dkr�|�d�r�|dd � }n<| � d �r�| d }| d | d fdkr�|d | d 7 }nd}|S )zEReturn the host for the given WSGI environment. Yanked from Werkzeug.Z HTTP_HOST�wsgi.url_scheme�httpz:80N����httpsz:443����SERVER_NAME�SERVER_PORT))r Z443)r Z80�:�unknown)�get�endswith)�environ�rvr r r �get_host"