From 12b49ff944d737a8692b9f3a98627129b3955dd3 Mon Sep 17 00:00:00 2001 From: Claus Stadler Date: Tue, 22 Oct 2024 12:00:05 +0200 Subject: [PATCH] Json content type detection in E_UrlFetch is now more lenient. --- .../org/aksw/jena_sparql_api/sparql/ext/url/E_UrlFetch.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenax-arq-parent/jenax-arq-plugins-parent/jenax-arq-plugins-bundle/src/main/java/org/aksw/jena_sparql_api/sparql/ext/url/E_UrlFetch.java b/jenax-arq-parent/jenax-arq-plugins-parent/jenax-arq-plugins-bundle/src/main/java/org/aksw/jena_sparql_api/sparql/ext/url/E_UrlFetch.java index 087908f59..e1b5dd26a 100644 --- a/jenax-arq-parent/jenax-arq-plugins-parent/jenax-arq-plugins-bundle/src/main/java/org/aksw/jena_sparql_api/sparql/ext/url/E_UrlFetch.java +++ b/jenax-arq-parent/jenax-arq-plugins-parent/jenax-arq-plugins-bundle/src/main/java/org/aksw/jena_sparql_api/sparql/ext/url/E_UrlFetch.java @@ -49,7 +49,10 @@ public class E_UrlFetch { private static final Logger logger = LoggerFactory.getLogger(E_UrlFetch.class); - public static final Pattern jsonContentTypePattern = Pattern.compile("^application/(.+\\+)?json$"); + /** Liberal pattern that checks for any content type ending in json.*/ + public static final Pattern jsonContentTypePattern = Pattern.compile("^[^/]*/([^;+]+\\+)*json\\s*(;.*)?$"); + // ^Anything without / + // ^All groups ending on '+' @Override public NodeValue exec(List args, FunctionEnv env) {