solid-server 5.8.3 → 5.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  a acl:Authorization;
8
8
  acl:agent <{{webId}}>;
9
9
  acl:accessTo <./>;
10
- acl:defaultForNew <./>;
10
+ acl:default <./>;
11
11
  acl:mode acl:Read, acl:Write, acl:Control.
12
12
 
13
13
  # The public has read permissions
@@ -15,5 +15,5 @@
15
15
  a acl:Authorization;
16
16
  acl:agentClass foaf:Agent;
17
17
  acl:accessTo <./>;
18
- acl:defaultForNew <./>;
18
+ acl:default <./>;
19
19
  acl:mode acl:Read.
@@ -101,7 +101,7 @@ async function handler (req, res, next) {
101
101
  RDFs.includes(contentType) && !isHtmlResource && !ldp.suppressDataBrowser)
102
102
 
103
103
  if (useDataBrowser) {
104
- res.set('Content-Type', 'text/html')
104
+ res.setHeader('Content-Type', 'text/html')
105
105
  const defaultDataBrowser = require.resolve('mashlib/dist/databrowser.html')
106
106
  const dataBrowserPath = ldp.dataBrowserPath === 'default' ? defaultDataBrowser : ldp.dataBrowserPath
107
107
  debug(' sending data browser file: ' + dataBrowserPath)
@@ -118,6 +118,7 @@ async function handler (req, res, next) {
118
118
  let headers = {
119
119
  'Content-Type': contentType
120
120
  }
121
+
121
122
  if (contentRange) {
122
123
  headers = {
123
124
  ...headers,
@@ -125,16 +126,17 @@ async function handler (req, res, next) {
125
126
  'Accept-Ranges': 'bytes',
126
127
  'Content-Length': chunksize
127
128
  }
128
- res.statusCode = 206
129
+ res.status(206)
129
130
  }
130
131
 
131
- if (prep & isRdf(contentType) && !res.sendEvents({
132
+ if (prep && isRdf(contentType) && !res.sendEvents({
132
133
  config: { prep: prepConfig },
133
134
  body: stream,
134
135
  isBodyStream: true,
135
136
  headers
136
137
  })) return
137
- res.set(headers)
138
+
139
+ res.writeHead(res.statusCode, headers) // res.set sneds 'charset'
138
140
  return stream.pipe(res)
139
141
  }
140
142
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-server",
3
3
  "description": "Solid server on top of the file-system",
4
- "version": "5.8.3",
4
+ "version": "5.8.4",
5
5
  "author": {
6
6
  "name": "Tim Berners-Lee",
7
7
  "email": "timbl@w3.org"