Skip to content

Commit c126200

Browse files
author
ThinkThinkSyn
committed
fix url bug
1 parent 2600518 commit c126200

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/server/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4355,7 +4355,7 @@ int main(int argc, char ** argv) {
43554355
params.headers.push_back("User-Agent: llama.cpp/" + build_info);
43564356
params.max_size = 1024 * 1024 * 10; // 10MB
43574357
params.timeout = 10; // seconds
4358-
SRV_INF("downloading image from '%s'\n", url.c_str());
4358+
SRV_INF("downloading image from '%s'\n", data.c_str());
43594359
auto res = common_remote_get_content(data, params);
43604360
if (200 <= res.first && res.first < 300) {
43614361
SRV_INF("downloaded %ld bytes\n", res.second.size());
@@ -4367,7 +4367,7 @@ int main(int argc, char ** argv) {
43674367
}
43684368
} else {
43694369
// try to decode base64 image
4370-
std::vector<std::string> parts = string_split<std::string>(url, /*separator*/ ',');
4370+
std::vector<std::string> parts = string_split<std::string>(data, /*separator*/ ',');
43714371
if (parts.size() != 2) {
43724372
throw std::runtime_error("Invalid image_url.url value");
43734373
} else if (!string_starts_with(parts[0], "data:image/")) {

0 commit comments

Comments
 (0)