jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1411622 - in /jena/trunk/jena-fuseki: src-dev/dev/RunFuseki.java src/main/java/org/apache/jena/fuseki/servlets/DumpServlet.java src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
Date Tue, 20 Nov 2012 11:27:55 GMT
Author: andy
Date: Tue Nov 20 11:27:54 2012
New Revision: 1411622

URL: http://svn.apache.org/viewvc?rev=1411622&view=rev
Log:
Correct error message for no ?query
Correct dump output for body with HTML metachars

Modified:
    jena/trunk/jena-fuseki/src-dev/dev/RunFuseki.java
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/DumpServlet.java
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java

Modified: jena/trunk/jena-fuseki/src-dev/dev/RunFuseki.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src-dev/dev/RunFuseki.java?rev=1411622&r1=1411621&r2=1411622&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src-dev/dev/RunFuseki.java (original)
+++ jena/trunk/jena-fuseki/src-dev/dev/RunFuseki.java Tue Nov 20 11:27:54 2012
@@ -53,7 +53,7 @@ public class RunFuseki
     private static void main1()
     {
         FusekiCmd.main(
-                     "--update", "--mem", "--gsp", "--uber", "/ds"
+                     "--update", "--mem", "/ds"
                      
                      //"--update", "--mem", "/ds"
                      

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/DumpServlet.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/DumpServlet.java?rev=1411622&r1=1411621&r2=1411622&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/DumpServlet.java
(original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/DumpServlet.java
Tue Nov 20 11:27:54 2012
@@ -232,6 +232,9 @@ public class DumpServlet extends HttpSer
             String x = in.readLine() ;
             if ( x == null )
                 break ;
+            x = x.replaceAll("&", "&") ;
+            x = x.replaceAll("<", "&lt;") ;
+            x = x.replaceAll(">", "&gt;") ;
             pw.println(x) ;
         }
         try { in.reset() ;} catch (IOException e) { System.out.println("DumpServlet: Reset
of content failed: "+e) ; }

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java?rev=1411622&r1=1411621&r2=1411622&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
(original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
Tue Nov 20 11:27:54 2012
@@ -182,9 +182,10 @@ public abstract class SPARQL_Query exten
         
         if ( mustHaveQueryParam )
         {
-            if ( countParamOccurences(request, paramQuery) != 1 )
-                // We checked for zero already.
-                errorBadRequest("SPARQL Query: Multiple 'query=' parameters") ;
+            int N = countParamOccurences(request, paramQuery) ; 
+            
+            if ( N == 0 ) errorBadRequest("SPARQL Query: No 'query=' parameter") ;
+            if ( N > 1 ) errorBadRequest("SPARQL Query: Multiple 'query=' parameters")
;
             
             // application/sparql-query does not use a query param.
             String queryStr = request.getParameter(HttpNames.paramQuery) ;



Mime
View raw message