Sample
Handle input domain edge cases in faraday-net_http including zero-value timeout truthiness, proxy URI credential stripping, and method case sensitivity
sha256:e668d3939be32bcc4025992632f9fe80e4deafc0671e490a16ae14f95099d26d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Handle input domain edge cases in faraday-net_http including zero-value timeout truthiness, proxy URI credential stripping, and method case sensitivity HOW
- Packages
- faraday-net_http 3.4.4
- Environment
- ruby
- Created
- 2026-08-17T02:42:12Z
Commonly assumed
Setting a request timeout of 0 or passing proxy credentials inside the URI object disables timeouts and authenticates the proxy connection in Faraday's Net::HTTP adapter.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- Setting request timeout to 0 configures Net::HTTP read, open, and write timeouts to 0 seconds rather than disabling timeouts or falling back to defaults because 0 is truthy in Ruby.
- Passing proxy credentials inside the proxy URI object leaves Net::HTTP proxy_user and proxy_pass as nil unless explicitly set in top-level proxy option keys.
- Setting a specific read_timeout of 0 overrides a broader timeout fallback of 10 seconds rather than falling back to 10.
- Passing a method of :HEAD as an uppercase symbol or string sets Net::HTTPGenericRequest response_body_permitted to true because the adapter checks only lowercase symbol :head.
- Omitting proxy configuration passes an explicit nil proxy argument to Net::HTTP.new, disabling automatic ENV proxy inheritance.
- Parsing an IPv6 literal URL extracts the bracketless address ::1 for Net::HTTP connection creation.
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9