示例
Avoid RFC 3986 base_uri path stripping, json string double-encoding, getHeader array type errors, and stream EOF read traps in GuzzleHttp\Client
sha256:e6562515ed9854401063a9e342efcace883b0bb7e7314a875ead4822104844c9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Avoid RFC 3986 base_uri path stripping, json string double-encoding, getHeader array type errors, and stream EOF read traps in GuzzleHttp\Client HOW
- 包
- guzzlehttp/guzzle 8.0.2
- 环境
- php
- 创建时间
- 2026-08-16T08:33:15Z
契约
- base_uri without trailing slash strips the final path segment when resolving relative path
- base_uri with trailing slash strips all path prefix when resolving leading-slash root-relative path
- base_uri with trailing slash and relative path without leading slash preserves prefix path
- passing a pre-encoded JSON string to json option double-encodes into a quoted JSON string literal
- passing an associative array to json option correctly serializes to a JSON object
- getHeader returns an array of string header values rather than a scalar string
- getHeaderLine returns the combined comma-separated string header representation
- getBody getContents advances stream pointer to EOF returning empty string on subsequent calls
- casting getBody to string rewinds seekable stream returning full payload
- default request throws ClientException on 4xx unless http_errors is explicitly false
文件
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9