url icon indicating copy to clipboard operation
url copied to clipboard

pct-encoding overloads

Open alandefreitas opened this issue 3 years ago • 4 comments

fix #417

alandefreitas avatar Sep 20 '22 02:09 alandefreitas

Codecov Report

Merging #565 (357c856) into develop (67b4444) will increase coverage by 0.01%. The diff coverage is 100.00%.

:exclamation: Current head 357c856 differs from pull request most recent head f48617d. Consider uploading reports for the commit f48617d to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #565      +/-   ##
===========================================
+ Coverage    96.81%   96.82%   +0.01%     
===========================================
  Files          139      139              
  Lines         6680     6677       -3     
===========================================
- Hits          6467     6465       -2     
+ Misses         213      212       -1     
Impacted Files Coverage Δ
...nclude/boost/url/detail/impl/any_segments_iter.ipp 100.00% <ø> (ø)
include/boost/url/detail/encode.hpp 81.81% <100.00%> (ø)
include/boost/url/detail/impl/any_params_iter.ipp 99.41% <100.00%> (ø)
include/boost/url/impl/authority_view.ipp 79.20% <100.00%> (+0.33%) :arrow_up:
include/boost/url/impl/decode.hpp 100.00% <100.00%> (+20.00%) :arrow_up:
include/boost/url/impl/encode.hpp 100.00% <100.00%> (ø)
include/boost/url/impl/url_base.ipp 99.02% <100.00%> (ø)
include/boost/url/impl/url_view_base.ipp 98.60% <100.00%> (+<0.01%) :arrow_up:
include/boost/url/decode_view.hpp 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 67b4444...f48617d. Read the comment docs.

codecov[bot] avatar Sep 20 '22 02:09 codecov[bot]

The decode overload we came up with still has a problem:

std::size_t
decode(
    char* dest,
    char const* end,
    BOOST_URL_PCT_STRING_VIEW s,
    decode_opts const& opt = {});

doesn't return result<...> because pct_string_view is always valid, but detail::decode can still return an error if the destination is too small.

alandefreitas avatar Oct 07 '22 21:10 alandefreitas

I'm working on fixing this branch please don't make changes

vinniefalco avatar Oct 09 '22 21:10 vinniefalco

patched and merged

vinniefalco avatar Oct 11 '22 00:10 vinniefalco