Skip to content

Draft: Upgrade to skyr::url library

grant requested to merge upgrade-uri into main

This MR upgrades Ouinet from depending on cpp-netlib/uri to the recommended replacement, cpp-netlib/url. The new library has full Unicode support and has better support for newer compilers.

There were only two usages of the network::uri library in the source code, which have fairly narrow-scope:

  • http_util.cpp - used to get hostname and port from URL (only applies to HTTP/1.0 requests which don't include a Host field)
  • util.cpp - used for decoding BT bootstrap URLs supplied to the frontend API

Via debug code, I validated that the outputs of the replacement skyr::url functions are identical to that of the old functions. However, I did not write any new test code to specifically validate these usages.

Note that three additional dependencies are required to compile the new library, libexpected-dev, librange-v3-dev, nlohmann-json3-dev. I have only tested that these are the correct packages on my local Ubuntu machine. I have added them to the Dockerfile, so if they are available in Debian 12, they should be installed in the docker image and the library should compile correctly.

Merge request reports

Loading