JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
ensure_correct_media_type does not set response Content-Type to application/vnd.api+json
未关闭
还没有人认领这个 Issue。
Type: Bug
- 主要语言
- Ruby
- 星标
- 2.3k
- 派生
- 546
- PR 合并指标
- 30 天内没有已合并 PR
描述
I noticed that when the ensure_correct_media_type before_action is run, and validation fails (Content-Type is not application/vnd.api+json, that the response from the server has a Content-Type header set to application/json. According to the spec, shouldn't this failed validation also return a Content-Type header of application/vnd.api+json?
Thanks ahead of time for the help.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
定位 ensure_correct_media_type before_action,并跟踪由于 Content-Type 不是 application/vnd.api+json 而导致验证失败时构建的响应。检查现有的响应处理和测试(如果有)。当验证失败时返回带有 JSON:API 规范所要求的 application/vnd.api+json Content-Type 的响应,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rails, ruby
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100