CodeSampleX

サンプル

faraday 2.14.3: Prevent protocol-relative and scheme-like paths from overriding Faraday connection host and scheme during URL resolution

検証済みサンプル — gem faraday 2.14.3: Prevent protocol-relative and scheme-like paths from overriding Faraday connection host and scheme during URL resolution. ruby…

sha256:72e2806736c538d0147532cef69387084d406aeb462b05198fa2bb1b2bfb27b0

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 ruby linux x64 ruby ruby rubygems

検証実行環境

環境 コントラクト ステージ 実行日
ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-17
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-18

ケース

HOW
ゴール
Prevent protocol-relative and scheme-like paths from overriding Faraday connection host and scheme during URL resolution
パッケージ
シンボル
  • Faraday::Connection#build_exclusive_url
  • Faraday::Connection#get
  • Faraday::Connection#url_prefix
環境
ruby
作成日
2026-08-17T02:36:49Z

コントラクト

  1. assert protocol-relative paths starting with double slash retain the connection base host instead of overriding the target host
  2. assert scheme-like relative paths without leading slashes do not become opaque URIs with arbitrary schemes
  3. assert standard relative paths append to the connection url_prefix path directory
  4. assert absolute paths starting with a single slash replace only the path component while preserving host and scheme
  5. assert fully qualified absolute HTTP and HTTPS URLs explicitly override the base host and scheme
  6. assert query parameters passed during URL resolution append to the normalized connection URL without altering host boundaries
  7. assert test adapter requests with protocol-relative paths route under the connection base host rather than an external target

ファイル

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • src/url_resolver.rb
  • test/contract.rb

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed