CodeSampleX

サンプル

guzzlehttp/guzzle 8.0.2: Isolate host-only cookies without Domain attribute, truncate cross-origin redirect Referer headers to origin, restore BodySummarizer stream cursors on HTTP errors, and enforce RFC Max-Age precedence in guzzlehttp/guzzle 8

検証済みサンプル — composer guzzlehttp/guzzle 8.0.2: Isolate host-only cookies without Domain attribute, truncate cross-origin redirect Referer headers to origin…

sha256:8a42f71c27f816717701cbf1aa7699e9e2fbdbacee2794f62e0f69614c60b7b9

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

実行証拠

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

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

検証実行環境

環境 コントラクト ステージ 実行日
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

ケース

HOW
ゴール
Isolate host-only cookies without Domain attribute, truncate cross-origin redirect Referer headers to origin, restore BodySummarizer stream cursors on HTTP errors, and enforce RFC Max-Age precedence in guzzlehttp/guzzle 8
パッケージ
シンボル
  • GuzzleHttp\Cookie\CookieJar::extractCookies
  • GuzzleHttp\Cookie\SetCookie::getHostOnly
  • GuzzleHttp\Cookie\SetCookie::isExpired
  • GuzzleHttp\RedirectMiddleware
  • GuzzleHttp\BodySummarizer
  • GuzzleHttp\Psr7\UriComparator::isCrossOrigin
環境
php
作成日
2026-08-16T08:35:06Z

コントラクト

  1. assert CookieJar::extractCookies marks cookies without Domain attribute as HostOnly and prevents sending them to subdomains
  2. assert CookieJar::extractCookies marks cookies with explicit Domain attribute as not HostOnly and sends them to subdomains
  3. assert RedirectMiddleware truncates cross-origin Referer header to origin only when referer option is enabled
  4. assert RedirectMiddleware preserves full path and query in same-origin Referer header
  5. assert RedirectMiddleware completely removes Referer header on HTTPS to HTTP scheme downgrade redirects
  6. assert BodySummarizer restores response body stream cursor position after formatting error message during ClientException
  7. assert SetCookie strictly prioritizes Max-Age=0 over future Expires attribute to mark cookie as immediately expired
  8. assert UriComparator::isCrossOrigin canonicalizes IPv6 bracketed hosts and treats alternate representations as same-origin
  9. assert Client preserves explicit request method casing verbatim without automatic normalization

ファイル

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • src/GuzzleVersionSemantic.php
  • test/contract.php

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

オリジンシーダー

csx-seed