diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-05-04 16:33:19 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-05-14 19:24:42 +0200 |
commit | be799eb7a3a7d0012dfa27ade1fa68319a40c6c6 (patch) | |
tree | 3baf498b9d1dab171c51f1fb0209c4d0b0f4d707 /include | |
parent | 8b5ca5111ed9d7907e2de91a5af5b5407a46eaf1 (diff) |
HTTP client: Allow streaming of response data (with possibly indefinite length)
Also clean up max_resp_len and add OSSL_HTTP_REQ_CTX_get_resp_len().
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15053)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/http.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/openssl/http.h b/include/openssl/http.h index 7552b2f42e..2140d5d2f8 100644 --- a/include/openssl/http.h +++ b/include/openssl/http.h @@ -65,8 +65,7 @@ OSSL_HTTP_REQ_CTX *OSSL_HTTP_open(const char *server, const char *port, const char *proxy, const char *no_proxy, int use_ssl, BIO *bio, BIO *rbio, OSSL_HTTP_bio_cb_t bio_update_fn, void *arg, - int buf_size, unsigned long max_resp_len, - int overall_timeout); + int buf_size, int overall_timeout); int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port, const char *proxyuser, const char *proxypass, int timeout, BIO *bio_err, const char *prog); @@ -74,14 +73,14 @@ int OSSL_HTTP_set_request(OSSL_HTTP_REQ_CTX *rctx, const char *path, const STACK_OF(CONF_VALUE) *headers, const char *content_type, BIO *req, const char *expected_content_type, int expect_asn1, - int timeout, int keep_alive); + size_t max_resp_len, int timeout, int keep_alive); BIO *OSSL_HTTP_exchange(OSSL_HTTP_REQ_CTX *rctx, char **redirection_url); BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy, BIO *bio, BIO *rbio, OSSL_HTTP_bio_cb_t bio_update_fn, void *arg, int buf_size, const STACK_OF(CONF_VALUE) *headers, const char *expected_content_type, int expect_asn1, - unsigned long max_resp_len, int timeout); + size_t max_resp_len, int timeout); BIO *OSSL_HTTP_transfer(OSSL_HTTP_REQ_CTX **prctx, const char *server, const char *port, const char *path, int use_ssl, @@ -91,7 +90,7 @@ BIO *OSSL_HTTP_transfer(OSSL_HTTP_REQ_CTX **prctx, int buf_size, const STACK_OF(CONF_VALUE) *headers, const char *content_type, BIO *req, const char *expected_content_type, int expect_asn1, - unsigned long max_resp_len, int timeout, int keep_alive); + size_t max_resp_len, int timeout, int keep_alive); int OSSL_HTTP_close(OSSL_HTTP_REQ_CTX *rctx, int ok); /* Auxiliary functions */ |