HumHub Documentation (unofficial)

HeaderValue
in package

FinalYes

Table of Contents

Methods

assertValid()  : void
Assert a header value is valid.
filter()  : string
Filter a header value
isValid()  : bool
Validate a header value.
__construct()  : mixed
Private constructor; non-instantiable.

Methods

assertValid()

Assert a header value is valid.

public static assertValid(string $value) : void
Parameters
$value : string
Tags
throws
RuntimeException

For invalid values.

filter()

Filter a header value

public static 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.

Parameters
$value : string
Tags
see
http://en.wikipedia.org/wiki/HTTP_response_splitting
Return values
string

isValid()

Validate a header value.

public static 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.

Parameters
$value : string
Tags
see
http://en.wikipedia.org/wiki/HTTP_response_splitting
Return values
bool

__construct()

Private constructor; non-instantiable.

private __construct() : mixed

        
On this page

Search results