Amp\Http\Rfc7230 class Rfc7230

Summary

Properties

Methods

Methods

parseHeaders — public function parseHeaders(string $rawHeaders): array

Parses headers according to RFC 7230 and 2616.

Allows empty header values, as HTTP/1.0 allows that.

Type Parameter Description Default Value
string $rawHeaders No documentation. none
formatHeaders — public function formatHeaders(array $headers): string

Format headers in to their on-the-wire format.

Headers are always validated syntactically. This protects against response splitting and header injection attacks.

Type Parameter Description Default Value
array $headers Headers in a format as returned by {@see \Amp\Http\parseHeaders()}. none