Added XML RSS as Content-Type (#62822)

pull/62837/head
Kristján Bjarni 2021-12-27 09:49:38 +00:00 committed by GitHub
parent a17fffbfc2
commit 38723b277e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ class RestSensor(RestEntity, SensorEntity):
content_type.startswith("text/xml")
or content_type.startswith("application/xml")
or content_type.startswith("application/xhtml+xml")
or content_type.startswith("application/rss+xml")
):
try:
value = json.dumps(xmltodict.parse(value))