nodeSolidServer / nodeSolidServer/node-solid-server
Globbing should return 200 OK even if empty
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.8k
- 派生
- 308
- PR 合并指标
- 30 天内没有已合并 PR
描述
Assuming I have a container named /notes in my POD and this container contains resources matching /notes/note-* I get a nice list of those resources if I do a GET of /notes/note-*.
But if the /notes container is empty and I try GET /notes/note-* I get 404 - not found.
If think that is wrong, The container is there and any attempt to get a filtered list of its content should return 200 OK since the list is there (the container exists) but it is simply empty as there are no matching resources in the container.
Returning 404 tells the client "You made a mistake - there is nothing here". But the client did not make a mistake - it simply asked for an empty list, not a missing-non-existing list.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪服务器对 /notes/note-* 等 glob 请求的 GET 处理,并比较现有资源和空容器这两种情况。确认空匹配如何转换为 404,然后添加覆盖测试,表明现有容器在没有匹配资源时会返回带有空列表的 200 OK。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100