Ë ZuÍ…eƒ½÷ãón—dZddlZgd¢ZGd„d«Zd„Zd„Zd d„Zd „Zd „Zhd £jZ d „Z y)z$Miscellaneous WSGI-related UtilitieséN)Ú FileWrapperÚ guess_schemeÚapplication_uriÚ request_uriÚshift_path_infoÚsetup_testing_defaultscó$—eZdZdZdd„Zd„Zd„Zy)rz1Wrapper to convert file-like objects to iterablescó\—||_||_t|d«r|j|_yy)NÚclose)ÚfilelikeÚblksizeÚhasattrr )Úselfr r s ú#/usr/lib/python3.12/wsgiref/util.pyÚ__init__zFileWrapper.__init__s*€Ø ˆŒ ؈Œ Ü �8˜GÔ $Ø!Ÿ™ˆD�Jð %ócó—|S©N©)rs rÚ__iter__zFileWrapper.__iter__s€Øˆ rcó`—|jj|j«}|r|St‚r)r Úreadr Ú StopIteration)rÚdatas rÚ__next__zFileWrapper.__next__s(€Ø�}‰}×!Ñ! $§,¡,Ó/ˆÙ ؈KÜÐrN)i )Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrrrr s„Ù;ó(ò órrcó,—|jd«dvryy)zMReturn a guess for whether 'wsgi.url_scheme' should be 'http' or 'https' ÚHTTPS)ÚyesÚonÚ1ÚhttpsÚhttp)Úget)Úenvirons rrrs€ð‡{�{�7ÓÐ/Ñ/Øàrcó—|ddz}ddlm}|jd«r ||dz }n7||dz }|ddk(r|dd k7r|d |dzz }n|dd k7r |d |dzz }|||jd «xsd d¬«z }|S)z@Return the application's base URI (no PATH_INFO or QUERY_STRING)úwsgi.url_schemez://r©ÚquoteÚ HTTP_HOSTÚ SERVER_NAMEr%Ú SERVER_PORTÚ443Ú:Ú80Ú SCRIPT_NAMEÚ/Úlatin1)Úencoding)Ú urllib.parser,r')r(Úurlr,s rrr%s³€à Ð#Ñ $ UÑ *€CÝ"à‡{�{�;ÔØ ˆw�{Ñ#Ñ#‰à ˆw�}Ñ%Ñ%ˆà Ð$Ñ %¨Ò 0Ø�}Ñ%¨Ò.Ø�s˜W ]Ñ3Ñ3Ñ3‘à�}Ñ%¨Ò-Ø�s˜W ]Ñ3Ñ3Ñ3�à‰5�—‘˜]Ó+Ò2¨s¸XÔ FÑF€CØ €JrcóØ—t|«}ddlm}||jdd«dd¬«}|jd«s ||d d z }n||z }|r|jd «r |d |d zz }|S) zBReturn the full request URI, optionally including the query stringrr+Ú PATH_INFOÚz/;=,r5)Úsafer6r3éNÚ QUERY_STRINGÚ?)rr7r,r')r(Ú include_queryr8r,Ú path_infos rrr9su€ä ˜'Ó "€CÝ"Ù�g—k‘k +¨bÓ1¸ÈÔR€IØ �;‰;�}Ô %Ø ˆy˜˜ˆ}Ñ‰à ˆyш٘Ÿ™ ^Ô4Ø ˆs�W˜^Ñ,Ñ,Ñ,ˆØ €Jrcó —|jdd«}|sy|jd«}|ddD�cgc] }|sŒ|dk7sŒ |‘Œc}|dd|d}|d=|jdd«}tj|dz|z«}|j d«r|dd}|s|j d«s|dz }||d<dj |«|d<|dk(rd}|Scc}w) aZShift a name from PATH_INFO to SCRIPT_NAME, returning it If there are no remaining path segments in PATH_INFO, return None. Note: 'environ' is modified in-place; use a copy if you need to keep the original PATH_INFO or SCRIPT_NAME. Note: when PATH_INFO is just a '/', this returns '' and appends a trailing '/' to SCRIPT_NAME, even though empty path segments are normally ignored, and SCRIPT_NAME doesn't normally end in a '/'. This is intentional behavior, to ensure that an application can tell the difference between '/x' and '/x/' when traversing to objects. r:r;Nr4r=éÿÿÿÿÚ.r3)r'ÚsplitÚ posixpathÚnormpathÚendswithÚjoin)r(rAÚ path_partsÚpÚnameÚ script_names rrrFs÷€ð— ‘ ˜K¨Ó+€IÙ Øà—‘ Ó%€JØ#-¨a°Ñ#3ÓFÑ#3˜a²q¸QÀ#»XšÐ#3ÑF€Jˆq�ÐØ �a‰=€DØ�1ˆ à—+‘+˜m¨BÓ/€KÜ×$Ñ$ [°¡_°TÑ%9Ó:€KØ×јCÔ Ø! # 2Ð&ˆ Ù ˜ ×,Ñ,¨SÔ1Ø�sш à(€GˆMÑØ ŸX™X jÓ1€GˆKÑð ˆS‚yØˆØ €Kùò+Gs®C ¶C ¼C có�—|jdd«|jdd«|jd|d«|jdd«d|vr(d |vr$|jdd «|jd d «|jd d «|jdd«|jdd«|jdd«ddlm}m}|jd|««|jd|««|jdt |««|ddk(r|jdd«y|ddk(r|jdd«yy)a:Update 'environ' with trivial defaults for testing purposes This adds various parameters required for WSGI, including HTTP_HOST, SERVER_NAME, SERVER_PORT, REQUEST_METHOD, SCRIPT_NAME, PATH_INFO, and all of the wsgi.* variables. It only supplies default values, and does not replace any existing settings for these variables. This routine is intended to make it easier for unit tests of WSGI servers and applications to set up dummy environments. It should *not* be used by actual WSGI servers or applications, since the data is fake! r.z 127.0.0.1ÚSERVER_PROTOCOLzHTTP/1.0r-ÚREQUEST_METHODÚGETr3r:r;r4z wsgi.version)r=rz wsgi.run_oncerzwsgi.multithreadzwsgi.multiprocess)ÚStringIOÚBytesIOz wsgi.inputz wsgi.errorsr*r&r/r2r%r0N)Ú setdefaultÚiorRrSr)r(rRrSs rrros:€ð ×Ñ�} [Ô1Ø ×ÑÐ(¨Ô4à ×Ñ�{ 7¨=Ñ#9Ô:Ø ×ÑÐ'¨Ô.à˜GÑ#¨ ¸7Ñ(BØ×ј=¨Ô,Ø×ј; sÔ+à ×Ñ�~ uÔ-Ø ×Ñ�¨Ô*Ø ×ÑÐ)¨1Ô-Ø ×ÑÐ*¨AÔ.ç$Ø ×Ñ�|¡W£YÔ/Ø ×Ñ�}¡h£jÔ1Ø ×ÑÐ(¬°gÓ)>Ô?àÐ Ñ! 6Ò)Ø×ј=¨$Õ/Ø Ð"Ñ # WÒ ,Ø×ј=¨%Õ0ð -r>ú keep-aliveútransfer-encodingúproxy-authenticateúproxy-authorizationÚteÚupgradeÚtrailersÚ connectioncó4—t|j««S)z?Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header)Ú_hoppishÚlower)Ú header_names rÚ is_hop_by_hoprb�s€ä �K×%Ñ%Ó'Ó (Ð(r)T) rrFÚ__all__rrrrrrÚ __contains__r_rbrrrÚresMðÙ*ãò €÷ ñò$òó( ò'òR$1òP ÷�,ð  ó )r