Пример
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
Кейс
- Цель
- 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
- Пакеты
- faraday-net_http 3.4.4 faraday 2.14.3 minitest 5.27.0
- Окружение
- ruby
- Создан
- 2026-08-17T01:15:51Z
Что обычно предполагают
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.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- 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
Файлы
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9