샘플
Handle IO request streaming, socket persistence, and response streams in faraday-net_http without unhandled ArgumentError exceptions or open stream leaks
sha256:ea9a12850f8c6125266e38da58c01e8daff93cdf5fd081a34b489c4f9d1732d6
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle IO request streaming, socket persistence, and response streams in faraday-net_http without unhandled ArgumentError exceptions or open stream leaks HOW
- 패키지
- faraday-net_http 3.4.4
- 환경
- ruby
- 생성일
- 2026-08-17T02:42:06Z
흔히 이렇게 알고 있다
Passing an IO object as a request body automatically streams the payload without explicit transfer headers and closes the stream on completion, while Faraday::Connection retains persistent TCP sockets across calls.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Passing an IO stream as a request body without an explicit Content-Length or chunked Transfer-Encoding header raises an ArgumentError, and even after successful transfer, NetHttp leaves the caller's IO stream open at EOF.
- Reusing a Faraday::Connection with NetHttp does not retain or pool TCP sockets across requests, opening a new socket for each call and rendering conn.close an effective no-op.
- Streaming a response using req.options.on_data delivers chunks during transmission but leaves response.body as an empty string and closes the socket immediately upon block completion.
- Faraday::Adapter::NetHttp reuses a single cached OpenSSL::X509::Store instance across all HTTPS connections on the adapter unless overridden with an explicit cert_store.
파일
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- lib/resource_helper.rb
- test/contract.rb
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9