mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
Merge branch 'main' into versions/4.0.0
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user