Skip to content

Commit

Permalink
Adding idna mapping files; #529
Browse files Browse the repository at this point in the history
  • Loading branch information
the-moisrex committed Apr 9, 2024
1 parent 769c9dd commit 2b0364e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ set(ALL_SOURCES
${LIB_INCLUDE_DIR}/uri/uri_string.hpp
${LIB_INCLUDE_DIR}/uri/authority.hpp
${LIB_INCLUDE_DIR}/uri/domain.hpp
${LIB_INCLUDE_DIR}/uri/idna/idna_mappings.hpp
${LIB_INCLUDE_DIR}/uri/idna/idna_ascii.hpp
${LIB_INCLUDE_DIR}/uri/idna/punycodes.hpp
${LIB_INCLUDE_DIR}/uri/idna/details/idna_mapping_table.hpp

${LIB_INCLUDE_DIR}/crypto/base64.hpp
${LIB_INCLUDE_DIR}/crypto/base64_url.hpp
Expand Down
2 changes: 2 additions & 0 deletions webpp/uri/idna/details/generate_idna_mapping_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ class MapTable extends TableTraits {
case this.e_disallowed:
this.bytes[this.index - 1] = end;
return true;
case this.e_mapped:
// todo: next character, maps to the next mapped character, optimization
}
return false;
})();
Expand Down
18 changes: 18 additions & 0 deletions webpp/uri/idna/idna_mappings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Created by moisrex on 4/9/24.

#ifndef WEBPP_URI_IDNA_MAPPINGS_HPP
#define WEBPP_URI_IDNA_MAPPINGS_HPP

#include "../../std/string.hpp"

namespace webpp::uri::idna {


template <istl::String OutStrT, typename Iter>
static constexpr OutStrT map(Iter beg, Iter end) {
// todo
}

} // namespace webpp::uri::idna

#endif // WEBPP_URI_IDNA_MAPPINGS_HPP

0 comments on commit 2b0364e

Please sign in to comment.