On 15/09/15 22:15, Roberto García wrote:
(Jena version?)
2.13.0
OK - Thanks
So what is the target system?
What does
http://openphacts-8.cloud.anzonow.com:8080
use for HTTP?
Wikipedia implies it is required for HTTP 1.1:
https://en.wikipedia.org/wiki/Chunked_transfer_encoding
[[
For version 1.1 of the HTTP protocol, the chunked transfer mechanism is
considered to be always and anyways acceptable,
]]
As far as I can see, this is the default setup for HTTP components 4.2.6
when sending an entity without knowing it's length. Either
Content-length is set or chunked encoding is used. It's not
controllable as far as I can see.
Jena tries not to print to a buffer to find the length - some data
formats naturally stream.
Andy
Which direction is the chunk encoding? Sending RDF to the server or
receiving RDF from the server?
Sending to the server.
As far as I can see, it's not set by Jena code. Jena uses Apache
HttpComponents so it might be the default there somewhere, though on a
quick scan, the default is off.
There are two related places: the Entity used to construct the body to
send and the HTTP request to retrieve data. Do you have trace of the HTTP
request?
So this is a call of add(String graphUri, Model data)?
Odd:
POST /runQuery.html?graph=http%3A%... HTTP/1.1
...
"query"? ".html"? Just based on this, is that a Graph Store Protocol
endpoint?
...
01:34:00.669 [main] DEBUG org.apache.http.headers - >> POST /runQuery
.html?graph=http%3A%... HTTP/1.1
01:34:00.669 [main] DEBUG org.apache.http.headers - >> User-Agent:
Apache-Jena-ARQ/2.13.0
01:34:00.669 [main] DEBUG org.apache.http.headers - >> Transfer-Encoding:
chunked
01:34:00.669 [main] DEBUG org.apache.http.headers - >> Content-Type:
application/rdf+xml
01:34:00.669 [main] DEBUG org.apache.http.headers - >> Host: sparql
.demo.com:8080 <http://openphacts-8.cloud.anzonow.com:8080/>
01:34:00.669 [main] DEBUG org.apache.http.headers - >> Connection:
Keep-Alive
01:34:00.694 [main] DEBUG org.apache.http.wire - >> "2000[\r][\n]"
01:34:00.694 [main] DEBUG org.apache.http.wire - >> "<rdf:RDF[\n]"
...
And for the response:
...
01:34:02.755 [main] DEBUG org.apache.jena.riot.web.HttpOp - [1] 400 Bad
Request
01:34:02.757 [main] DEBUG org.apache.http.wire - << "<html>[\n]"
01:34:02.757 [main] DEBUG org.apache.http.wire - << "<body>[\n]"
01:34:02.757 [main] DEBUG org.apache.http.wire - << "<h1>Error
Encountered:</h1>[\n]"
01:34:02.757 [main] DEBUG org.apache.http.wire - << "Error - detected at
line 0 (char 0) near '2000': syntax error - syntax error[\n]"
01:34:02.757 [main] DEBUG org.apache.http.wire - << "</body>[\n]"
01:34:02.757 [main] DEBUG org.apache.http.wire - << "</html>[\n]"
...
Andy
For a Graph Store Protocol request I see the request as being 9thisis from
"fuseki1 -v"
GET http://localhost:3030/ds/data?default
Accept
text/turtle,application/n-triples;q=0.9,application/ld+json;q=0.8,application/rdf+xml;q=0.7,*/*;q=0.5
Connection keep-alive
User-Agent Apache-Jena-ARQ/3.0.1-SNAPSHOT
Host localhost:3030
Get: Content-Type=text/turtle, Charset=null => Turtle
Content-Type text/turtle
Server Fuseki (1.3.1-SNAPSHOT)
Access-Control-Allow-Origin *
Vary Accept,Accept-Encoding,Accept-Charset