]> git.ipfire.org Git - pakfire.git/commitdiff
xfer: Send authentication headers straight away when asked to
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Aug 2024 17:23:14 +0000 (17:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Aug 2024 17:23:14 +0000 (17:23 +0000)
We don't need to check whether the server does not require
authentication first.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/xfer.c

index c532a0d90d34ae4eaa283c019c03c5c0cee24a7d..40ca7dac0a3e9e253e0a136c6b2b51ca920dc103 100644 (file)
@@ -1233,7 +1233,7 @@ int pakfire_xfer_prepare(struct pakfire_xfer* xfer, struct pakfire_progress* pro
        // Authentication
        if (xfer->auth) {
                // Request SPNEGO
-               r = curl_easy_setopt(xfer->handle, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE|CURLAUTH_ONLY);
+               r = curl_easy_setopt(xfer->handle, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE);
                if (r) {
                        CTX_ERROR(xfer->ctx, "Could not enable SPNEGO\n");
                        return r;