From 8158891655340818fdff17168457fb6b3c72b1a0 Mon Sep 17 00:00:00 2001 From: rempairamore Date: Wed, 19 Mar 2025 10:11:52 +0100 Subject: [PATCH] changing 'application/json' header to 'application/sparql-results+json' --- oc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oc.py b/oc.py index 629b42d..d63255e 100755 --- a/oc.py +++ b/oc.py @@ -877,7 +877,10 @@ def __contact_tp(self, data, is_post, content_type): if req.status_code == 200: web.header('Access-Control-Allow-Origin', '*') web.header('Access-Control-Allow-Credentials', 'true') - web.header('Content-Type', req.headers["content-type"]) + if req.headers["content-type"] == "application/json": + web.header('Content-Type', 'application/sparql-results+json') + else: + web.header('Content-Type', req.headers["content-type"]) web_logger.mes() req.encoding = "utf-8"