[ 
https://issues.apache.org/jira/browse/JENA-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329429#comment-16329429
 ] 

Andy Seaborne edited comment on JENA-1467 at 1/17/18 11:06 PM:
---------------------------------------------------------------

This URL {{..//login.form.ttl#registerForm}}.

This is not about sending the fragment, despite what it may look like. The low 
level HTTP code will not send a fragment.

The issue is that the Content-Type in the HTTP response is {{text/plain}}, 
which Jena ignores because a lot of things are {{text/plain}}, and it can't be 
guessed from the file extension which is hidden by the {{#registerForm}} part.

That's fixable in Jena.

{{RDFLanguages.filenameToLang(String filename)}} calling 
{{FileUtils.getFilenameExt(filename)}}

 


was (Author: andy.seaborne):
This URL {{..//login.form.ttl#registerForm}}.

This is not about sending the fragment, despite what it may look like. The low 
level HTTP code will not send a fragment.

The issue is that the Content-Type in the HTTP response is {{text/plain}}, 
which Jena ignores because a lot of things are {{text/plain}}, and it can't be 
guess from the file extension which is hidden by the {{#registerForm}} part.

That's fixable in Jena.

{{RDFLanguages.filenameToLang(String filename)}} calling 
{{FileUtils.getFilenameExt(filename)}}

 

> RDFDataMgr.loadGraph( "http://site.org/doc.ttl#anchor";) fails
> -------------------------------------------------------------
>
>                 Key: JENA-1467
>                 URL: https://issues.apache.org/jira/browse/JENA-1467
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: RIOT
>    Affects Versions: Jena 3.6.0
>         Environment: Ubuntu 17.10, probably any Environment
>            Reporter: Jean-Marc Vanel
>            Assignee: Andy Seaborne
>            Priority: Minor
>
> Riot could remove the URL anchor before sending the HTTP request.
>  It's better in Jena code than in my code :) !
> Here is an interactive session to demonstrate the problem:
> {noformat}
>  scala> import org.apache.jena.riot._
>  import org.apache.jena.riot._
> scala> RDFDataMgr.loadGraph( 
> "http://raw.githubusercontent.com/jmvanel/semantic_forms/master/scala/forms/form_specs/login.form.ttl#registerForm";)
>  ERROR StatusLogger No log4j2 configuration file found. Using default 
> configuration: logging only errors to the console. Set system property 
> 'log4j2.debug' to show Log4j2 internal initialization logging.
>  org.apache.jena.riot.RiotException: Failed to determine the content type: 
> (URI=[http://raw.githubusercontent.com/jmvanel/semantic_forms/master/scala/forms/form_specs/login.form.ttl#registerForm]
>  : stream=text/plain)
>    at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:298)
>    at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
>    at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
>    at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
>    at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:221)
>    at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:102)
>    at org.apache.jena.riot.RDFDataMgr.loadGraph(RDFDataMgr.java:353)
>    ... 42 elided
> // But this works:
>  scala> RDFDataMgr.loadGraph( 
> "http://raw.githubusercontent.com/jmvanel/semantic_forms/master/scala/forms/form_specs/login.form.ttl";)
>  res1: org.apache.jena.graph.Graph = 
> {forms:loginForm @:showProperties c9d4c3e8-9713-4d91-ac6c-4e06248956a8; 
> forms:loginForm @rdfs:label "Authentication"@en; forms:loginForm @rdfs:label 
> "Authentification"@fr; forms:loginForm @:classDomain :AuthenticationAttempt; 
> forms:loginForm @[http://www.w3.org/1999/02/22-rdf-syntax-ns#type] 
> :specification; c9d4c3e8-9713-4d91-ac6c-4e06248956a8 
> @[http://www.w3.org/1999/02/22-rdf-syntax-ns#rest] 
> 6d6ec6aa-4208-431a-a588-0fbbe7f6e335; c9d4c3e8-9713-4d91-ac6c-4e06248956a8 
> @[http://www.w3.org/1999/02/22-rdf-syntax-ns#first] :userid; 
> 8a6a4d8e-ac4f-43ef-a4c4-af6ff1fbe1d8 
> @[http://www.w3.org/1999/02/22-rdf-syntax-ns#rest] 
> [http://www.w3.org/1999/02/22-rdf-syntax-ns#nil]; 
> 8a6a4d8e-ac4f-43ef-a4c4-af6ff1fbe1d8 
> @[http://www.w3.org/1999/02/22-rdf-syntax-ns#first] :confirmPass...
> {noformat}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to