]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: make the headers API depend on --enable-headers-api
authorDaniel Stenberg <daniel@haxx.se>
Sat, 19 Mar 2022 21:40:20 +0000 (22:40 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 22 Mar 2022 07:24:26 +0000 (08:24 +0100)
lib/headers.c
lib/headers.h

index add23b786e9988803a2e6307dfe9b27b4eda22bb..f32644cd4e1124ed75773f21523bce1807df7072 100644 (file)
@@ -32,7 +32,7 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
-#ifndef CURL_DISABLE_HTTP
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_HEADERS_API)
 
 /* Generate the curl_header struct for the user. This function MUST assign all
    struct fields in the output struct. */
@@ -297,23 +297,27 @@ CURLcode Curl_headers_cleanup(struct Curl_easy *data)
 CURLHcode curl_easy_header(CURL *easy,
                            const char *name,
                            size_t index,
-                           unsigned int type,
+                           unsigned int origin,
+                           int request,
                            struct curl_header **hout)
 {
   (void)easy;
   (void)name;
   (void)index;
-  (void)type;
+  (void)origin;
+  (void)request;
   (void)hout;
   return CURLHE_NOT_BUILT_IN;
 }
 
 struct curl_header *curl_easy_nextheader(CURL *easy,
                                          unsigned int type,
+                                         int request,
                                          struct curl_header *prev)
 {
   (void)easy;
   (void)type;
+  (void)request;
   (void)prev;
   return NULL;
 }
index 83c7b4272c9d7dd371736c2b552b88a114cf5578..d6acc03c21d1374eb1ddc0b2fc057d1ce6a54dc6 100644 (file)
@@ -23,7 +23,7 @@
  ***************************************************************************/
 #include "curl_setup.h"
 
-#ifndef CURL_DISABLE_HTTP
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_HEADERS_API)
 
 struct Curl_header_store {
   struct Curl_llist_element node;