vendor : update cpp-httplib to 0.30.0 (#18660)

* vendor : update cpp-httplib to 0.30.0
* common : allow custom headers when downloading
This commit is contained in:
Adrien Gallouët 2026-01-08 13:53:54 +01:00 committed by GitHub
parent f2f6c88067
commit 55abc39355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 2188 additions and 546 deletions

View file

@ -1,10 +1,10 @@
#include "common.h"
#include "download.h"
#include "log.h"
#include "llama.h"
#include "mtmd.h"
#include "mtmd-helper.h"
#include "chat.h"
#include "arg.h" // for common_remote_get_content; TODO: use download.h only
#include "base64.hpp"
#include "server-common.h"
@ -779,7 +779,7 @@ static void handle_media(
// download remote image
// TODO @ngxson : maybe make these params configurable
common_remote_params params;
params.headers.push_back("User-Agent: llama.cpp/" + build_info);
params.headers.push_back({"User-Agent", "llama.cpp/" + build_info});
params.max_size = 1024 * 1024 * 10; // 10MB
params.timeout = 10; // seconds
SRV_INF("downloading image from '%s'\n", url.c_str());