File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/__pycache__/wsgi.cpython-310.pyc
o
�N�g�4 � @ sH d Z ddlmZmZmZ ddlZddlmZ ddlm m
Z
ddlmZ ddlm
Z
ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZmZ erTddlmZ nddlZeeu redd
� Zdd� Zndd
� Zdd� ZG dd� dej�Ze� Z e �!d� G dd� dej"�Z#G dd� de$�Z%G dd� de$�Z&G dd� de$�Z'ej(Z)dS )a� WSGI support for the Tornado web framework.
WSGI is the Python standard for web servers, and allows for interoperability
between Tornado and other Python web frameworks and servers. This module
provides WSGI support in two ways:
* `WSGIAdapter` converts a `tornado.web.Application` to the WSGI application
interface. This is useful for running a Tornado app on another
HTTP server, such as Google App Engine. See the `WSGIAdapter` class
documentation for limitations that apply.
* `WSGIContainer` lets you run other WSGI applications and frameworks on the
Tornado HTTP server. For example, with this class you can mix Django
and Tornado handlers in a single server.
� )�absolute_import�division�print_functionN)�BytesIO)�Future)�escape)�httputil)�
access_log)�web��
native_str)�unicode_type�PY3c C � t | t�sJ �| �d�S �N�latin1)�
isinstance�bytes�decode��s� r �I/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/wsgi.py�to_wsgi_str: �
r c C r r )r �str�encoder r r r �
from_wsgi_str>