File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1580,6 +1580,8 @@ resolve(
15801580 if (ref.has_fragment ())
15811581 set_encoded_fragment (
15821582 ref.encoded_fragment ());
1583+ else
1584+ remove_fragment ();
15831585 return {};
15841586 }
15851587 if (ref.is_path_absolute ())
Original file line number Diff line number Diff line change @@ -1047,6 +1047,15 @@ struct url_test
10471047 BOOST_TEST_CSTR_EQ (u, " https:path2" );
10481048 }
10491049 }
1050+
1051+ // issue #920
1052+ {
1053+ url u (" https://www.example.org/path/index.html?a%20b=5%206&x%20y=34#frag" );
1054+ url ref (" ?asdf%20qwer=1%202%20" );
1055+ BOOST_TEST (u.resolve (ref));
1056+ BOOST_TEST_CSTR_EQ (u.buffer (), " https://www.example.org/path/index.html?asdf%20qwer=1%202%20" );
1057+ BOOST_TEST (!u.has_fragment ());
1058+ }
10501059 }
10511060
10521061 // --------------------------------------------
You can’t perform that action at this time.
0 commit comments