summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit11
1 files changed, 7 insertions, 4 deletions
diff --git a/dgit b/dgit
index 48be198..714d6b4 100755
--- a/dgit
+++ b/dgit
@@ -1195,6 +1195,7 @@ sub cfg_apply_map ($$$) {
sub url_fetch ($;@) {
my ($url, %xopts) = @_;
# Ok404 => 1 means give undef for 404
+ # AccessBase => 'archive-query' (eg)
use WWW::Curl::Easy;
@@ -1211,9 +1212,9 @@ sub url_fetch ($;@) {
$setopt->(CURLOPT_NOSIGNAL, 1);
$setopt->(CURLOPT_WRITEDATA, \$response_body);
- if ($url =~ m#^https://([-.0-9a-z]+)/#) {
- foreach my $k (qw(archive-query-tls-key
- archive-query-tls-curl-ca-args)) {
+ if ($xopts{AccessBase} && $url =~ m#^https://([-.0-9a-z]+)/#) {
+ foreach my $k ("$xopts{AccessBase}-tls-key",
+ "$xopts{AccessBase}-tls-curl-ca-args") {
fail "config option $k is obsolete and no longer supported"
if defined access_cfg($k, 'RETURN-UNDEF');
}
@@ -1242,7 +1243,9 @@ sub api_query_raw ($;$) {
my ($subpath, $ok404) = @_;
my $url = access_cfg('archive-query-url');
$url .= $subpath;
- return url_fetch $url, Ok404 => $ok404;
+ return url_fetch $url,
+ Ok404 => $ok404,
+ AccessBase => 'archive-query';
}
sub api_query ($$;$) {