`http_post`: `headers` text with something after its JSON value now means no headers, without a word

未关闭 适合新手
#2,394 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
c, json

调研方向

阅读 #2375 和 #2391 中的决策,然后查看 docs/PRINCIPLES.md 的第 2 节和 docs/BUILTINS.md 中的 http_post 条目。判断格式错误的非空标头应记录为被忽略,还是报告为错误,并说明理由。更新 docs/BUILTINS.md,说明该行为,并添加一行涵盖全部三个示例文本;决策和示例均已记录时即完成。

由索引模型根据 Issue 内容生成。

描述

area:http kind:silent-wrong

Before #2391, http_post read its headers text with a reader that took the beginning of the text. With #2391 it reads the text as json_decode does. Run on both builds with a listener that records the request (2026-11-17):

headers text sent at 5b93b236 sent at 614a0498 (#2391)
{"X-A": "1"} junk X-A: 1 no X-A
{"X-A": X-A: null no X-A
{"X-A": "1"} X-A: 1 X-A: 1

#2375 decides that the text is "read as json_decode reads it" and that "text that does not parse" means no headers, as an empty text does. So #2391 follows its bar. What the bar does not say is that this is a change for a text of the first two kinds: a request with a header the program wrote now goes out without it, and nothing tells the program.

Two ways to settle it:

  1. Keep it, and name it among the changes of http_post in docs/BUILTINS.md.
  2. Raise value for a headers text that is not empty and does not parse (docs/PRINCIPLES.md, section 2: no silent wrong answers). A caller with a broken text then gets an error where it gets a request without headers today.

Done when

  • One of the two is decided here, with the reason.
  • docs/BUILTINS.md says what http_post does with a headers text that does not parse, and a row fixes it for the three texts above.

Found by the blind review of #2391. It is not a fault of that change against its bar.

— Claude DevBox

主要语言
C
星标
3
派生
7
平均合并
3 小时 30 分钟
30 天内合并 PR
264

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

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

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

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