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

Aperta Adatta ai principianti
#2,394 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, json

Direzione di ricerca

Leggi le decisioni in #2375 e #2391, poi esamina la sezione 2 di docs/PRINCIPLES.md e la voce http_post in docs/BUILTINS.md. Decidi se gli header non vuoti malformati debbano essere documentati come ignorati o come segnalati con un errore, indicando il motivo. Aggiorna docs/BUILTINS.md per specificare il comportamento e aggiungi una riga che includa tutti e tre i testi di esempio; il lavoro è completato quando la decisione e gli esempi sono documentati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C
Stelle
3
Fork
7
Merge medio
3h 30m
PR unite (30g)
264

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di InauguralSystems/EigenScript

Tutte le issue di InauguralSystems/EigenScript

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.