
    q"h                     J    S SK Jr  S SKJrJr  SSKJr  SSKJr	  S r
S rS rg	)
    )absolute_import)!MultipartInvariantViolationDefectStartBoundaryNotFoundDefect   )HeaderParsingError)http_clientc                      U R                  5       $ ! [         a     Of = f U R                  $ ! [         a     Of = f U R                  SL $ ! [         a     Of = f[	        S5      e)zd
Checks whether a given file-like object is closed.

:param obj:
    The file-like object to check.
Nz)Unable to determine whether fp is closed.)isclosedAttributeErrorclosedfp
ValueError)objs    S/var/www/html/env/lib/python3.13/site-packages/pip/_vendor/urllib3/util/response.pyis_fp_closedr   	   s}     ||~ zz  vv~  @
AAs*    
/ 
<< A 
AAc                    [        U [        R                  5      (       d#  [        SR	                  [        U 5      5      5      e[        U SS5      n[        U SS5      nSnU(       a9  U R                  5       (       d$  U" 5       n[        U[        [        45      (       a  UnU(       a/  U Vs/ s H"  n[        U[        [        45      (       a  M   UPM$     nnU(       d  U(       a	  [        XS9egs  snf )a"  
Asserts whether all headers have been successfully parsed.
Extracts encountered errors from the result of parsing headers.

Only works on Python 3.

:param http.client.HTTPMessage headers: Headers to verify.

:raises urllib3.exceptions.HeaderParsingError:
    If parsing errors are found.
z"expected httplib.Message, got {0}.defectsNget_payload)r   unparsed_data)
isinstancehttplibHTTPMessage	TypeErrorformattypegetattris_multipartbytesstrr   r   r   )headersr   r   r   payloaddefects         r   assert_header_parsingr#   (   s     gw2233<CCDMRSSgy$/G'=$7KM ##%%!mG'E3<00 ' "
!46WX ! 	 
 - NN  
s   *C-C-c                 t    U R                   n[        U[        5      (       a  US:H  $ UR                  5       S:H  $ )z
Checks whether the request of a response has been a HEAD-request.
Handles the quirks of AppEngine.

:param http.client.HTTPResponse response:
    Response to check if the originating request
    used 'HEAD' as a method.
   HEAD)_methodr   intupper)responsemethods     r   is_response_to_headr,   ^   s7     F&#{<<>V##    N)
__future__r   email.errorsr   r   
exceptionsr   packages.six.movesr   r   r   r#   r,    r-   r   <module>r3      s#    & W + 7B>3Ol$r-   