~ubuntu-branches/ubuntu/utopic/python-urllib3/utopic

« back to all changes in this revision

Viewing changes to .pc/01_do-not-use-embedded-python-six.patch/urllib3/util/request.py

  • Committer: Package Import Robot
  • Author(s): Daniele Tricoli
  • Date: 2014-07-07 16:09:06 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140707160906-hv2d4zrlg8u7rjby
Tags: 1.8.3-1
* New upstream release (Closes: #754090)
* debian/patches/01_do-not-use-embedded-python-six.patch
  - Refresh
* debian/patches/04_relax_nosetests_options.patch
  - Refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
 
9
9
def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
10
 
                 basic_auth=None, proxy_basic_auth=None):
 
10
                 basic_auth=None, proxy_basic_auth=None, disable_cache=None):
11
11
    """
12
12
    Shortcuts for generating request headers.
13
13
 
29
29
        auth header.
30
30
 
31
31
    :param proxy_basic_auth:
32
 
        Colon-separated username:password string for 'proxy-authorization: basic ...'
33
 
        auth header.
 
32
        Colon-separated username:password string for
 
33
        'proxy-authorization: basic ...' auth header.
 
34
 
 
35
    :param disable_cache:
 
36
        If ``True``, adds 'cache-control: no-cache' header.
34
37
 
35
38
    Example: ::
36
39
 
63
66
        headers['proxy-authorization'] = 'Basic ' + \
64
67
            b64encode(six.b(proxy_basic_auth)).decode('utf-8')
65
68
 
 
69
    if disable_cache:
 
70
        headers['cache-control'] = 'no-cache'
 
71
 
66
72
    return headers
67
 
 
68