;ixMddlmZddlZddlmZddlmZddlmZddlm Z ddlm Z dd lm Z dd lm Z dd lm Z dd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl"m#Z#ddl"m$Z$d d!lm%Z%d d"l"m&Z&d d#l"m'Z'd d$l"m(Z(Gd%d&Z)dS)') annotationsN)datetime) parse_qsl)Accept) Authorization) CharsetAccept)ETags)Headers) HeaderSet)IfRange) ImmutableList)ImmutableMultiDict)LanguageAccept) MIMEAccept) MultiDict)Range)RequestCacheControl)parse_accept_header)parse_cache_control_header) parse_date) parse_etags)parse_if_range_header)parse_list_header)parse_options_header)parse_range_header)parse_set_header) UserAgent)cached_property)header_property) parse_cookie)get_content_length)get_current_url)get_hostcbeZdZUdZeZded<eZded<eZ ded<e Z ded< d Z d ed <dadZ dbdZedcdZeddd Zedbd!Zeded#Zedbd$Zedbd%Zedbd&Zedbd'Zedbd(Zedfd*Zeed+d,d-.Zedgd0Zeed1d2d-.Zeed3d4d-.Z eed5d6d-.Z!ed7d e"d8d-.Z#ed9d e$d:d-.Z%dhd;Z&edbd<Z'edid>Z(edjd@Z)edkdBZ*edldDZ+edmdFZ,edndHZ-edodJZ.edpdLZ/edpdMZ0edqdOZ1edqdPZ2edrdRZ3edsdTZ4edtdVZ5edudXZ6eedYdZd-.Z7ed[e8d\d-]Z9eed^d_d-.Z:eded`Z;d S)vRequestaRepresents the non-IO parts of a HTTP request, including the method, URL info, and headers. This class is not meant for general use. It should only be used when implementing WSGI, ASGI, or another HTTP application spec. Werkzeug provides a WSGI implementation at :cls:`werkzeug.wrappers.Request`. :param method: The method the request was made with, such as ``GET``. :param scheme: The URL scheme of the protocol the request used, such as ``https`` or ``wss``. :param server: The address of the server. ``(host, port)``, ``(path, None)`` for unix sockets, or ``None`` if not known. :param root_path: The prefix that the application is mounted under. This is prepended to generated URLs, but is not part of route matching. :param path: The path part of the URL after ``root_path``. :param query_string: The part of the URL after the "?". :param headers: The headers received with the request. :param remote_addr: The address of the client sending the request. .. versionchanged:: 3.0 The ``charset``, ``url_charset``, and ``encoding_errors`` attributes were removed. .. versionadded:: 2.0 ztype[MultiDict[str, t.Any]]parameter_storage_classdict_storage_classztype[list[t.Any]]list_storage_classztype[UserAgent]user_agent_classNzlist[str] | None trusted_hostsmethodstrschemeservertuple[str, int | None] | None root_pathpath query_stringbytesheadersr remote_addr str | NonereturnNonec ||_||_||_|d|_d|dz|_||_||_ ||_ dS)N/) upperr-r/r0rstripr2lstripr3r4r6r7) selfr-r/r0r2r3r4r6r7s KC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\werkzeug/sansio/request.py__init__zRequest.__init__tsullnn   #))#..$++c*** ) &c |j}n#t$r}d|d}Yd}~nd}~wwxYwdt|jd|d|jdS)Nz(invalid URL: )< z [z]>)url Exceptiontype__name__r-)r@rHes rA__repr__zRequest.__repr__sx ((CC ( ( ('1'''CCCCCC (B4::&AAAA$+AAAAs $$MultiDict[str, str]cz|t|jddS)aThe parsed URL parameters (the part in the URL after the question mark). By default an :class:`~werkzeug.datastructures.ImmutableMultiDict` is returned from this function. This can be changed by setting :attr:`parameter_storage_class` to a different type. This might be necessary if the order of the form data is important. .. versionchanged:: 2.3 Invalid bytes remain percent encoded. Tzwerkzeug.url_quote)keep_blank_valueserrors)r(rr4decoder@s rAargsz Request.argssF++ !((**"&+      rC list[str]cd|jvr-|t|jdS|j||jgS|S)z}If a forwarded header exists this is a list of all ip addresses from the client ip to the last proxy server. zX-Forwarded-For)r6r*rr7rSs rA access_routezRequest.access_routess  , ,**!$,/@"ABB   )**D,<+=>> >&&(((rCcH|jd|jS)z+Requested path, including the query string.?)r3r4rRrSs rA full_pathzRequest.full_paths))::d/6688:::rCboolc|jdvS)zX``True`` if the request was made with a secure protocol (HTTPS or WSS). >wsshttps)r/rSs rA is_securezRequest.is_secures {...rCcZt|j|j|j|j|jS)zVThe full request URL with the scheme, host, root path, path, and query string.)r$r/hostr2r3r4rSs rArHz Request.urls, KDNDIt?P   rCcNt|j|j|j|jS)z.Like :attr:`url` but without the query string.)r$r/rar2r3rSs rAbase_urlzRequest.base_urls t{DIt~tyQQQrCcBt|j|j|jS)zuThe request URL scheme, host, and root path. This is the root that the application is accessed from. )r$r/rar2rSs rAroot_urlzRequest.root_urls t{DIt~FFFrCc6t|j|jS)z%The request URL scheme and host only.)r$r/rarSs rAhost_urlzRequest.host_urlst{DI666rCctt|j|jd|j|jS)zThe host name the request was made to, including the port if it's non-standard. Validated with :attr:`trusted_hosts`. ra)r%r/r6getr0r,rSs rAraz Request.hosts6  K))&114;@R   rCImmutableMultiDict[str, str]cd|jd}t||jS)zVA :class:`dict` with the contents of all cookies transmitted with the request.;Cookie)cls)joinr6getlistr"r))r@wsgi_combined_cookies rAcookieszRequest.cookiessE #xx (<( >???rCrc\t|jdtS)zoList of mimetypes this client supports as :class:`~werkzeug.datastructures.MIMEAccept` object. r)rr6rirrSs rAaccept_mimetypeszRequest.accept_mimetypesks$ #4<#3#3H#=#=zJJJrCr c\t|jdtS)zqList of charsets this client supports as :class:`~werkzeug.datastructures.CharsetAccept` object. zAccept-Charset)rr6rir rSs rAaccept_charsetszRequest.accept_charsetsrs% #4<#3#34D#E#E}UUUrCrcPt|jdS)zList of encodings this client accepts. Encodings in a HTTP term are compression encodings such as gzip. For charsets have a look at :attr:`accept_charset`. zAccept-Encoding)rr6rirSs rAaccept_encodingszRequest.accept_encodingsys# #4<#3#34E#F#FGGGrCrc\t|jdtS)aList of languages this client accepts as :class:`~werkzeug.datastructures.LanguageAccept` object. .. versionchanged 0.5 In previous versions this was a regular :class:`~werkzeug.datastructures.Accept` object. zAccept-Language)rr6rirrSs rAaccept_languageszRequest.accept_languagess%#4<#3#34E#F#FWWWrCrcb|jd}t|dtS)zwA :class:`~werkzeug.datastructures.RequestCacheControl` object for the incoming cache control headers. z Cache-ControlN)r6rirr)r@ cache_controls rArzRequest.cache_controls,  ((99 )-?RSSSrCr cPt|jdS)z~An object containing all the etags in the `If-Match` header. :rtype: :class:`~werkzeug.datastructures.ETags` zIf-Matchrr6rirSs rAif_matchzRequest.if_matchs" 4<++J77888rCcPt|jdS)zAn object containing all the etags in the `If-None-Match` header. :rtype: :class:`~werkzeug.datastructures.ETags` z If-None-MatchrrSs rA if_none_matchzRequest.if_none_matchs" 4<++O<<===rCdatetime | NonecPt|jdS)zThe parsed `If-Modified-Since` header as a datetime object. .. versionchanged:: 2.0 The datetime object is timezone-aware. zIf-Modified-Sincerr6rirSs rAif_modified_sincezRequest.if_modified_sinces#$,**+>??@@@rCcPt|jdS)zThe parsed `If-Unmodified-Since` header as a datetime object. .. versionchanged:: 2.0 The datetime object is timezone-aware. zIf-Unmodified-SincerrSs rAif_unmodified_sincezRequest.if_unmodified_sinces#$,**+@AABBBrCr cPt|jdS)zThe parsed ``If-Range`` header. .. versionchanged:: 2.0 ``IfRange.date`` is timezone-aware. .. versionadded:: 0.7 zIf-Range)rr6rirSs rAif_rangezRequest.if_ranges"%T\%5%5j%A%ABBBrC Range | NonecPt|jdS)z{The parsed `Range` header. .. versionadded:: 0.7 :rtype: :class:`~werkzeug.datastructures.Range` r)rr6rirSs rArangez Request.ranges""$,"2"27";";<<>>_>AAA_ACCC_CCCC_C===_= I I I_ ILLL_L"_S ! CF&5_(" F  & & &"%9OC$8' F  % % %!    X    rCr')* __future__rtypingtr urllib.parserdatastructuresrrr r r r r rrrrrrrhttprrrrrrrrrrrutilsrr r"r#r$r%r'rrCrArs""""""""""""######************""""""$$$$$$&&&&&&$$$$$$******//////++++++''''''&&&&&&""""""000000&&&&&&------(((((($$$$$$''''''%%%%%%######""""""############%%%%%%""""""o o o o o o o o o o rC