jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cla...@apache.org
Subject [28/50] [abbrv] jena git commit: Workaround for JENA-940
Date Sat, 16 May 2015 08:59:10 GMT
Workaround for JENA-940

Previously SERVICE clauses in SPARQL queries explicitly set the Accept
header to only application/sparql-results+xml.  Unfortunately when
interacting with some remote services (e.g. DBPedia) it is possibly to
receive XML that causes XML parsing to fail and thus be unable to
receive/process any results.

This commit changes SERVICE to use the default Accept header for making
remote queries which prefers application/sparql-results+json ahead of
application/sparql-results+xml and so works around this problem.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/10f899e3
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/10f899e3
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/10f899e3

Branch: refs/heads/add-contract-tests
Commit: 10f899e3f1927402e7dd0ff4dbb00bd95c10efc3
Parents: 1e505a8
Author: Rob Vesse <rvesse@apache.org>
Authored: Wed May 13 14:52:55 2015 +0100
Committer: Rob Vesse <rvesse@apache.org>
Committed: Wed May 13 14:52:55 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/sparql/engine/http/Service.java   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/10f899e3/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/Service.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/Service.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/Service.java
index a573367..1a74fa2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/Service.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/Service.java
@@ -232,7 +232,6 @@ public class Service {
         // configure the query object.
         httpQuery.merge(QueryEngineHTTP.getServiceParams(uri, context));
         httpQuery.addParam(HttpParams.pQuery, query.toString());
-        httpQuery.setAccept(WebContent.contentTypeResultsXML);
         httpQuery.setAllowGZip(context.isTrueOrUndef(queryGzip));
         httpQuery.setAllowDeflate(context.isTrueOrUndef(queryDeflate));
 


Mime
View raw message