Pārlūkot izejas kodu

New configuration directive 'force_ipv6_requests'.

grunfink 1 mēnesi atpakaļ
vecāks
revīzija
de7ca50ba5
3 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. 2 2
      Makefile
  2. 2 2
      Makefile.NetBSD
  3. 3 0
      data.c

+ 2 - 2
Makefile

@@ -61,12 +61,12 @@ activitypub.o: activitypub.c xs.h xs_json.h xs_curl.h xs_url.h xs_mime.h \
  xs_webmention.h xs_http.h xs_http_codes.h snac.h
 data.o: data.c xs.h xs_hex.h xs_io.h xs_json.h xs_openssl.h xs_glob.h \
  xs_set.h xs_time.h xs_regex.h xs_match.h xs_unicode.h xs_random.h \
- xs_po.h xs_http.h xs_http_codes.h snac.h
+ xs_po.h xs_http.h xs_http_codes.h xs_list_tools.h xs_curl.h snac.h
 format.o: format.c xs.h xs_regex.h xs_mime.h xs_html.h xs_json.h \
  xs_time.h xs_match.h xs_unicode.h snac.h
 html.o: html.c xs.h xs_io.h xs_json.h xs_regex.h xs_set.h xs_openssl.h \
  xs_time.h xs_mime.h xs_match.h xs_html.h xs_curl.h xs_unicode.h xs_url.h \
- xs_random.h xs_http.h xs_http_codes.h snac.h
+ xs_random.h xs_http.h xs_http_codes.h xs_list_tools.h snac.h
 http.o: http.c xs.h xs_io.h xs_openssl.h xs_curl.h xs_time.h xs_json.h \
  xs_http.h xs_http_codes.h snac.h
 httpd.o: httpd.c xs.h xs_io.h xs_json.h xs_socket.h xs_unix_socket.h \

+ 2 - 2
Makefile.NetBSD

@@ -40,12 +40,12 @@ activitypub.o: activitypub.c xs.h xs_json.h xs_curl.h xs_url.h xs_mime.h \
  xs_webmention.h xs_http.h xs_http_codes.h snac.h
 data.o: data.c xs.h xs_hex.h xs_io.h xs_json.h xs_openssl.h xs_glob.h \
  xs_set.h xs_time.h xs_regex.h xs_match.h xs_unicode.h xs_random.h \
- xs_po.h xs_http.h xs_http_codes.h snac.h
+ xs_po.h xs_http.h xs_http_codes.h xs_list_tools.h xs_curl.h snac.h
 format.o: format.c xs.h xs_regex.h xs_mime.h xs_html.h xs_json.h \
  xs_time.h xs_match.h xs_unicode.h snac.h
 html.o: html.c xs.h xs_io.h xs_json.h xs_regex.h xs_set.h xs_openssl.h \
  xs_time.h xs_mime.h xs_match.h xs_html.h xs_curl.h xs_unicode.h xs_url.h \
- xs_random.h xs_http.h xs_http_codes.h snac.h
+ xs_random.h xs_http.h xs_http_codes.h xs_list_tools.h snac.h
 http.o: http.c xs.h xs_io.h xs_openssl.h xs_curl.h xs_time.h xs_json.h \
  xs_http.h xs_http_codes.h snac.h
 httpd.o: httpd.c xs.h xs_io.h xs_json.h xs_socket.h xs_unix_socket.h \

+ 3 - 0
data.c

@@ -16,6 +16,7 @@
 #include "xs_po.h"
 #include "xs_http.h"
 #include "xs_list_tools.h"
+#include "xs_curl.h"
 
 #include "snac.h"
 
@@ -87,6 +88,8 @@ int srv_open(const char *basedir, int auto_upgrade)
             dbglvl = xs_dict_get(srv_config, "dbglevel");
             proto  = xs_dict_get_def(srv_config, "protocol", "https");
 
+            xs_curl_force_ipv6 = xs_is_true(xs_dict_get(srv_config, "force_ipv6_requests"));
+
             if (host == NULL || prefix == NULL)
                 error = xs_str_new("ERROR: cannot get server data");
             else {