summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-09-29 14:08:29 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-29 14:08:29 +0200
commit60d16ed79431d76534d5f4cc51ad5b70adb2cad5 (patch)
treec1f7bbbbd23b95ea7250de2446489bf62cdef8d2
parentbecfe1233ff2b6b0c3e1b6a10048b55b68c2539f (diff)
downloadcurl-60d16ed79431d76534d5f4cc51ad5b70adb2cad5.tar.gz
doh: only build in support if h2 enabledbagder/doh-depends-on-h2
The DoH spec says "HTTP/2 [RFC7540] is the minimum RECOMMENDED version of HTTP for use with DoH". Reported-by: Marcel Raad
-rw-r--r--lib/doh.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/doh.c b/lib/doh.c
index 70ffede35..988f35218 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -21,15 +21,18 @@
***************************************************************************/
#include "curl_setup.h"
+
#include "urldata.h"
#include "curl_addrinfo.h"
+#include "doh.h"
+
+#ifdef USE_NGHTTP2
#include "sendf.h"
#include "multiif.h"
#include "url.h"
#include "share.h"
#include "curl_base64.h"
#include "connect.h"
-#include "doh.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
@@ -878,3 +881,28 @@ CURLcode Curl_doh_is_resolved(struct connectdata *conn,
return CURLE_OK;
}
+
+#else /* !USE_NGHTTP2 */
+/*
+ */
+Curl_addrinfo *Curl_doh(struct connectdata *conn,
+ const char *hostname,
+ int port,
+ int *waitp)
+{
+ (void)conn;
+ (void)hostname;
+ (void)port;
+ (void)waitp;
+ return NULL;
+}
+
+CURLcode Curl_doh_is_resolved(struct connectdata *conn,
+ struct Curl_dns_entry **dnsp)
+{
+ (void)conn;
+ (void)dnsp;
+ return CURLE_NOT_BUILT_IN;
+}
+
+#endif /* USE_NGHTTP2 */