o
    ùjX	  ã                   @   sf   d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZ ejr'e j	Z
ne jZ
		d	dd„ZdS )
é    N)Ústrftime)Úgmtime)Údeque)ÚsixFc           	      C   sÞ   t jst|tƒr| d¡}td| |f gƒ}|durB| d| ¡ t ¡ tk s)J ‚t ¡ | }t	d|ƒd }| dt
dt|ƒƒ ¡ |durM| d	| ¡ |durX| d
| ¡ |durc| d| ¡ |rj| d¡ d |¡S )aZ  Generate a HTTP response cookie. No sanity check whatsoever is done,
    don't send anything other than ASCII.

    :param k: Cookie key.
    :param v: Cookie value.
    :param max_age: Seconds.
    :param domain: Domain.
    :param path: Path.
    :param comment: Whatever.
    :param secure: If true, appends 'Secure' to the cookie string.
    Úasciiz%s=%sNz
Max-Age=%dl        é   z
Expires=%sz%a, %d %b %Y %H:%M:%S GMTz	Domain=%szPath=%sz
Comment=%sÚSecurez; )r   ÚPY2Ú
isinstanceÚbytesÚdecoder   ÚappendÚtimeÚCOOKIE_MAX_AGEÚminr   r   Újoin)	ÚkÚvÚmax_ageÚdomainÚpathÚcommentÚsecureÚretvalÚexpires© r   úO/var/www/html/LicenciasMiG/venv/lib/python3.10/site-packages/spyne/util/http.pyÚgenerate_cookie&   s(   

ÿ

r   )NNNNF)Úsysr   r   r   Úcollectionsr   Ú
spyne.utilr   r	   Úmaxintr   Úmaxsizer   r   r   r   r   Ú<module>   s   ÿ