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 2011/08/31 23:32:01 UTC

svn commit: r1163832 - /incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/openjena/fuseki/servlets/SPARQL_Upload.java

Author: andy
Date: Wed Aug 31 21:32:01 2011
New Revision: 1163832

URL: http://svn.apache.org/viewvc?rev=1163832&view=rev
Log:
Make tests http specific to allow for other URI schemes as graph names.

Modified:
    incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/openjena/fuseki/servlets/SPARQL_Upload.java

Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/openjena/fuseki/servlets/SPARQL_Upload.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/openjena/fuseki/servlets/SPARQL_Upload.java?rev=1163832&r1=1163831&r2=1163832&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/openjena/fuseki/servlets/SPARQL_Upload.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/openjena/fuseki/servlets/SPARQL_Upload.java Wed Aug 31 21:32:01 2011
@@ -139,10 +139,15 @@ public class SPARQL_Upload extends SPARQ
                                 errorBadRequest("Bad IRI: "+graphName) ;
                             if ( iri.getScheme() == null )
                                 errorBadRequest("Bad IRI: no IRI scheme name: "+graphName) ;
-                            if ( iri.getRawHost() == null )
-                                errorBadRequest("Bad IRI: no host name: "+graphName) ;
-                            if ( iri.getRawPath() != null && iri.getRawPath().length() > 0 && iri.getRawPath().charAt(0) != '/' )
-                                errorBadRequest("Bad IRI: Pat does not start '/': "+graphName) ;
+                            if ( iri.getScheme().equalsIgnoreCase("http") ) 
+                            {
+                                if ( iri.getRawHost() == null )
+                                    errorBadRequest("Bad IRI: no host name: "+graphName) ;
+                                if ( iri.getRawPath() == null || iri.getRawPath().length() == 0 )
+                                    errorBadRequest("Bad IRI: no path: "+graphName) ;
+                                if ( iri.getRawPath().charAt(0) != '/' )
+                                    errorBadRequest("Bad IRI: Path does not start '/': "+graphName) ;
+                            } 
                             gn = Node.createURI(graphName) ;
                         }
                     }