aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/t-http-basic.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-06-15 13:06:21 +0000
committerWerner Koch <[email protected]>2023-06-15 13:06:21 +0000
commit0a63afc79a0466a0554870d5e8aa6c3d8a048b3d (patch)
tree2988d4d14c24bdfeb3293f52a5f22e240ea49b94 /dirmngr/t-http-basic.c
parentdirmngr: New option --compatibility-flags. (diff)
downloadgnupg-0a63afc79a0466a0554870d5e8aa6c3d8a048b3d.tar.gz
gnupg-0a63afc79a0466a0554870d5e8aa6c3d8a048b3d.zip
dirmngr: Disable the HTTP redirect rewriting.
* dirmngr/http.h (struct http_redir_info_s): Add restrict_redir. * dirmngr/ks-engine-hkp.c (send_request): Set it depending on flags. * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto. * dirmngr/t-http-basic.c (test_http_prepare_redirect): Always set it. * dirmngr/http.c (http_prepare_redirect): Remove location rewriting unless the flag is set. -- GnuPG-bug-id: 6477
Diffstat (limited to 'dirmngr/t-http-basic.c')
-rw-r--r--dirmngr/t-http-basic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dirmngr/t-http-basic.c b/dirmngr/t-http-basic.c
index edf82efb9..ba3d07a8c 100644
--- a/dirmngr/t-http-basic.c
+++ b/dirmngr/t-http-basic.c
@@ -165,6 +165,7 @@ test_http_prepare_redirect (void)
ri.silent = 1;
ri.redirects_left = 1;
ri.orig_url = tests[tidx].url;
+ ri.restrict_redir = 1; /* This is what we used to test here. */
err = http_prepare_redirect (&ri, 301, tests[tidx].location, &newurl);
if (err && newurl)