diff libervia/backend/plugins/plugin_comp_ap_gateway/http_server.py @ 4104:58bbc100f13b

component AP gateway: fix webfinger content type
author Goffi <goffi@goffi.org>
date Wed, 28 Jun 2023 14:24:42 +0200
parents 13b1079c27ec
children 7067b0d73183
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_comp_ap_gateway/http_server.py	Tue Jun 27 15:48:15 2023 +0200
+++ b/libervia/backend/plugins/plugin_comp_ap_gateway/http_server.py	Wed Jun 28 14:24:42 2023 +0200
@@ -41,10 +41,10 @@
 from libervia.backend.memory.sqla_mapping import SubscriptionState
 
 from .constants import (
-    NS_AP, MEDIA_TYPE_AP, CONTENT_TYPE_AP, TYPE_ACTOR, TYPE_INBOX, TYPE_SHARED_INBOX,
-    TYPE_OUTBOX, TYPE_EVENT, AP_REQUEST_TYPES, PAGE_SIZE, ACTIVITY_TYPES_LOWER,
-    ACTIVIY_NO_ACCOUNT_ALLOWED, SIGN_HEADERS, HS2019, SIGN_EXP, TYPE_FOLLOWERS,
-    TYPE_FOLLOWING, TYPE_ITEM, TYPE_LIKE, TYPE_REACTION, ST_AP_CACHE
+    NS_AP, MEDIA_TYPE_AP, CONTENT_TYPE_WEBFINGER, CONTENT_TYPE_AP, TYPE_ACTOR, TYPE_INBOX,
+    TYPE_SHARED_INBOX, TYPE_OUTBOX, TYPE_EVENT, AP_REQUEST_TYPES, PAGE_SIZE,
+    ACTIVITY_TYPES_LOWER, ACTIVIY_NO_ACCOUNT_ALLOWED, SIGN_HEADERS, HS2019, SIGN_EXP,
+    TYPE_FOLLOWERS, TYPE_FOLLOWING, TYPE_ITEM, TYPE_LIKE, TYPE_REACTION, ST_AP_CACHE
 )
 from .regex import RE_SIG_PARAM
 
@@ -120,7 +120,7 @@
                 }
             ]
         }
-        request.setHeader("content-type", CONTENT_TYPE_AP)
+        request.setHeader("content-type", CONTENT_TYPE_WEBFINGER)
         request.write(json.dumps(resp).encode())
         request.finish()