Repository navigation
Incorrect HTTP Response Headers for "Accept: text/turtle" #632
Description
curl -ILH "Accept: text/turtle" https://kidehen.solidtest.space:8443/profile/card#me
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Wed, 07 Feb 2018 21:47:06 GMT
**Content-Type: text/plain; charset=utf-8**
Content-Length: 2
Connection: keep-alive
X-Powered-By: solid-server
Vary: Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate
Allow: OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
Link: <card.acl>; rel="acl", <card.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Resource>; rel="type"
WAC-Allow: user="read",public="read"
MS-Author-Via: SPARQL
Updates-Via: wss://kidehen.solidtest.space
ETag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
Strict-Transport-Security: max-age=15768000
Content-Type: text/plain; charset=utf-8 is wrong, bearing in mind what's in the actual HTTP Request
Bearing in mind:
curl -i "Accept: text/turtle" https://kidehen.solidtest.space:8443/profile/card#me
curl: (3) Illegal port number
HTTP/1.1 200 OK
X-Powered-By: solid-server
Vary: Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate
Allow: OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
Link: <card.acl>; rel="acl", <card.meta>; rel="describedBy", http://www.w3.org/ns/ldp#Resource; rel="type"
WAC-Allow: user="read",public="read"
MS-Author-Via: SPARQL
Updates-Via: wss://kidehen.solidtest.space:8443
Content-Type: text/turtle
Date: Tue, 13 Mar 2018 20:55:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Re
@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix pim: <http://www.w3.org/ns/pim/space#>.
@prefix schema: <http://schema.org/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<>
a foaf:PersonalProfileDocument ;
foaf:maker <http://id.myopenlink.net/public_home/KingsleyUyiIdehen/Public/kingsley.ttl#this> ;
foaf:primaryTopic <http://id.myopenlink.net/public_home/KingsleyUyiIdehen/Public/kingsley.ttl#this> .
<http://id.myopenlink.net/public_home/KingsleyUyiIdehen/Public/kingsley.ttl#this>
a foaf:Person ;
a schema:Person ;
foaf:name "Kingsley Idehen" ;
solid:account </> ; # link to the account uri
pim:storage </> ; # root storage
ldp:inbox </inbox/> ;
pim:preferencesFile </settings/prefs.ttl> ; # private settings/preferences
solid:publicTypeIndex </settings/publicTypeIndex.ttl> ;
solid:privateTypeIndex </settings/privateTypeIndex.ttl> .
Activity
melvincarvalho commentedon Feb 7, 2018
@kidehen thanks for raising this!
GET seems to work, but not HEAD
seeAlso chatlog
melvincarvalho commentedon Feb 7, 2018
Possible issue here
https://github.com/solid/node-solid-server/blob/master/lib/handlers/get.js#L72
melvincarvalho commentedon Feb 7, 2018
This bit may need to come before the
return next()melvincarvalho commentedon Feb 8, 2018
Light testing shows that this patch is likely to fix the issue
timbl commentedon Mar 8, 2018
An issue with etag being not the same for head and get is discussed in gitter solid/node-solid-server at March 8, 2018 1:08 PM ... In this case, Etags work on HEAD but under some circumstances not GET
RubenVerborgh commentedon Mar 8, 2018
The content-type issues will likely be solved once #643 is incorporated.
RubenVerborgh commentedon Jul 19, 2018
Will be fixed by #662.
RubenVerborgh commentedon Sep 24, 2018
Duplicate of #454, following up there.