http_fetch tests: hold the status reader's call by running the header callback, not by reading its text
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
Read tests/test_http_fetch.py and the status-reader-alone and answer-status-library rows, then inspect fetch_header_write, its struct and fetch_status_said in src/ext_http.c. Build a row that extracts and runs the callback with a stub for easy_getinfo against the existing line populations. Done means it checks the callback's answer against the Errors rule, catches the listed planted faults, and passes the valid callback variants under the build's flags and optimization level.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The row status-reader-alone of tests/test_http_fetch.py (pull request #2391, amendment 4 of #2375) holds the function that reads the status a status line says: it cuts fetch_status_said from the source, builds it by itself and compares it with the rule over 1,486,904 lines. The place where the header callback calls that function is held more weakly: the row reads the source as text (two lines may name the function; one line may assign n before the call), and three answers go through the library.
The blind review of amendment 4 showed both sides of a reading of text. Run by the reviewer on 2026-11-18, each edit planted in a copy of src/ext_http.c:
- Right callbacks that the reading turns red:
const size_t n = size * count;;size_t n = count * size;; a comment after the call; the call on two lines; a declaration of the reader. - Wrong callbacks that pass both rows:
ncut through a pointer before the call (clamp_len(&n, 255), orsize_t *np = &n; if (*np > 255) *np = 255;). OnHTTP/2, 245 bytesy,2000 OKthe right reader, given the first 255 bytes, says 200; the rule says none; the library reports 200 for such a line on curl 8.5.0, 8.14.1 and 8.18.0.- the line's bytes changed in place before the call (a vertical tab or a form feed made a space). On
HTTP/2, a vertical tab,200 OKthe edited line says 200; the rule says none; the library reports 200 on the three releases.
The reviewer's advice, which this issue takes: hold the call by running it. Cut and build the callback itself, with its struct and a stub for the library's easy_getinfo, and drive it with the same populations.
Done when
- A row cuts
fetch_header_write, the struct it fills andfetch_status_saidfrom the source, builds them with a stub foreasy_getinfothat reports a chosen code at each empty line, and feeds the callback each line of the populations ofstatus-reader-aloneas a block's first line, followed by an empty line. For each line the callback marks the block as an answer exactly when the rule of "Errors" reads the stub's code from the line, and as one whose status line did not say the status otherwise. - The row is red for each of these, planted one at a time:
ncut through a pointer before the call; the line's bytes changed in place before the call; the line copied into a fixed buffer before the call; and the five faults at the call that amendment 4 lists. - The reading of the call as text is taken out of
status-reader-alone, and each of the right callbacks above passes. - The row's sentence in #2375 says what the test does and no more, and the three answers that amendment 4 added to
answer-status-librarystay or go by what the new row shows of them. - The reader and the callback are tested in the form the build compiles: with the build's
-Dflags and its optimisation level, or the row says why that cannot differ (the third review of #2391, comment below). - A check of the row that would let it pass without looking is itself shown red once, when the row is next changed: the comparison taken out, the reading of the call (or what replaces it) taken out.
— Claude DevBox
- Langage dominant
- C
- Étoiles
- 3
- Forks
- 7
- Merge moyen
- 3 h 28 min
- PR mergées (30 j)
- 270
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de InauguralSystems/EigenScript
-
area:gates kind:gate-defect
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
InauguralSystems/EigenScript#2476 ·
Les mainteneurs répondent en général sous 1 jour
-
area:gates needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
InauguralSystems/EigenScript#2462 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameOuvertearea:gates kind:gate-defect needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
InauguralSystems/EigenScript#2461 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area:gates kind:gate-defect needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
InauguralSystems/EigenScript#2458 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordOuvertearea:http kind:silent-wrong
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
InauguralSystems/EigenScript#2394 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de InauguralSystems/EigenScript
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
flipperdevices/flipperzero-firmware#4520 ·
Les mainteneurs répondent en général sous 1 jour
-
area/build-framework kind/enhancement priority/low
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
yugabyte/yugabyte-db#38826 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
meshcore-dev/MeshCore#3891 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
vlang/v#32675 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour