  
              redirect_chain = response.redirect_chain
              redirect_chain.append((url, response.status_code))
  
              # The test client doesn't handle external links,
              # but since the situation is simulated in test_client,
              # we fake things here by ignoring the netloc portion of the
              # redirected URL.
              response = self.get(path, QueryDict(query), follow=False, **extra)
 
</s> remove             response = self.get(path, QueryDict(query), follow=False)
 </s> add             response = self.get(path, QueryDict(query), follow=False, **extra)
            extra = {}
            if scheme:
                extra['wsgi.url_scheme'] = scheme

  
              redirect_chain = response.redirect_chain
              redirect_chain.append((url, response.status_code))
  
            extra = {}
            if scheme:
                extra['wsgi.url_scheme'] = scheme

              # The test client doesn't handle external links,
              # but since the situation is simulated in test_client,
              # we fake things here by ignoring the netloc portion of the
              # redirected URL.
              response = self.get(path, QueryDict(query), follow=False, **extra)
keep keep keep add keep keep keep keep keep
 Fixed #12011 -- Modified the test client to preserve the request scheme on a redirect. Thanks to tgardner for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12419 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/test/client.py