title: Difference in working of python urllib2 for http and https urls
body: <p>Can someone explain to me why things are implemented the following in urllib2.</p>
  
  <p>When I pass encoded url using http it again encodes the parameters
  whereas in case of https it does not urlencode again</p>
  
  <p>so lets say the (http) call is http//:example.com?email=amit%40sethi.com the request is </p>
  
  <p><a href="http://example.com?email=amit%2540sethi.com" rel="nofollow">http://example.com?email=amit%2540sethi.com</a></p>
  
  <p>where as in case of https it is</p>
  
  <p><a href="https://example.com?email=amit%40sethi.com" rel="nofollow">https://example.com?email=amit%40sethi.com</a></p>
  
  <p>Thanks</p>
  
  <p>Edit : Adding more details </p>
  
  <p>The basic request I am making is </p>
  
  <pre><code>SF_EXTEND_RESOURCE = "https://www.superfax.in/api/voice/planchange/?"
  
  params_dict = {'username':USERNAME,
                                 'password':PASSWORD,
                                 'email':str(user.email)
                                 }
  _url = SF_EXTEND_RESOURCE + urlencode(params_dict)
  response = urllib2.urlopen(_url).read()
  </code></pre>
  
  <p>Now my problem is that when I am using http the email string is encoded twice where as that was not the case for https . I am using Python 2.6.5 on ubuntu Lucid. I am not able to understand how this is not reproducible.  </p>