Repository navigation
v2.1.6
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.