Skip to content

Commit 1778215

Browse files
authored
Merge pull request #1064 from joachimvh/release/v5.0.0
Release/v5.0.0
2 parents be2fae3 + 7fc50a8 commit 1778215

File tree

12 files changed

+504
-314
lines changed

12 files changed

+504
-314
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@
5050
This fixes many of the old Content-Type-related bugs.
5151
_More information: https://www.w3.org/DesignIssues/HTTPFilenameMapping.html_
5252

53+
## 4.4.0
54+
55+
- Introduce a quota system. Delete the /settings/serverSide.ttl in the
56+
user's POD to disable, or edit to fit your resource constraints.
57+
58+
#### Changelog is incomplete for much of the 4.x series
59+
5360
## 4.1.0
5461

5562
- Add support for Group Access Control Lists.

CONTRIBUTORS.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributors to the solid-server npm module
2+
3+
The Solid community wants to acknowledge the hard work and dedication put in by many people, several of whom are listed below.
4+
5+
Please [let us know](https://github.com/solid/node-solid-server/edit/master/CONTRIBUTORS.md) if anyone is missing from this list, or if you wish to add yourself.
6+
7+
## Project lead
8+
- [Tim Berners-Lee](https://www.w3.org/People/Berners-Lee/)
9+
10+
## Current code contributors
11+
People with significant code contributions over the past couple of months, in alphabetical order:
12+
13+
- [Arne Hassel](http://icanhasweb.net/)
14+
- [Kjetil Kjernsmo](http://kjetil.kjernsmo.net/)
15+
- [Ruben Taelman](https://www.rubensworks.net/)
16+
17+
## Previous code contributors
18+
People with significant code contributions further in the past, in alphabetical order:
19+
20+
- [Nicola Greco](https://nicola.io/)
21+
- [Martin Martinez Rivera](https://github.com/martinmr)
22+
- [Andrei Sambra](https://deiu.me/)
23+
- [Ruben Verborgh](https://ruben.verborgh.org/)
24+
- [Dmitri Zagidulin](http://computingjoy.com/)
25+
26+
## Project contributors
27+
People who have significantly contributed to issues, testing, and/or discussions, in alphabetical order:
28+
- [Justin Bingham](https://github.com/justinwb)
29+
- [Sarven Capadisli](http://csarven.ca/)
30+
- [Melvin Carvalho](https://melvincarvalho.com/)
31+
- [Amy Guy](https://rhiaro.co.uk/)
32+
- [Kingsley Idehen](https://github.com/kidehen)
33+
34+
## Community contributors
35+
Thanks to everyone who has tried solid-server, discussed about it, created issues and/or pull requests.
36+
Your input is necessary to help Solid grow!

EXAMPLES.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

LICENSE renamed to LICENSE.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
The MIT License (MIT)
22

3-
Copyright © 2014
3+
Copyright © 2014–present Arne Hassel, Nicola Greco, Kjetil Kjernsmo,
4+
Martin Martinez Rivera, Andrei Sambra, Ruben Taelman, Ruben Verborgh,
5+
and Dmitri Zagidulin
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal
@@ -15,8 +17,7 @@ copies or substantial portions of the Software.
1517
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1618
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1719
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
22+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2223

README.md

Lines changed: 9 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ $ solid start
104104
Otherwise, if you want to use flags, this would be the equivalent
105105

106106
```bash
107-
$ solid --multiuser --port 8443 --cert /path/to/cert --key /path/to/key --root ./data
107+
$ solid start --multiuser --port 8443 --cert /path/to/cert --key /path/to/key --root ./data
108108
```
109109

110110
Your users will have a dedicated folder under `./data` at `./data/<username>.<yourdomain.tld>`. Also, your root domain's website will be in `./data/<yourdomain.tld>`. New users can create accounts on `/api/accounts/new` and create new certificates on `/api/accounts/cert`. An easy-to-use sign-up tool is found on `/api/accounts`.
@@ -286,7 +286,7 @@ for more complex ones
286286

287287
##### Simple Example
288288

289-
You can create an `solid` server ready to use using `solid.createServer(opts)`
289+
You can create a `solid` server ready to use using `solid.createServer(opts)`
290290

291291
```javascript
292292
var solid = require('solid-server')
@@ -402,64 +402,12 @@ it. It is currently adviceable to remove it or set it inactive rather
402402
than set a large quota, because the current implementation will impair
403403
write performance if there is a lot of data.
404404

405-
## Contributing
406-
407-
`solid` is has been made possible due to contributions from many individuals, these are some of the key contributors:
408-
409-
<table>
410-
<tbody>
411-
<tr>
412-
<th align="left">Tim Berners-Lee</th>
413-
<td><a href="https://github.com/timbl">GitHub/timbl</a></td>
414-
<td><a href="http://twitter.com/timberners_lee">Twitter/@timberners_lee</a></td>
415-
<td><a href="https://www.w3.org/People/Berners-Lee/card#i">WebID</a></td>
416-
</tr>
417-
<tr>
418-
<th align="left">Nicola Greco</th>
419-
<td><a href="https://github.com/nicola">GitHub/nicola</a></td>
420-
<td><a href="http://twitter.com/nicolagreco">Twitter/@nicolagreco</a></td>
421-
<td><a href="https://nicola.databox.me/profile/card#me">WebID</a></td>
422-
</tr>
423-
<tr>
424-
<th align="left">Martin Martinez Rivera</th>
425-
<td><a href="https://github.com/martinmr">GitHub/martinmr</a></td>
426-
<td></td>
427-
<td></td>
428-
</tr>
429-
<tr>
430-
<th align="left">Andrei Sambra</th>
431-
<td><a href="https://github.com/deiu">GitHub/deiu</a></td>
432-
<td><a href="http://twitter.com/deiu">Twitter/@deiu</a></td>
433-
<td><a href="https://deiu.me/profile#me">WebID</a></td>
434-
</tr>
435-
<tr>
436-
<th align="left">Dmitri Zagidulin</th>
437-
<td><a href="https://github.com/dmitrizagidulin/">GitHub/dmitrizagidulin</a></td>
438-
<td><a href="https://twitter.com/codenamedmitri">Twitter/@codenamedmitri</a></td>
439-
<td></td>
440-
</tr>
441-
<tr>
442-
<th align="left">Ruben Verborgh</th>
443-
<td><a href="https://github.com/RubenVerborgh/">GitHub/RubenVerborgh</a></td>
444-
<td><a href="https://twitter.com/RubenVerborgh">Twitter/@RubenVerborgh</a></td>
445-
<td><a href="https://ruben.verborgh.org/profile/#me">WebID</a></td>
446-
</tr>
447-
<tr>
448-
<th align="left">Kjetil Kjernsmo</th>
449-
<td><a href="https://github.com/kjetilk">GitHub/kjetilk</a></td>
450-
<td><a href="https://twitter.com/KKjernsmo">Twitter/@KKjernsmo</a></td>
451-
<td><a href="https://solid.kjernsmo.net/profile/card#me">WebID</a></td>
452-
</tr>
453-
<tr>
454-
<th align="left">Justin Bingham</th>
455-
<td><a href="https://github.com/justinwb">GitHub/justinwb</a></td>
456-
<td><a href="https://twitter.com/justinwb">Twitter/@justinwb</a></td>
457-
<td><a href="https://justin.janeirodigital.exchange/profile/card#me">WebID</a></td>
458-
</tr>
459-
</tbody>
460-
</table>
461-
462-
#### Do you want to contribute?
405+
## Contribute to Solid
406+
407+
Solid is only possible because of a large community of [contributors](https://github.com/solid/node-solid-server/blob/master/CONTRIBUTORS.md).
408+
A heartfelt thank you to everyone for all of your efforts!
409+
410+
You can help us too:
463411

464412
- [Join us in Gitter](https://gitter.im/solid/chat) to help with development or to hang out with us :)
465413
- [Create a new issue](https://github.com/solid/node-solid-server/issues/new) to report bugs
@@ -469,4 +417,4 @@ Have a look at [CONTRIBUTING.md](https://github.com/solid/node-solid-server/blob
469417

470418
## License
471419

472-
MIT
420+
[The MIT License](https://github.com/solid/node-solid-server/blob/master/LICENSE.md)

lib/handlers/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const path = require('path')
44
const debug = require('debug')('solid:index')
55
const Negotiator = require('negotiator')
66
const url = require('url')
7+
const URI = require('urijs')
78

89
async function handler (req, res, next) {
910
const indexFile = 'index.html'
@@ -20,7 +21,7 @@ async function handler (req, res, next) {
2021
}
2122
// redirect to the right container if missing trailing /
2223
if (req.path.lastIndexOf('/') !== req.path.length - 1) {
23-
return res.redirect(301, req.path + '/')
24+
return res.redirect(301, URI.joinPaths(req.path, '/').toString())
2425
}
2526

2627
if (requestedType && requestedType.indexOf('text/html') !== 0) {

lib/ldp.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const ldpContainer = require('./ldp-container')
1616
const parse = require('./utils').parse
1717
const fetch = require('node-fetch')
1818
const { promisify } = require('util')
19+
const URI = require('urijs')
1920

2021
const RDF_MIME_TYPES = new Set([
2122
'text/turtle', // .ttl
@@ -454,13 +455,13 @@ class LDP {
454455
// Verify whether the new path already exists
455456
return self.exists(host, newPath).then(
456457
// If it does, generate another one
457-
() => ensureNotExists(self, path.join(containerURI,
458-
`${uuid.v1().split('-')[0]}-${filename}`)),
458+
() => ensureNotExists(self, URI.joinPaths(containerURI,
459+
`${uuid.v1().split('-')[0]}-${filename}`).toString()),
459460
// If not, we found an appropriate path
460461
() => newPath
461462
)
462463
}
463-
return ensureNotExists(this, path.join(containerURI, filename))
464+
return ensureNotExists(this, URI.joinPaths(containerURI, filename).toString())
464465
}
465466

466467
static mimeTypeIsRdf (mimeType) {

lib/resource-mapper.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ class ResourceMapper {
9393
// Maps a given server file to a URL
9494
async mapFileToUrl ({ path, hostname }) {
9595
// Determine the URL by chopping off everything after the dollar sign
96-
const pathname = this._removeDollarExtension(path.substring(this._rootPath.length))
96+
let pathname = this._removeDollarExtension(path.substring(this._rootPath.length))
97+
pathname = this._replaceBackslashes(pathname)
9798
const url = `${this.resolveUrl(hostname)}${encodeURI(pathname)}`
9899
return { url, contentType: this._getContentTypeByExtension(path) }
99100
}
@@ -152,6 +153,10 @@ class ResourceMapper {
152153
const dollarPos = path.lastIndexOf('$')
153154
return dollarPos < 0 ? path : path.substr(0, dollarPos)
154155
}
156+
157+
_replaceBackslashes (path) {
158+
return path.replace(/\\/g, '/')
159+
}
155160
}
156161

157162
module.exports = ResourceMapper

0 commit comments

Comments
 (0)