This commit refactors all functions so they have consistent behavior for the space-as-plus encoding option.
- any_params_iter objects store and apply the appropriate option when measuring and copying
- when the option is enabled, encoding functions encode space-as-plus and plus as %2B regardless of the charset
- normalization and comparison algorithms take into consideration special query chars whose meaning changes depending on encoding
- all params_view objects created with default options enable space-as-plus encoding
fix#903
The copy operation from a url_view_base should use the pointed implementation rather than the underlying implementation so that url_views that refer to other urls are accounted for.
fix#872
query_rule broke a grammar parse invariant by using different interpretations of the string depending on whether the reason for termination was the end of a string or a continuation with an invalid character.
fix#864
This commit includes tests for shared `recycled_ptr`s. Unreachable paths are also marked.
This is the last in a series of commits that intend to fix#828, where `recycled_ptr` had low coverage.
fix#828
This commit includes tests for the authority_view host functions when the host type is invalid.
This is a partial solution to #828, where authority_view.cpp has low coverage.
This commit includes tests for the url_base functions whose behavior is customized by static_url.
This is a partial solution to #828, where static_url.cpp has low coverage.
Latest standard implementations have been indirectly including the std::format declaration, which makes urls::format ambiguous in tests because of ADL.
Although 1317ca8c includes support for brackets in key_chars, the lack of support in query_chars made still led to errors when the the complete url is parsed at once.
fix#93
This commit changes the IP-literal rule to also accept IPv6addrz as a valid ipv6 host type. IPv6addrz includes a ZoneID at the end, delimited by an encoded "%25". The ipv6_address class is unmodified, as the mapping from the ZoneID to a std::uint32_t is dependent on the application context. The original ZoneID can be obtained from the url_view.
fix#711
Fixes#758
The parsing and measuring code didn't have explicit handling for integer
zero, and the while(v > 0) loop wouldn't execute.
Also add tests to cover both of these cases.