Amp\Http\Rfc7230 classRfc7230

Summary

Properties

Methods

Methods

parseHeaders —public functionparseHeaders(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 functionformatHeaders(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