You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/02/28 11:26:56 UTC

svn commit: r1294554 - in /incubator/jena/Jena2/Fuseki/trunk: soh src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java

Author: andy
Date: Tue Feb 28 10:26:55 2012
New Revision: 1294554

URL: http://svn.apache.org/viewvc?rev=1294554&view=rev
Log: (empty)

Modified:
    incubator/jena/Jena2/Fuseki/trunk/soh
    incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java

Modified: incubator/jena/Jena2/Fuseki/trunk/soh
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/soh?rev=1294554&r1=1294553&r2=1294554&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/soh (original)
+++ incubator/jena/Jena2/Fuseki/trunk/soh Tue Feb 28 10:26:55 2012
@@ -44,7 +44,7 @@ $mtSparqlQuery      = "application/sparq
 # Global media type table.
 $fileMediaTypes = {}
 $fileMediaTypes['ttl']   = $mtTurtle
-$fileMediaTypes['n3']    = 'text/rdf+n3application/rdf+n3'
+$fileMediaTypes['n3']    = 'text/n3; charset=utf-8'
 $fileMediaTypes['nt']    = $mtText
 $fileMediaTypes['rdf']   = $mtRDF
 $fileMediaTypes['owl']   = $mtRDF

Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java?rev=1294554&r1=1294553&r2=1294554&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java Tue Feb 28 10:26:55 2012
@@ -66,7 +66,16 @@ public class ActionBackup extends Servle
         // request.getRemoteUser() ;
         // request.getUserPrincipal() ;
 
-        final String dataset = request.getParameter("dataset") ;
+        String dataset = request.getParameter("dataset") ;
+        if ( dataset == null )
+        {
+            response.sendError(HttpSC.BAD_REQUEST_400, "Required parameter missing: ?dataset=") ;
+            return ;
+        }
+        
+        if ( ! dataset.startsWith("/") )
+            dataset="/"+dataset ;
+        
         // HttpSession session = request.getSession(true) ;
         // session.setAttribute("dataset", dataset) ;
         // session.setMaxInactiveInterval(15*60) ; // 10 mins
@@ -80,7 +89,7 @@ public class ActionBackup extends Servle
 
         DatasetRef ref = DatasetRegistry.get().get(dataset) ;
         DatasetGraph dsg = ref.dataset ;
-        final HttpAction action = new HttpAction(requestIdAlloc.incrementAndGet(), dsg, request, response, false) ;
+        HttpAction action = new HttpAction(requestIdAlloc.incrementAndGet(), dsg, request, response, false) ;
         scheduleBackup(action, dataset) ;
     }