aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-08-21 16:29:25 +0200
committerGitHub <[email protected]>2017-08-21 16:29:25 +0200
commitbd6f5f418ebb64f523fd4b6d003e5119e7ada1c7 (patch)
treeb8bf47e5908b1761a1b2adde444c7ad411618891
parentfccc4e19866442c609ddddf9d112c6c14ab20d1e (diff)
parenta76eafbd46bc51f5306d7baab123597fca1de66d (diff)
downloadmastodon.py-bd6f5f418ebb64f523fd4b6d003e5119e7ada1c7.tar.gz
Merge pull request #76 from Elizafox/master
Remove trailing slashes in base URL
-rw-r--r--mastodon/Mastodon.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 8aa741a..4012945 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1083,6 +1083,9 @@ class Mastodon:
1083 """Internal add-protocol-to-url helper""" 1083 """Internal add-protocol-to-url helper"""
1084 if not base_url.startswith("http://") and not base_url.startswith("https://"): 1084 if not base_url.startswith("http://") and not base_url.startswith("https://"):
1085 base_url = "https://" + base_url 1085 base_url = "https://" + base_url
1086
1087 # Some API endpoints can't handle extra /'s in path requests
1088 base_url = base_url.rstrip("/")
1086 return base_url 1089 return base_url
1087 1090
1088## 1091##
Powered by cgit v1.2.3 (git 2.41.0)