샘플
Manage Guzzle sink stream persistence across intermediate redirects, error response streaming, and on_headers lifecycle aborts
sha256:1d9052aa3497cf987a30d943e2b7183d697b56cc1251f34cd5e462b4aacea0ae
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Manage Guzzle sink stream persistence across intermediate redirects, error response streaming, and on_headers lifecycle aborts HOW
- 패키지
- guzzlehttp/guzzle 8.0.2
- 환경
- php
- 생성일
- 2026-08-16T12:45:15Z
흔히 이렇게 알고 있다
Passing a stream or resource sink to a request that follows redirects writes only the final destination response body into the sink.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- assert a stream sink passed during redirected requests accumulates both intermediate redirect bodies and final response body instead of only the destination body
- assert the returned PSR-7 response body contains only the final destination body while the sink contains all hops concatenated
- assert http_errors throws a ClientException on 4xx responses but leaves the error body written to the sink stream
- assert on_headers callback is invoked on every intermediate redirect response before location following
- assert throwing inside on_headers aborts the request as ResponseException and prevents any bytes from writing to the sink
- assert same-origin redirects preserve Authorization headers while scheme downgrade redirects to http on the same host strip Authorization
파일
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/SinkRedirectBehavior.php
- test/contract.php
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9