Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
èEYc@@s†ddlmZddlmZddlmZmZddlmZdZ	e
ƒZd
d
d
d
d
d
d„Z
d„Zd	„Zd
S(i(tabsolute_import(t	b64encodei(tbt
integer_types(tUnrewindableBodyErrorsgzip,deflatecC@sçi}|rRt|tƒrn't|tƒr?dj|ƒ}nt}||d<n|re||d<n|rxd|d<n|r¤dtt|ƒƒjdƒ|d<n|rÐdtt|ƒƒjdƒ|d	<n|rãd
|d<n|S(s
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    :param disable_cache:
        If ``True``, adds 'cache-control: no-cache' header.

    Example::

        >>> 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((sI/home/tvault/.virtenv/lib/python2.7/site-packages/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(tNonetrewind_bodytgetattrRtIOErrortOSErrort_FAILEDTELL(tbodytpos((sI/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/util/request.pytset_file_positionMs
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((sI/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/util/request.pyR_sN(t
__future__Rtbase64Rtpackages.sixRRt
exceptionsRRtobjectRRRRR(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/util/request.pyt<module>s		A