LegacyHeaders final class
Minn\Http\LegacyHeaders · public/minn/src/Minn/Http/LegacyHeaders.php · 60 lines
WP_Http's legacy readers, kept for plugins that still call them (probe http-classes). They read a header block the old way, and decode a chunked body with the reference's quirk. RawResponse does both properly for the engine's own requests.
Public
| static | read(array|string $headers): array# | A header block (a string, its folded lines joined, or a list of lines) read into the last status line's code and message, lower-cased headers (a repeated one as a list) and the Set-Cookie values. Each status line starts the headers over.
@return array{response: array{code: int, message: string}, headers: array<string, string|list<string>>, cookies: list<string>} | |||
| static | dechunk(string $body): string# | A chunked body decoded as the reference's WP_Http::chunkTransferDecode decodes one. The CRLF after a chunk is not stepped over, so it decodes only when chunks run into each other and a final 0 ends the body; any other shape comes back as it was. |
Nothing matches.