+
    ;&Ïj(  ã                  óø   € ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^RIHtHt ^RI	H
t
 ^RIHt ]P                  '       d   ^ RIHt ^ RIHt ]P$                  ! R4      tR	.tR
 R lt ! R R]
4      t ! R R	]4      tR# )é    )ÚannotationsN)ÚRequestÚResponse)ÚSyncByteStream)ÚBaseTransport)Ú
OptExcInfo)ÚWSGIApplicationÚ_TÚWSGITransportc               ó    € V ^8„  d   QhRRRR/# )é   Úbodyztyping.Iterable[_T]Úreturn© )Úformats   "ÚQ/opt/data/cache/scratch/pip-target-elquwxdg/lib/python/httpx2/_transports/wsgi.pyÚ__annotate__r      s   € ÷ ñ Ð%8ð Ð=Pñ ó    c                ór   € \        V 4      p V  F%  pV'       g   K  \        P                  ! V.V 4      u # 	  . # ©N)ÚiterÚ	itertoolsÚchain)r   Úchunks   & r   Ú_skip_leading_empty_chunksr      s4   € Ü�‹:€DÛˆß‰5Ü—?’? E 7¨DÓ1Ò1ñ ð €Ir   c                  ó:   € ] tR t^tR R ltR R ltR R ltRtR# )	ÚWSGIByteStreamc               ó    € V ^8„  d   QhRRRR/# )r   Úresultztyping.Iterable[bytes]r   ÚNoner   )r   s   "r   r   ÚWSGIByteStream.__annotate__   s   € ÷ :ñ :Ð5ð :¸$ñ :r   c                	óJ   € \        VR R4      V n        \        V4      V n        R# )ÚcloseN)ÚgetattrÚ_closer   Ú_result)Úselfr   s   &&r   Ú__init__ÚWSGIByteStream.__init__   s   € Ü˜f g¨tÓ4ˆŒÜ1°&Ó9ˆŽr   c               ó   € V ^8„  d   QhRR/# )r   r   ztyping.Iterator[bytes]r   )r   s   "r   r   r!   #   s   € ÷  ñ  Ð0ñ  r   c              #  	ó:   "  € V P                    R j  x€L
  R #  L5ir   )r&   ©r'   s   &r   Ú__iter__ÚWSGIByteStream.__iter__#   s   é € Ø—<‘<×Ôùs   ‚’“c               ó   € V ^8„  d   QhRR/# )r   r   r    r   )r   s   "r   r   r!   &   s   € ÷ ñ �tñ r   c                	óF   € V P                   e   V P                  4        R # R # r   )r%   r,   s   &r   r#   ÚWSGIByteStream.close&   s   € Ø�;‰;Ò"Ø�K‰KŽMñ #r   )r%   r&   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r(   r-   r#   Ú__static_attributes__r   r   r   r   r      s   † õ:õ ÷ñ r   r   c                  ó6   € ] tR t^+tRtRR R lltR R ltRtR# )	r   a£  
A custom transport that handles sending requests directly to an WSGI app.
The simplest way to use this functionality is to use the `app` argument.

```
client = httpx2.Client(app=app)
```

Alternatively, you can setup the transport instance explicitly.
This allows you to include any additional configuration arguments specific
to the WSGITransport class:

```
transport = httpx2.WSGITransport(
    app=app,
    script_name="/submount",
    remote_addr="1.2.3.4"
)
client = httpx2.Client(transport=transport)
```

Arguments:
    app: The WSGI application.
    raise_app_exceptions: Boolean indicating if exceptions in the application
        should be raised. Default to `True`. Can be set to `False` for use cases
        such as testing the content of a client 500 response.
    script_name: The root path on which the WSGI application should be mounted.
    remote_addr: A string indicating the client IP of incoming requests.
Nc               ó0   € V ^8„  d   QhRRRRRRRRRR	R
R/# )r   Úappr	   Úraise_app_exceptionsÚboolÚscript_nameÚstrÚremote_addrÚwsgi_errorsztyping.TextIO | Noner   r    r   )r   s   "r   r   ÚWSGITransport.__annotate__J   sF   € ÷ 'ñ 'àð'ð #ð'ð ð	'ð
 ð'ð *ð'ð 
ñ'r   c                	óB   € Wn         W n        W0n        W@n        WPn        R # r   )r9   r:   r<   r>   r?   )r'   r9   r:   r<   r>   r?   s   &&&&&&r   r(   ÚWSGITransport.__init__J   s!   € ð ŒØ$8Ô!Ø&ÔØ&ÔØ&Ör   c               ó    € V ^8„  d   QhRRRR/# )r   Úrequestr   r   r   r   )r   s   "r   r   r@   X   s   € ÷ 9Eñ 9E gð 9E°(ñ 9Er   c                	óŠ  aaa€ VP                  4        \        P                  ! VP                  4      pVP                  P
                  ;'       g"    R ^PRR/VP                  P                  ,          pRRRVP                  P                  RTRV P                  ;'       g    \        P                  RRR	R
RR
RVP                  RV P                  RVP                  P                  RVP                  P                  P                  R4      RVP                  P                  R\!        V4      RRRV P"                  /pVP                  '       d3   RVP$                  9  d"   \!        \'        VP                  4      4      VR&   VP$                  P(                   FW  w  rVVP                  R4      P+                  4       P-                  RR4      pVR 9  d
   RV,           pVP                  R4      WG&   KY  	  RoRoRoR!R VVV3R lllpV P/                  WH4      p	\1        V	4      p
Sf   Q hSf   Q hS'       d+   S^ ,          '       d   V P2                  '       d
   S^,          h\5        SP7                  4       ^ ,          4      pS UUu. uF'  w  r|VP9                  R4      VP9                  R4      3NK)  	  ppp\;        W½V
R7      # u uppi )"ÚhttpÚhttpsi»  zwsgi.versionzwsgi.url_schemez
wsgi.inputzwsgi.errorszwsgi.multithreadTzwsgi.multiprocessFzwsgi.run_onceÚREQUEST_METHODÚSCRIPT_NAMEÚ	PATH_INFOÚQUERY_STRINGÚasciiÚSERVER_NAMEÚSERVER_PORTÚSERVER_PROTOCOLzHTTP/1.1ÚREMOTE_ADDRzContent-LengthÚCONTENT_LENGTHÚ-Ú_ÚHTTP_Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   Ústatusr=   Úresponse_headerszlist[tuple[str, str]]Úexc_infozOptExcInfo | Noner   z$typing.Callable[[bytes], typing.Any]r   )r   s   "r   r   Ú2WSGITransport.handle_request.<locals>.__annotate__z   s0   € ÷ 		"ñ 		"Øð		"à3ð		"ð (ð		"ð 2ñ			"r   c                ó   <€ V oVoVoR  # )c                ó   € R # r   r   )rS   s   &r   Ú<lambda>ÚFWSGITransport.handle_request.<locals>.start_response.<locals>.<lambda>ƒ   s   € ™Tr   r   )rV   rW   rX   Úseen_exc_infoÚseen_response_headersÚseen_statuss   &&&€€€r   Ústart_responseÚ4WSGITransport.handle_request.<locals>.start_responsez   s   ø€ ð !ˆKØ$4Ð!Ø$ˆMÙ!Ð!r   )ÚheadersÚstream)é   r   )ÚCONTENT_TYPErQ   r   )ÚreadÚioÚBytesIOÚcontentÚurlÚportÚschemer?   ÚsysÚstderrÚmethodr<   ÚpathÚqueryÚdecodeÚhostr=   r>   rc   ÚlenÚrawÚupperÚreplacer9   r   r:   ÚintÚsplitÚencoder   )r'   rD   Ú
wsgi_inputrl   ÚenvironÚ
header_keyÚheader_valueÚkeyra   r   rd   Ústatus_codeÚvaluerc   r^   r_   r`   s   &&            @@@r   Úhandle_requestÚWSGITransport.handle_requestX   sT  ú€ Ø�‰ŒÜ—Z’Z §¡Ó0ˆ
à�{‰{×Ñ×QÐQ F¨B°¸Ð#=¸g¿k¹k×>PÑ>PÕ#Qˆà˜FØ˜wŸ{™{×1Ñ1Ø˜*Ø˜4×+Ñ+×9Ð9¬s¯z©zØ Ø Ø˜UØ˜gŸn™nØ˜4×+Ñ+Ø˜Ÿ™×)Ñ)Ø˜GŸK™K×-Ñ-×4Ñ4°WÓ=Ø˜7Ÿ;™;×+Ñ+Øœ3˜t›9Ø˜zØ˜4×+Ñ+ð
ˆð" �?�?ˆ?Ð/°w·±ÔFÜ(+¬C°·±Ó,@Ó(AˆGÐ$Ñ%Ø(/¯©×(;Ô(;Ñ$ˆJØ×#Ñ# GÓ,×2Ñ2Ó4×<Ñ<¸SÀ#ÓFˆCØÐ<Ô<Ø •m�Ø'×.Ñ.¨wÓ7ˆG‹Lñ	 )<ð ˆØ $ÐØˆ÷		"ô 		"ð —‘˜'Ó2ˆä Ó'ˆàÒ&Ð&Ð&Ø$Ò0Ð0Ð0ß˜]¨1×-Ô-°$×2K×2KÐ2KØ Õ"Ð"ä˜+×+Ñ+Ó-¨aÕ0Ó1ˆÙRgÔhÑRgÁJÀC�C—J‘J˜wÓ'¨¯©°gÓ)>Ó?ÑRgˆÑhä˜¸VÔDÐDùó is   Ê-J?)r9   r:   r>   r<   r?   )TÚ z	127.0.0.1N)r2   r3   r4   r5   Ú__doc__r(   rƒ   r6   r   r   r   r   r   +   s   † ñ÷<'÷9Eñ 9Er   )Ú
__future__r   rh   r   rn   ÚtypingÚ_modelsr   r   Ú_typesr   Úbaser   ÚTYPE_CHECKINGÚ	_typeshedr   Ú_typeshed.wsgir	   ÚTypeVarr
   Ú__all__r   r   r   r   r   r   Ú<module>r‘      sh   ðÝ "ã 	Û Û 
Û ç 'Ý #Ý à	××ÐÝ$Ý.à‡^‚^�DÓ€ð Ð
€õô
�^ô 
ôfE�Mö fEr   