Exemple
Handle type and serialization boundaries in faraday-net_http including quoted MIME charset fallback to ASCII-8BIT, 204 empty string coercion, header collapsing, uncoerced header values, and unconfigured stream body errors
sha256:716d765eee135755f39f5ea000d4c7436d3d92916e40fbc5c275a93836ff4d6d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- Handle type and serialization boundaries in faraday-net_http including quoted MIME charset fallback to ASCII-8BIT, 204 empty string coercion, header collapsing, uncoerced header values, and unconfigured stream body errors HOW
- Paquets
- faraday-net_http 3.4.4 faraday 2.14.3 minitest 5.27.0
- Environnement
- ruby
- Créé
- 2026-08-17T01:15:51Z
Ce que l'on suppose souvent
Faraday's NetHttp adapter accurately extracts quoted MIME charset parameters to transcode response bodies, preserves nil for empty 204 bodies, and automatically stringifies non-string header values.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- assert Faraday NetHttp adapter falls back to Encoding::ASCII_8BIT when Content-Type contains a quoted charset parameter (such as charset=\"iso-8859-1\") rather than setting the parsed encoding
- assert 204 No Content response body is coerced to an empty string (\"\") instead of preserving nil
- assert multiple response headers with the same name are collapsed into a single comma-delimited string
- assert non-string request header values raise NoMethodError on strip instead of being coerced to string
- assert streaming an IO request body without explicit Content-Length or chunked Transfer-Encoding raises ArgumentError
Fichiers
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9