Skip to content

encoded_target triggers assertion with query parameters in boost 1.91 #989

@jeremiahar

Description

@jeremiahar

The following code asserts starting in boost 1.91.0:

#include <boost/url/url.hpp>
#include <string>

int main(int argc, char **argv)
{
    boost::urls::url url;
    
    url.params().set("a", "b");
    url.params().set("c", "d");

    std::string encoded_target = std::string(url.encoded_target());
    return 0;
}
/usr/local/include/boost/url/impl/url_view_base.hpp:683: boost::urls::pct_string_view boost::urls::url_view_base::encoded_target() const: Assertion `pct_string_view( impl().get(id_path, id_frag) ).decoded_size() == n' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions