mf LddlmZddlmZmZddlmZddlmZ dZ dZ dZ d S) )absolute_import)!MultipartInvariantViolationDefectStartBoundaryNotFoundDefect)HeaderParsingError) http_clientc |S#t$rYnwxYw |jS#t$rYnwxYw |jduS#t$rYnwxYwt d)zt 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.)isclosedAttributeErrorclosedfp ValueError)objs L/opt/imunify360/venv/lib64/python3.11/site-packages/urllib3/util/response.py is_fp_closedr s ||~~       z       v~       @ A AAs) ##. ;;A AAct|tjs/tdt |t |dd}t |dd}d}|r<|s(|}t|ttfr|}|r d|D}|s|rt||dS)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_payloadcJg|] }t|ttf|!S) isinstancerr).0defects r z)assert_header_parsing..RsD   46WX    )r unparsed_data) rhttplib HTTPMessage TypeErrorformattypegetattr is_multipartbytesstrr)headersrrrpayloads rassert_header_parsingr((s gw2 3 3T<CCDMMRRSSSgy$//G'=$77KM(##%% (!kmmG'E3<00 ( '    !   O-O  NNNNOOrcv|j}t|tr|dkS|dkS)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)_methodrintupper)responsemethods ris_response_to_headr1^s; F&#{ <<>>V ##rN) __future__r email.errorsrr exceptionsrpackages.six.movesrrrr(r1rrrr6s&&&&&&WWWWWWWW++++++777777BBB>3O3O3Ol $ $ $ $ $r