From ae9acb8745c1654b446b3cd5b9322b235723d9cb Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 18 Nov 2019 17:22:45 +0100 Subject: dirmngr: Forward http redirect warnings to gpg. * dirmngr/http.c: Include dirmngr-status.h (http_prepare_redirect): Emit WARNING status lines for redirection problems. * dirmngr/http.h: Include fwddecl.h. (struct http_redir_info_s): Add field ctrl. * dirmngr/ks-engine-hkp.c (send_request): Set it. * dirmngr/ks-engine-http.c (ks_http_fetch): Set it. * g10/call-dirmngr.c (ks_status_cb): Detect the two new warnings. -- This should make it easier to diagnose problems with bad WKD servers. Signed-off-by: Werner Koch --- dirmngr/ks-engine-http.c | 1 + 1 file changed, 1 insertion(+) (limited to 'dirmngr/ks-engine-http.c') diff --git a/dirmngr/ks-engine-http.c b/dirmngr/ks-engine-http.c index a84a3a1ea..007bbc99d 100644 --- a/dirmngr/ks-engine-http.c +++ b/dirmngr/ks-engine-http.c @@ -82,6 +82,7 @@ ks_http_fetch (ctrl_t ctrl, const char *url, unsigned int flags, err = http_parse_uri (&uri, url, 0); if (err) goto leave; + redirinfo.ctrl = ctrl; redirinfo.orig_url = url; redirinfo.orig_onion = uri->onion; redirinfo.orig_https = uri->use_tls; -- cgit v1.2.3