https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/werkzeug/wrappers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/werkzeug/wrappers/common_descriptors.pyc
�
./�_c@s`ddlmZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
dd
lmZddlmZddlm
Z
dd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZdefd��YZdefd��YZdS(i����(tdatetime(t	timedeltai(tstring_types(tCallbackDict(tdump_age(tdump_csp_header(tdump_header(tdump_options_header(t	http_date(t	parse_age(tparse_csp_header(t
parse_date(tparse_options_header(tparse_set_header(tcached_property(tenviron_property(tget_content_type(theader_property(tget_content_lengthtCommonRequestDescriptorsMixincBs�eZdZeddd�Zed��Zeddd�Zeddd�Zed	dd
�Z	eddedd�Zed
de
dd�Zd�Zed��Zed��Zed��ZRS(s�A mixin for :class:`BaseRequest` subclasses.  Request objects that
    mix this class in will automatically get descriptors for a couple of
    HTTP headers with automatic type conversion.

    .. versionadded:: 0.5
    tCONTENT_TYPEtdocs�The Content-Type entity-header field indicates the media
        type of the entity-body sent to the recipient or, in the case of
        the HEAD method, the media type that would have been sent had
        the request been a GET.cCs
t|j�S(s�The Content-Length entity-header field indicates the size of the
        entity-body in bytes or, in the case of the HEAD method, the size of
        the entity-body that would have been sent had the request been a
        GET.
        (Rtenviron(tself((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytcontent_length'stHTTP_CONTENT_ENCODINGs�The Content-Encoding entity-header field is used as a
        modifier to the media-type. When present, its value indicates
        what additional content codings have been applied to the
        entity-body, and thus what decoding mechanisms must be applied
        in order to obtain the media-type referenced by the Content-Type
        header field.

        .. versionadded:: 0.9tHTTP_CONTENT_MD5s�The Content-MD5 entity-header field, as defined in
        RFC 1864, is an MD5 digest of the entity-body for the purpose of
        providing an end-to-end message integrity check (MIC) of the
        entity-body. (Note: a MIC is good for detecting accidental
        modification of the entity-body in transit, but is not proof
        against malicious attacks.)

        .. versionadded:: 0.9tHTTP_REFERERs�The Referer[sic] request-header field allows the client
        to specify, for the server's benefit, the address (URI) of the
        resource from which the Request-URI was obtained (the
        "referrer", although the header field is misspelled).t	HTTP_DATEs�The Date general-header field represents the date and
        time at which the message was originated, having the same
        semantics as orig-date in RFC 822.tHTTP_MAX_FORWARDSs�The Max-Forwards request-header field provides a
        mechanism with the TRACE and OPTIONS methods to limit the number
        of proxies or gateways that can forward the request to the next
        inbound server.cCs4t|d�s0t|jjdd��|_ndS(Nt_parsed_content_typeRt(thasattrRRtgetR(R((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyt_parse_content_type_scCs|j�|jdj�S(s�Like :attr:`content_type`, but without parameters (eg, without
        charset, type etc.) and always lowercase.  For example if the content
        type is ``text/HTML; charset=utf-8`` the mimetype would be
        ``'text/html'``.
        i(R"Rtlower(R((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytmimetypees
cCs|j�|jdS(s�The mimetype parameters as dict.  For example if the content
        type is ``text/html; charset=utf-8`` the params would be
        ``{'charset': 'utf-8'}``.
        i(R"R(R((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytmimetype_paramsos
cCst|jjdd��S(sjThe Pragma general-header field is used to include
        implementation-specific directives that might apply to any recipient
        along the request/response chain.  All pragma directives specify
        optional behavior from the viewpoint of the protocol; however, some
        systems MAY require that behavior be consistent with the directives.
        tHTTP_PRAGMAR(R
RR!(R((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytpragmaxsN(t__name__t
__module__t__doc__Rtcontent_typeRRtcontent_encodingtcontent_md5treferrertNoneRtdatetinttmax_forwardsR"tpropertyR$R%R'(((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyRs8								
	tCommonResponseDescriptorsMixincBs�eZdZed��Zejd��Zed��Zeddd�Zedd&e
edd�Zed	dd
�Z
edd&eedd�Zed
dd�Zeddd�Zeddd�Zedd&eedd�Zedd&eedd�Zedd&eedd�Zedd&eedd�Zedd&eedd�Zed��Zejd��Zd&d�Zed dd!�Zed"dd#�Z ed$dd%�Z![RS('s�A mixin for :class:`BaseResponse` subclasses.  Response objects that
    mix this class in will automatically get descriptors for a couple of
    HTTP headers with automatic type conversion.
    cCs3|jjd�}|r/|jd�dj�SdS(s0The mimetype (content type without charset etc.)scontent-typet;iN(theadersR!tsplittstrip(Rtct((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyR$�scCst||j�|jd<dS(NsContent-Type(RtcharsetR6(Rtvalue((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyR$�scs;�fd�}t�jjdd��d}t||�S(s�The mimetype parameters as dict. For example if the
        content type is ``text/html; charset=utf-8`` the params would be
        ``{'charset': 'utf-8'}``.

        .. versionadded:: 0.5
        cst�j|��jd<dS(NsContent-Type(RR$R6(td(R(sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyt	on_update�sscontent-typeRi(RR6R!R(RR=R<((RsH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyR%�s	tLocationRs�The Location response-header field is used to redirect
        the recipient to a location other than the Request-URI for
        completion of the request or identification of a new
        resource.tAgesThe Age response-header field conveys the sender's
        estimate of the amount of time since the response (or its
        revalidation) was generated at the origin server.

        Age values are non-negative decimal integers, representing time
        in seconds.sContent-Types�The Content-Type entity-header field indicates the media
        type of the entity-body sent to the recipient or, in the case of
        the HEAD method, the media type that would have been sent had
        the request been a GET.sContent-LengthsThe Content-Length entity-header field indicates the size
        of the entity-body, in decimal number of OCTETs, sent to the
        recipient or, in the case of the HEAD method, the size of the
        entity-body that would have been sent had the request been a
        GET.sContent-Locations�The Content-Location entity-header field MAY be used to
        supply the resource location for the entity enclosed in the
        message when that entity is accessible from a location separate
        from the requested resource's URI.sContent-EncodingsbThe Content-Encoding entity-header field is used as a
        modifier to the media-type. When present, its value indicates
        what additional content codings have been applied to the
        entity-body, and thus what decoding mechanisms must be applied
        in order to obtain the media-type referenced by the Content-Type
        header field.sContent-MD5slThe Content-MD5 entity-header field, as defined in
        RFC 1864, is an MD5 digest of the entity-body for the purpose of
        providing an end-to-end message integrity check (MIC) of the
        entity-body. (Note: a MIC is good for detecting accidental
        modification of the entity-body in transit, but is not proof
        against malicious attacks.)sContent-Security-Policys�The Content-Security-Policy header adds an additional layer of
        security to help detect and mitigate certain types of attacks.s#Content-Security-Policy-Report-Onlys�The Content-Security-Policy-Report-Only header adds a csp policy
        that is not enforced but is reported thereby helping detect
        certain types of attacks.tDates�The Date general-header field represents the date and
        time at which the message was originated, having the same
        semantics as orig-date in RFC 822.tExpiress�The Expires entity-header field gives the date/time after
        which the response is considered stale. A stale cache entry may
        not normally be returned by a cache.s
Last-Modifieds�The Last-Modified entity-header field indicates the date
        and time at which the origin server believes the variant was
        last modified.cCsU|jjd�}|dkr"dS|j�rKtj�tdt|��St|�S(sThe Retry-After response-header field can be used with a
        503 (Service Unavailable) response to indicate how long the
        service is expected to be unavailable to the requesting client.

        Time in seconds until expiration or date.
        sretry-afterNtseconds(	R6R!R/tisdigitRtutcnowRR1R(RR;((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytretry_afterscCsg|dkr,d|jkr(|jd=ndSt|t�rJt|�}nt|�}||jd<dS(Nsretry-aftersRetry-After(R/R6t
isinstanceRRtstr(RR;((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyREs
cs1�fd�}�fd�}t||d|�S(Ncs+��fd�}t�jj��|�S(NcsC|r#��jkr#�j�=n|r?|j��j�<ndS(N(R6t	to_header(t
header_set(tnameR(sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyR=+s
(R
R6R!(RR=(RJ(RsH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytfget*scsI|s|j�=n2t|t�r2||j�<nt|�|j�<dS(N(R6RFRR(RR;(RJ(sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pytfset3s

R(R3(RJRRKRL((RJsH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyt
_set_property)s	tVarys�The Vary field value indicates the set of request-header
        fields that fully determines, while the response is fresh,
        whether a cache is permitted to use the response to reply to a
        subsequent request without revalidation.sContent-Languages�The Content-Language entity-header field describes the
        natural language(s) of the intended audience for the enclosed
        entity. Note that this might not be equivalent to all the
        languages used within the entity-body.tAllowsRThe Allow entity-header field lists the set of methods
        supported by the resource identified by the Request-URI. The
        purpose of this field is strictly to inform the recipient of
        valid methods associated with the resource. An Allow header
        field MUST be present in a 405 (Method Not Allowed)
        response.N("R(R)R*R3R$tsetterR%RtlocationR/R	RtageR+R1RGRtcontent_locationR,R-R
Rtcontent_security_policyt#content_security_policy_report_onlyRRR0texpirest
last_modifiedRERMtvarytcontent_languagetallow(((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyR4�s�															N(RRt_compatRtdatastructuresRthttpRRRRRR	R
RRR
tutilsRRRRtwsgiRtobjectRR4(((sH/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/wrappers/common_descriptors.pyt<module>s(l

https://t.me/AnonymousX5 - 2025