`Content-Type` Header Processing
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript
调研方向
跟踪 /create、update-y 端点和 /query 的请求处理器,然后检查 Content-Type 和请求体的解析方式。使用缺少 header、使用不受支持的 JSON 类型,或包含空请求体或无效请求体的请求验证行为;完成的标准是每个无效情况都返回 400 和有用的消息,并且有效的 JSON 请求仍能成功,同时不会创建空对象。
由索引模型根据 Issue 内容生成。
描述
The bug is that RERUM will create an empty object in the following scenario.
Note: If you do not omit the 'Content-Type' header from this request, RERUM correctly responds with a 400 and a good message.
When a request to /create (and likely others) happens and the request does not contain "Content-Type: application/json" but the body is a valid string or empty, RERUM processes the request and creates an empty object in the database. It responds 201 with that empty object as JSON in the body, and client applications receive the 201 with the empty object.
When a request to /create, any of the update-y endpoints, or /query comes in, it MUST contain the 'Content-Type' header, the value for the header has to a supported JSON type (application/json), the body MUST NOT be empty and MUST contain valid JSON with at least on key:value pair.
If any of these conditions are not met, RERUM should respond 400 - Bad Request with as detailed of a message as is useful.
- 主要语言
- JavaScript
- 星标
- 3
- 派生
- 6
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 5
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CenterForDigitalHumanities/rerum_server_nodejs 的其他 Issue
-
bug documentation
难度 2/5 1-3 小时 新手友好度 88/100
-
backend dependencies easy
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 82/100
CenterForDigitalHumanities/rerum_server_nodejs#290 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 50/100
-
难度 3/5 1-2 天 新手友好度 74/100
查看 CenterForDigitalHumanities/rerum_server_nodejs 的全部 Issue
相似的 Issue
-
check:passed logos:add
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
component/administration domain/framework needs-triage Platform(Default) priority/low
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
semantic-release/gitlab#1032 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
agentic-workflows
难度 1/5 1 小时以内 新手友好度 85/100
githubnext/gh-aw-workshop#3933 ·
维护者通常 1 天内回复