[#boost-urls-url-normalize_path] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url.adoc[url]::normalize_path :relfileprefix: ../../../ :mrdocs: Normalize the URL path == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url.hpp#Lundefined[boost/url/url.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/url.adoc[url]& normalize_path(); ---- == Description Applies Syntax‐based normalization to the URL path. Percent‐encoding triplets are normalized to uppercase letters. Percent‐encoded octets that correspond to unreserved characters are decoded. Redundant path‐segments "." and ".." are removed. [,cpp] ---- assert( url( "http://www.example.com/a/b/../c" ).normalize_path().buffer() == "http://www.example.com/a/c" ); assert( url( "http://www.example.com/a/./b" ).normalize_path().buffer() == "http://www.example.com/a/b" ); assert( url( "http://www.example.com/%63ss" ).normalize_path().buffer() == "http://www.example.com/css" ); ---- == Exception Safety Strong guarantee. Calls to allocate may throw. == Specification * https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2[6.2.2 Syntax‐Based Normalization (rfc3986)] == Return Value `*this` [.small]#Created with https://www.mrdocs.com[MrDocs]#