� ��^c@@s�ddlmZddlmZddlmZmZddlmZdZ yddl Z Wne k ron Xe d7Z e �Zddddddd �Zd �Zd �ZdS( i(tabsolute_import(t b64encodei(tbt integer_types(tUnrewindableBodyErrors gzip,deflateNs,brcC@s�i}|rRt|t�rn't|t�r?dj|�}nt}||d>> make_headers(keep_alive=True, user_agent="Batman/1.0") {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'} >>> make_headers(accept_encoding=True) {'accept-encoding': 'gzip,deflate'} t,saccept-encodings user-agents keep-alivet connectionsBasic sutf-8t authorizationsproxy-authorizationsno-caches cache-control(t isinstancetstrtlisttjointACCEPT_ENCODINGRRtdecode(t keep_alivetaccept_encodingt user_agentt basic_authtproxy_basic_autht disable_cachetheaders((s5/tmp/pip-build-1THPZW/urllib3/urllib3/util/request.pyt make_headerss**   & cC@sk|dk rt||�nKt|dd�dk rgy|j�}Wqgttfk rct}qgXn|S(s If a position is provided, move file to that point. Otherwise, we'll attempt to record a position for future use. ttellN(tNonet rewind_bodytgetattrRtIOErrortOSErrort _FAILEDTELL(tbodytpos((s5/tmp/pip-build-1THPZW/urllib3/urllib3/util/request.pytset_file_positionZs  cC@s�t|dd�}|dk rdt|t�rdy||�Wq�ttfk r`td��q�Xn1|tkrtd��ntdt |���dS(s� Attempt to rewind body to a certain position. Primarily used for request redirects and retries. :param body: File-like object that supports seek. :param int pos: Position to seek to in file. tseeksAAn error occurred when rewinding request body for redirect/retry.sRUnable to record file position for rewinding request body during a redirect/retry.s4body_pos must be of type integer, instead it was %s.N( RRRRRRRRt ValueErrorttype(Rtbody_post body_seek((s5/tmp/pip-build-1THPZW/urllib3/urllib3/util/request.pyRls   (t __future__Rtbase64Rt packages.sixRRt exceptionsRR tbrotlit_unused_module_brotlit ImportErrortobjectRRRRR(((s5/tmp/pip-build-1THPZW/urllib3/urllib3/util/request.pyts$    B