Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2021-10-14 10:51:04


On 10/14/21 4:15 AM, Vinnie Falco wrote:
> On Wed, Oct 13, 2021 at 5:32 PM Andrey Semashev via Boost
> <boost_at_[hidden]> wrote:
>> https:://example.com?foo=42
>>
>> should be different from
>>
>> https:://example.com/?foo=42
>
> Well... in your specific case not, because normalization of the https
> scheme inserts "/" when the path is zero length. Although this is
> scheme-specific. Generally speaking, there is always a path, it can be
> zero length. This is different from the query and fragment - which may
> or may not exist. A query can exist and be zero length, and the query
> can not exist.

Ok. But do other schemes make the same requirement? And does Boost.URL
support those?

My point is that if there is a case supported by Boost.URL where an
empty path and a path of "/" are considered distinct, Boost.URL has to
recognize and expose that distinction in its path elements sequence. For
example, an empty path would correspond to an empty sequence, and the
path of "/" would correspond to a single element sequence, with the
element being "".


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk