mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 16:51:00 +00:00
Also catch empty host-meta
This commit is contained in:
parent
a7bbbb5663
commit
4339b09dd4
1 changed files with 1 additions and 1 deletions
|
@ -576,7 +576,7 @@ class Identity(StatorModel):
|
||||||
# In the case of anything other than a success, we'll still try
|
# In the case of anything other than a success, we'll still try
|
||||||
# hitting the webfinger URL on the domain we were given to handle
|
# hitting the webfinger URL on the domain we were given to handle
|
||||||
# incorrectly setup servers.
|
# incorrectly setup servers.
|
||||||
if response.status_code == 200:
|
if response.status_code == 200 and response.content.strip():
|
||||||
tree = etree.fromstring(response.content)
|
tree = etree.fromstring(response.content)
|
||||||
template = tree.xpath(
|
template = tree.xpath(
|
||||||
"string(.//*[local-name() = 'Link' and @rel='lrdd']/@template)"
|
"string(.//*[local-name() = 'Link' and @rel='lrdd']/@template)"
|
||||||
|
|
Loading…
Reference in a new issue