Repository: nodeSolidServer/node-solid-server

Issue #454: HEAD doesn't set right Content-Type  or right Content-Length headers
Created: 2016-10-26T23:17:46Z
for example GET request to foo.png includes correct header
Content-Type: image/png
but HEAD request to foo.png responds with incorrect header
Content-Type: text/plain; charset=utf-8

Duplicate issue #632: Incorrect HTTP Response Headers for "Accept: text/turtle"
Created: 2018-02-07T22:19:23Z
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> .

Closing comment (2018-09-24T19:00:08Z): Duplicate of #454, following up there.