Merge branch 'main' into versions/4.0.0

This commit is contained in:
Joachim Van Herwegen
2022-03-29 14:54:59 +02:00
39 changed files with 625 additions and 212 deletions

View File

@@ -38,7 +38,7 @@ export class PatchOperationHandler extends OperationHandler {
throw new BadRequestHttpError('PATCH requests require the Content-Type header to be set');
}
// A more efficient approach would be to have the server return metadata indicating if a resource was new
// See https://github.com/solid/community-server/issues/632
// See https://github.com/CommunitySolidServer/CommunitySolidServer/issues/632
// RFC7231, §4.3.4: If the target resource does not have a current representation and the
// PUT successfully creates one, then the origin server MUST inform the
// user agent by sending a 201 (Created) response.

View File

@@ -37,7 +37,7 @@ export class PutOperationHandler extends OperationHandler {
throw new BadRequestHttpError('PUT requests require the Content-Type header to be set');
}
// A more efficient approach would be to have the server return metadata indicating if a resource was new
// See https://github.com/solid/community-server/issues/632
// See https://github.com/CommunitySolidServer/CommunitySolidServer/issues/632
const exists = await this.store.hasResource(operation.target);
await this.store.setRepresentation(operation.target, operation.body, operation.conditions);
if (exists) {