o
    Ýîi«  ã                   @   sL   d Z ddlmZ ddlmZ ddlmZ G dd„ deƒZG dd„ deƒZd	S )
z™The ``spyne.server.pyramid`` module contains a Pyramid-compatible Http
transport. It's a thin wrapper around
:class:`spyne.server.wsgi.WsgiApplication`.
é    )Úabsolute_import)ÚResponse)ÚWsgiApplicationc                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚPyramidApplicationz.Pyramid View Wrapper. Use this for regular RPCc                    s2   t ƒ ‰ ‡ fdd„}t | |j|¡}d |¡ˆ _ˆ S )Nc                    s6   |   dd¡\} }t| ƒˆ _|D ]	\}}|ˆ j|< qd S )Nú é   )ÚsplitÚintÚ
status_intÚheaders)Ústatusr   ÚreasonÚheaderÚvalue©Úretval© úT/var/www/html/LicenciasMIG/venv/lib/python3.10/site-packages/spyne/server/pyramid.pyÚstart_response%   s
   
ÿz3PyramidApplication.__call__.<locals>.start_responseó    )r   r   Ú__call__ÚenvironÚjoinÚbody)ÚselfÚrequestr   Úresponser   r   r   r   "   s   
ÿzPyramidApplication.__call__c                 C   s   d  |¡|_d S )Nr   )r   r   ©r   r   r   r   r   r   Úset_response2   s   zPyramidApplication.set_responseN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s    r   c                   @   s   e Zd ZdZdd„ ZdS )ÚStreamingPyramidApplicationzAYou should use this when you're generating HUGE data as response.c                 C   s
   ||_ d S )N)Úapp_iterr   r   r   r   r   9   s   
z(StreamingPyramidApplication.set_responseN)r   r    r!   r"   r   r   r   r   r   r#   6   s    r#   N)	r"   Ú
__future__r   Úpyramid.responser   Úspyne.server.wsgir   r   r#   r   r   r   r   Ú<module>   s   