title: 407 response from proxy using python requests
body: <p>Below is the code that i used. I am using latest python <a href="https://pypi.python.org/pypi/requests" rel="nofollow">requests</a>. I am getting <code>407</code> response from the below request using <strong>python 2.7</strong>.
  And strange thing is i am getting 503 response while using <code>https</code> instead of <code>http</code> in the requests.</p>
  
  <pre><code>response = requests.get(query, proxies={'https': "https://username:password@104.247.XX.XX:80"}, headers=headers, timeout=30, allow_redirects=True)
  print response
  </code></pre>
  
  <p><strong>Output: Response [503]</strong></p>
  
  <pre><code>response = requests.get(query, proxies={'http': "http://username:password@104.247.XX.XX:80"}, headers=headers, timeout=30, allow_redirects=True)
  print response
  </code></pre>
  
  <p><strong>Output: Response [407]</strong></p>
  
  <p>But the same code is working on my amazon ec2 instance. Though i am trying to run in local machine.</p>
  
  <pre><code>import urllib2
  import urllib
  import portalocker
  import cookielib
  import requests
  
  query = 'http://google.com/search?q=wtf&amp;num=100&amp;tbs=cdr:1,cd_min:2000,cd_max:2015&amp;start=0&amp;filter=0'
  headers = {'user-agent': 'Mozilla/5.0 (X11; Linux; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Midori/0.4'}
  response = requests.get(query, proxies={'http': "http://username:password@104.247.XX.XX:80"}, headers=headers, timeout=30, allow_redirects=True)
  print response
  </code></pre>