nodeSolidServer / nodeSolidServer/node-solid-server

POST not allowed for auxiliary resources

未关闭
#1,528 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@bourgeoa 已经在做这个了。

开始于 2020年11月28日。

主要语言
JavaScript
星标
1.8k
派生
308
PR 合并指标
30 天内没有已合并 PR

描述

@csarven @michielbdejong @jeff-zucker

When a POST method request with the Slug header targets an auxiliary resource, the server MUST respond with the 403 status code and response body describing the error. [Source]

This is taken from specification.
It does not seem to fit well with : PR #1527

When a DELETE request targets storage’s root container or its associated ACL resource, the server MUST respond with the 405 status code. Server MUST exclude the DELETE method in the HTTP response header Allow in response to safe method requests [RFC7231]. [Source]

Why not use 405 for both and exclude the method from the headers response ? Is there a conflict with http specifications ?

When I look at it from the error code side it seems also easier to understand for Solid users and devs :
This is certainly a simplification.

  • 400 do not exist (resource, content-type, ...)
  • 401 user has no authorization (not logging ...)
  • 403 user is not allowed ( relates to user permission...)
  • 405 method is not allowed in this request (DELETE for root, POST for auxiliary resources, ...)
  • 409 conflict (cannot delete container with resources, cannot inserts with patch when deletes fails, cannot create a resource with the same name than an existing container, ...)
  • 415 exist but unknown (content-type mime-type is unknown, ...)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。