boost::urls::static_url::normalize_authority

Normalize the URL authority

Synopsis

Declared in <boost/url/static_url.hpp>
static_url&
normalize_authority();

Description

Applies Syntax-based normalization to the URL authority.

The host is normalized to lowercase. Percent-encoding triplets are normalized to uppercase letters. Percent-encoded octets that correspond to unreserved characters are decoded.

assert( url( "http://www.Example.com" ).normalize_authority().buffer() == "http://www.example.com" ); assert( url( "http://www.%65xample.com" ).normalize_authority().buffer() == "http://www.example.com" );

Exception Safety

Strong guarantee. Calls to allocate may throw.

Specification

Return Value

*this