|
Boost : |
From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2021-10-14 07:34:48
Le 2021-10-13 16:54, Vinnie Falco a écrit :
> On Tue, Oct 12, 2021 at 11:24 PM Julien Blanc via Boost
>> And then there's the issue of the '/' character in
>> set_path if you take unencoded strings (not sure how this should be
>> handled...)
>
> Well, there's not much of an issue there. set_path() treats slashes as
> segment separators. If that's not what you want, you can set the
> individual unencoded segments through the container returned by
> url::segments(). The same goes for the query parameters (call
> url::params()).
I'm not at ease with that. If i build a mailto: uri, and call set_path
with a email address containing a / character in it (such as
valid/email_at_[hidden]), it will result in a uri containing two
segments, which is nonsense for a mailto scheme (and obviously not what
i expected).
I understand the api is fitted toward web uris, but i see there a
potential for hard to find bugs due to api misuse. Maybe it's just the
naming that needs to be improved.
Regards,
Julien
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk