Repository: marmotta
Updated Branches:
  refs/heads/develop d54bb7ca2 -> a1cd1e24a


MARMOTTA-656: removed Content-Disposition header on HTML resuls


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

Branch: refs/heads/develop
Commit: a1cd1e24ad605750d7182ccaee8b181ee1a4c409
Parents: d54bb7c
Author: Sergio Fernández <wik...@apache.org>
Authored: Wed Sep 21 12:03:42 2016 +0200
Committer: Sergio Fernández <wik...@apache.org>
Committed: Wed Sep 21 12:03:42 2016 +0200

----------------------------------------------------------------------
 .../marmotta/platform/sparql/webservices/SparqlWebService.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/a1cd1e24/platform/marmotta-sparql/src/main/java/org/apache/marmotta/platform/sparql/webservices/SparqlWebService.java
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-sparql/src/main/java/org/apache/marmotta/platform/sparql/webservices/SparqlWebService.java
 
b/platform/marmotta-sparql/src/main/java/org/apache/marmotta/platform/sparql/webservices/SparqlWebService.java
index 34f0c4b..19a404d 100644
--- 
a/platform/marmotta-sparql/src/main/java/org/apache/marmotta/platform/sparql/webservices/SparqlWebService.java
+++ 
b/platform/marmotta-sparql/src/main/java/org/apache/marmotta/platform/sparql/webservices/SparqlWebService.java
@@ -532,7 +532,7 @@ public class SparqlWebService {
         
         final ResponseBuilder responseBuilder = 
Response.ok().entity(entity).header(CONTENT_TYPE, format.getMime());
         final TupleQueryResultFormat fmt = 
QueryResultIO.getWriterFormatForMIMEType(format.getMime());
-        if (fmt != null) {
+        if (fmt != null && !"html".equals(fmt.getDefaultFileExtension())) {
             responseBuilder.header("Content-Disposition", 
String.format("attachment; filename=\"%s.%s\"", 
queryType.toString().toLowerCase(), fmt.getDefaultFileExtension()));
         }
         return responseBuilder.build();

Reply via email to