qicosmos / cinatra

modern c++(c++20), cross-platform, header-only, easy to use http framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aarch64平台有乱码,x86平台没有乱码

how0723 opened this issue · comments

commented

同样的代码在x86平台验证正常,在aarch64平台下有乱码
server.set_http_handler<GET>( "/api/test/{:value}", [](request& req, response& res) { std::string value(req.get_query_value("value")); res.set_status_and_content(status_type::ok, std::move(value)); });

commented

使用正则表达式就正常了
server.set_http_handler<GET, POST>( R"(/test1/(\d+)/test2/(\d+))", [](request &req, response &res) { std::cout << " matches[1] is : " << req.get_matches()[1] << " matches[2] is: " << req.get_matches()[2] << std::endl; res.set_status_and_content(status_type::ok, "hello world"); });

正在修复

(c++的string_view作为出参在aarch64架构存在问题,最新的pr已经修复。)

There is a problem with the aarch64 architecture of the string_view of c++ as an output parameter, and the latest pr has been fixed.

已经修复,拉master最新代码。