Stop manually setting Host header in APIMethod
authorHarmon <Harmon758@gmail.com>
Thu, 28 Jan 2021 17:53:30 +0000 (11:53 -0600)
committerHarmon <Harmon758@gmail.com>
Thu, 28 Jan 2021 17:53:30 +0000 (11:53 -0600)
tweepy/binder.py

index 2cfde89aa9eebb691826fea279846b531415d224..2452433e591bb368a7b786e6710d03dc41124fe6 100644 (file)
@@ -71,11 +71,6 @@ def bind_api(**config):
             else:
                 self.host = api.host
 
-            # Manually set Host header to fix an issue in python 2.5
-            # or older where Host is set including the 443 port.
-            # This causes Twitter to issue 301 redirect.
-            # See Issue https://github.com/tweepy/tweepy/issues/12
-            self.headers['Host'] = self.host
             # Monitoring rate limits
             self._remaining_calls = None
             self._reset_time = None