Skip to content

Inconsistent headers returned on 304 not modified #1959

@jaxoncreed

Description

@jaxoncreed

Environment

  • Server version: 7.1.3
  • Node.js version: v20.17.0
  • npm version: 10.8.2

Description

Performing a request that returns a 304 not modified has different headers than the initial 200 request.

For example HEAD http://localhost:3000/jackson/ returns

HTTP/1.1 200 OK
Vary: Accept,Authorization,Origin
X-Powered-By: Community Solid Server
Accept-Ranges: bytes
Access-Control-Allow-Origin: http://localhost:19000
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Accept-Patch,Accept-Post,Accept-Put,Allow,Content-Range,ETag,Last-Modified,Link,Location,Updates-Via,WAC-Allow,Www-Authenticate
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: */*
Content-Type: text/turtle
Link: <http://www.w3.org/ns/pim/space#Storage>; rel="type"
Link: <http://www.w3.org/ns/ldp#Container>; rel="type"
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"
Link: <http://localhost:3000/jackson/.meta>; rel="describedby"
Link: <http://localhost:3000/.notifications/StreamingHTTPChannel2023/http%3A%2F%2Flocalhost%3A3000%2Fjackson%2F>; rel="http://www.w3.org/ns/solid/terms#updatesViaStreamingHttp2023"
Link: <http://localhost:3000/jackson/.acl>; rel="acl"
Link: <http://localhost:3000/jackson/.well-known/solid>; rel="http://www.w3.org/ns/solid/terms#storageDescription"
Last-Modified: Tue, 15 Oct 2024 21:54:12 GMT
ETag: "1729029252000-text/turtle"
WAC-Allow: user="append control read write",public="read"
Date: Tue, 22 Oct 2024 20:18:46 GMT
Connection: keep-alive
Keep-Alive: timeout=5

But then perform the request a second time and these are the headers:

HTTP/1.1 304 Not Modified
Vary: Accept,Authorization,Origin
X-Powered-By: Community Solid Server
Accept-Ranges: bytes
Access-Control-Allow-Origin: http://localhost:19000
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Accept-Patch,Accept-Post,Accept-Put,Allow,Content-Range,ETag,Last-Modified,Link,Location,Updates-Via,WAC-Allow,Www-Authenticate
Content-Type: application/json
Link: <http://localhost:3000/jackson/.meta>; rel="describedby"
Link: <http://localhost:3000/.notifications/StreamingHTTPChannel2023/b0>; rel="http://www.w3.org/ns/solid/terms#updatesViaStreamingHttp2023"
Link: <http://localhost:3000/jackson/.acl>; rel="acl"
ETag: "1729029252000-text/turtle"
WAC-Allow: user="append control read write",public="read"
Date: Tue, 22 Oct 2024 20:19:09 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Notice that there are fewer "link" headers, and most importantly the "storage" header isn't available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions