curl / trurl

trurl is a command line tool for URL parsing and manipulation.
https://curl.se/trurl/
Other
3.1k stars 99 forks source link

simplify libcurl IDN detection #258

Closed vszakats closed 9 months ago

vszakats commented 9 months ago

Make it use the feature bitmask instead of walking through the list of feature strings.

This isn't future-proof of course and the feature bitmask is almost full as of curl v8.4.0. In case we need to check for a yet-to-be-added curl feature that is only available through the feature string list, we will have to reintroduce the list parsing.

Also avoid mid block variable declaration.

Ref: https://github.com/curl/trurl/pull/257#discussion_r1396470388