Closed yayamamo closed 4 years ago
This is not expected behavior. I will try to replicate it locally and find out why this is happening.
Ah. So this may just be a case of poor documentation. To get the service description (and to query the endpoint), you should be using http://localhost:5000/sparql
, not http://localhost:5000/
. Let me know if that resolves your issues and I'll try to update the docs to be more explicit.
Thank you for your quick response. Now I can get Service Description, but it seems a request comes to the server twice while I issue it once.
% curl -H 'Accept: application/rdf+xml' -X GET http://localhost:5000/sparql
This single command makes the following log at the server.
127.0.0.1 - - [14/Oct/2020:14:07:15 +0900] "GET /sparql HTTP/1.1" 200 6170 "-" "curl/7.64.1"
127.0.0.1 - - [14/Oct/2020:14:07:15 +0900] "GET /sparql HTTP/1.1" 200 6170 "-" "curl/7.64.1"
The example endpoint.psgi file shows how to configure the AccessLog. However, the plackup
tool also configures an access log by default. If you intend to use plackup
, you can replace the builder { … }
block at the end of that file with just $app
.
Thank you. It works.
I use Plack 1.0047 and RDF::Endpont 0.10 on Perl 5.32.0 (macOS Catalina / CentOS7). When launching
plackup endpoint.psgi
and accessing bycurl http://localhost:5000/
, I got the following response.curl: (18) transfer closed with 160 bytes remaining to read
(Catalina)curl: (18) transfer closed with 46 bytes remaining to read
(CentOS7)Is this an expected behavior? I assume I get a service description.