mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-09 21:28:51 +01:00
dirmngr: Better error code for http status 413.
* dirmngr/ks-engine-hkp.c (send_request): New case for 413. * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto. * dirmngr/ocsp.c (do_ocsp_request): Ditto. -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
5b1b5be65f
commit
0a30ce036a
@ -1271,6 +1271,10 @@ send_request (ctrl_t ctrl, const char *request, const char *hostportstr,
|
|||||||
err = gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
err = gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
|
case 413: /* Payload too large */
|
||||||
|
err = gpg_error (GPG_ERR_TOO_LARGE);
|
||||||
|
goto leave;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
log_error (_("error accessing '%s': http status %u\n"),
|
log_error (_("error accessing '%s': http status %u\n"),
|
||||||
request, http_get_status_code (http));
|
request, http_get_status_code (http));
|
||||||
|
@ -174,6 +174,10 @@ ks_http_fetch (ctrl_t ctrl, const char *url, unsigned int flags,
|
|||||||
}
|
}
|
||||||
goto once_more;
|
goto once_more;
|
||||||
|
|
||||||
|
case 413: /* Payload too large */
|
||||||
|
err = gpg_error (GPG_ERR_TOO_LARGE);
|
||||||
|
goto leave;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
log_error (_("error accessing '%s': http status %u\n"),
|
log_error (_("error accessing '%s': http status %u\n"),
|
||||||
url, http_get_status_code (http));
|
url, http_get_status_code (http));
|
||||||
|
@ -238,6 +238,10 @@ do_ocsp_request (ctrl_t ctrl, ksba_ocsp_t ocsp, gcry_md_hd_t md,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 413: /* Payload too large */
|
||||||
|
err = gpg_error (GPG_ERR_TOO_LARGE);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
log_error (_("error accessing '%s': http status %u\n"),
|
log_error (_("error accessing '%s': http status %u\n"),
|
||||||
url, http_get_status_code (http));
|
url, http_get_status_code (http));
|
||||||
|
Loading…
Reference in New Issue
Block a user