boostorg / boostorg/url

Assigning segments_ref to segments_ref

Open
#520 4 comments 0 reactions 0 assignees View on GitHub
Design
Dominant language
C++
Stars
205
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Consider the following:
```
url u1( "/index%2Ehtm" );
url u2( "/path/to/file%2Etxt" );
segments_ref ps1 = u1.segments();
segments_ref Type ps2 = u2.segments();
ps1 = p2;
```

What should the contents of ps1 be? Well, `operator=` is documented with this effect:
```
ps1.assign( ps2.begin(), p2.end() );
```

Iterating ps2 will produce decoded segments, so ps1 will end up with
```
{ "path", "to", "file.txt" }
```

Note how "file.txt" has the escape removed. This behavior is technically correct according to our specification but is this the right thing to do?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.