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

route函数中的std::string_view构造问题,导致key查询失败

blackStar1314 opened this issue · comments

image

验证:
image
建议:key 使用std::string

cinatra 保证route这里的内存是连续的,所以用string_view不会出现失效的问题,你的测试例子里面的字符串内存不是连续的,这样直接拼接是有问题的。