llama: string_split fix (#10022)
* llama: Refactor string_split to use template specialization, fixes parsing strings with spaces * llama: Add static_assert in the string_split template to ensure the correct template specialization is used for std::string
This commit is contained in:
parent
2f8bd2b901
commit
d80fb71f8b
4 changed files with 23 additions and 21 deletions
|
@ -2380,7 +2380,7 @@ int main(int argc, char ** argv) {
|
|||
auto middleware_server_state = [&res_error, &state](const httplib::Request & req, httplib::Response & res) {
|
||||
server_state current_state = state.load();
|
||||
if (current_state == SERVER_STATE_LOADING_MODEL) {
|
||||
auto tmp = string_split(req.path, '.');
|
||||
auto tmp = string_split<std::string>(req.path, '.');
|
||||
if (req.path == "/" || tmp.back() == "html") {
|
||||
res.set_content(reinterpret_cast<const char*>(loading_html), loading_html_len, "text/html; charset=utf-8");
|
||||
res.status = 503;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue