Skip to content

v2.1.6

Choose a tag to compare

@jdwx jdwx released this 03 May 23:23
· 160 commits to main since this release

The methods in Server that depend on HTTP headers need to be able to return null if the header is not present. Additional Server::http...Ex() methods have been added that throw an exception if a value is not present. All of the Server::http...() methods take an optional parameter that specifies the default to use if the relevant header is not present (defaults to null).

To "paper over" a missing header and guarantee a string, you can use (for example) $srv->httpHostEx( '' ) or $srv->httpHostEx( 'no-hostname' ) depending on requirements.