Remove trailing slashes in base URL
The streaming API can't handle multiple slashes in the lead of a path request. This is probably a bug in Mastodon, but should be worked around here for now.
This commit is contained in:
pare
fccc4e1986
commit
a76eafbd46
S'han modificat 1 arxius amb 3 adicions i 0 eliminacions
|
@ -1083,6 +1083,9 @@ class Mastodon:
|
||||||
"""Internal add-protocol-to-url helper"""
|
"""Internal add-protocol-to-url helper"""
|
||||||
if not base_url.startswith("http://") and not base_url.startswith("https://"):
|
if not base_url.startswith("http://") and not base_url.startswith("https://"):
|
||||||
base_url = "https://" + base_url
|
base_url = "https://" + base_url
|
||||||
|
|
||||||
|
# Some API endpoints can't handle extra /'s in path requests
|
||||||
|
base_url = base_url.rstrip("/")
|
||||||
return base_url
|
return base_url
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Referencia en una nova incidència