Add percent_encode() to nghttp2_asio interface

This commit is contained in:
Igor Semenov 2021-12-03 16:13:41 +03:00
parent 344d300cf9
commit 0e14e8ba27
2 changed files with 7 additions and 0 deletions

View File

@ -134,6 +134,10 @@ generator_cb file_generator_from_fd(int fd) {
bool check_path(const std::string &path) { return util::check_path(path); } bool check_path(const std::string &path) { return util::check_path(path); }
std::string percent_encode(const std::string &s) {
return util::percent_encode(s);
}
std::string percent_decode(const std::string &s) { std::string percent_decode(const std::string &s) {
return util::percent_decode(std::begin(s), std::end(s)); return util::percent_decode(std::begin(s), std::end(s));
} }

View File

@ -108,6 +108,9 @@ generator_cb file_generator_from_fd(int fd);
// percent-decode was performed. // percent-decode was performed.
bool check_path(const std::string &path); bool check_path(const std::string &path);
// Performs percent-encode against string |s|.
std::string percent_encode(const std::string &s);
// Performs percent-decode against string |s|. // Performs percent-decode against string |s|.
std::string percent_decode(const std::string &s); std::string percent_decode(const std::string &s);