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

Open Beginner friendly
#2,394 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
c, json

Research direction

Read the decisions in #2375 and #2391, then review section 2 of docs/PRINCIPLES.md and the http_post entry in docs/BUILTINS.md. Decide whether malformed nonempty headers should be documented as ignored or reported as an error, giving the reason. Update docs/BUILTINS.md to state the behavior and add a row covering all three example texts; done when the decision and examples are documented.

Written by the indexing model from the issue text.

Description

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

Dominant language
C
Stars
3
Forks
7
Avg merge
3h 30m
Merged PRs (30d)
264

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InauguralSystems/EigenScript

All issues in InauguralSystems/EigenScript

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.