Skip to content

Commit

Permalink
Enhance curl version warning (#2922)
Browse files Browse the repository at this point in the history
* Enhance curl version warning message as older curl versions have other bugs that impact the use of this client as well
  • Loading branch information
abraunegg authored Oct 22, 2024
1 parent 77364c3 commit 1efa4cf
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,25 @@ int main(string[] cliArgs) {
string curlWarningMessage = format("WARNING: Your curl/libcurl version (%s) has known HTTP/2 bugs that impact the use of this application.", curlVersion);
addLogEntry();
addLogEntry(curlWarningMessage);
addLogEntry(" Please report this to your distribution and request that they provide a newer version for your platform or upgrade this yourself.");
addLogEntry(" Please report this to your distribution and request that they provide a newer curl version for your platform or upgrade this yourself.");
addLogEntry(" Downgrading all application operations to use HTTP/1.1 to ensure maximum operational stability.");
addLogEntry(" Please read https://github.com/abraunegg/onedrive/blob/master/docs/usage.md#compatibility-with-curl for more information.");
addLogEntry();
appConfig.setValueBool("force_http_11" , true);
}
} else {
// get the curl version - a bad curl version may still be in use
string curlVersion = getCurlVersionNumeric();

// Is the version of curl or libcurl being used by the platform a known bad curl version
if (isBadCurlVersion(curlVersion)) {
// add warning message
string curlWarningMessage = format("WARNING: Your curl/libcurl version (%s) has known operational bugs that impact the use of this application.", curlVersion);
addLogEntry();
addLogEntry(curlWarningMessage);
addLogEntry(" Please report this to your distribution and request that they provide a newer curl version for your platform or upgrade this yourself.");
addLogEntry();
}
}

// If --disable-notifications has not been used, check if everything exists to enable notifications
Expand Down

0 comments on commit 1efa4cf

Please sign in to comment.