gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 161/219: http: CURL_DISABLE_HTTP_AUTH


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 161/219: http: CURL_DISABLE_HTTP_AUTH
Date: Wed, 22 May 2019 19:18:20 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 7c70a3b1ad5e156243199642c9c0abf34f9f1d8e
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sun May 5 17:08:21 2019 +0200

    http: CURL_DISABLE_HTTP_AUTH
---
 lib/http.c    | 20 ++++++++++++++++++++
 lib/urldata.h |  1 -
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/lib/http.c b/lib/http.c
index b182844ff..b09dc648a 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -257,6 +257,7 @@ char *Curl_copy_header_value(const char *header)
   return value;
 }
 
+#ifndef CURL_DISABLE_HTTP_AUTH
 /*
  * http_output_basic() sets up an Authorization: header (or the proxy version)
  * for HTTP Basic authentication.
@@ -338,6 +339,8 @@ static CURLcode http_output_bearer(struct connectdata *conn)
   return result;
 }
 
+#endif
+
 /* pickoneauth() selects the most favourable authentication method from the
  * ones available and the ones we want.
  *
@@ -611,6 +614,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
   return result;
 }
 
+#ifndef CURL_DISABLE_HTTP_AUTH
 /*
  * Output the correct authentication header depending on the auth type
  * and whether or not it is to a proxy.
@@ -799,6 +803,22 @@ Curl_http_output_auth(struct connectdata *conn,
   return result;
 }
 
+#else
+/* when disabled */
+CURLcode
+Curl_http_output_auth(struct connectdata *conn,
+                      const char *request,
+                      const char *path,
+                      bool proxytunnel)
+{
+  (void)conn;
+  (void)request;
+  (void)path;
+  (void)proxytunnel;
+  return CURLE_OK;
+}
+#endif
+
 /*
  * Curl_http_input_auth() deals with Proxy-Authenticate: and WWW-Authenticate:
  * headers. They are dealt with both in the transfer.c main loop and in the
diff --git a/lib/urldata.h b/lib/urldata.h
index af745f9d1..09194472d 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1281,7 +1281,6 @@ struct UrlState {
 
   struct auth authhost;  /* auth details for host */
   struct auth authproxy; /* auth details for proxy */
-
   void *resolver; /* resolver state, if it is used in the URL state -
                      ares_channel f.e. */
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]