diff --git a/src/network/HttpDownloader.cpp b/src/network/HttpDownloader.cpp index 9179d5a4..44a5a543 100644 --- a/src/network/HttpDownloader.cpp +++ b/src/network/HttpDownloader.cpp @@ -58,7 +58,10 @@ HttpDownloader::DownloadError runGetWolf(const std::string& startUrl, const std: LOG_ERR("HTTP", "wolfSSL bad URL: %s", url.c_str()); return HttpDownloader::HTTP_ERROR; } - http.addHeader("User-Agent", "CrossPoint-ESP32-" CROSSPOINT_VERSION); + // setUserAgent replaces SecureHttpClient's built-in UA; addHeader would + // append a second User-Agent header, which strict servers reject (aiohttp + // answers 400 "Duplicate 'User-Agent' header found"). + http.setUserAgent("CrossPoint-ESP32-" CROSSPOINT_VERSION); if (!username.empty() && !password.empty()) { const std::string credentials = username + ":" + password; const String encoded = base64::encode(credentials.c_str());