Methods

Assert a header value is valid.

assertValid(string $value) : void

Parameters

$value

string

Exceptions

\Zend\Http\Header\Exception\RuntimeException for invalid values

Filter a header value

filter(string $value) : string

Ensures CRLF header injection vectors are filtered.

Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal tabs are allowed in values; only one whitespace character is allowed between visible characters.

see \Zend\Http\Header\http://en.wikipedia.org/wiki/HTTP_response_splitting

Parameters

$value

string

Returns

string

Validate a header value.

isValid(string $value) : bool

Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal tabs are allowed in values; only one whitespace character is allowed between visible characters.

see \Zend\Http\Header\http://en.wikipedia.org/wiki/HTTP_response_splitting

Parameters

$value

string

Returns

bool

Private constructor; non-instantiable.

__construct()