summaryrefslogtreecommitdiffstats
path: root/crypto/http
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-05-12 18:19:07 +0200
committerDr. David von Oheimb <dev@ddvo.net>2021-05-13 19:39:40 +0200
commitc4005c8b84f35196a4c455f2e8a5aecfa88372e5 (patch)
tree680ba826a64beec95c9064689417b126f2317677 /crypto/http
parentafecd85db1359b5a62c037b8a507b928541c779c (diff)
http_client.c: Fix inconsistency w.r.t. type of max_resp_len
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15251)
Diffstat (limited to 'crypto/http')
-rw-r--r--crypto/http/http_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index c32b352137..8069b2f645 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -52,7 +52,7 @@ struct ossl_http_req_ctx_st {
int expect_asn1; /* response must be ASN.1-encoded */
long len_to_send; /* number of bytes in request still to send */
unsigned long resp_len; /* length of response */
- unsigned long max_resp_len; /* Maximum length of response */
+ size_t max_resp_len; /* Maximum length of response */
int keep_alive; /* Persistent conn. 0=no, 1=prefer, 2=require */
time_t max_time; /* Maximum end time of current transfer, or 0 */
time_t max_total_time; /* Maximum end time of total transfer, or 0 */
@@ -135,7 +135,7 @@ void OSSL_HTTP_REQ_CTX_set_max_response_length(OSSL_HTTP_REQ_CTX *rctx,
ERR_raise(ERR_LIB_HTTP, ERR_R_PASSED_NULL_PARAMETER);
return;
}
- rctx->max_resp_len = len != 0 ? len : HTTP_DEFAULT_MAX_RESP_LEN;
+ rctx->max_resp_len = len != 0 ? (size_t)len : HTTP_DEFAULT_MAX_RESP_LEN;
}
/*
@@ -1020,7 +1020,7 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
int maxline, const STACK_OF(CONF_VALUE) *headers,
const char *expected_ct, int expect_asn1,
- unsigned long max_resp_len, int timeout)
+ size_t max_resp_len, int timeout)
{
time_t start_time = timeout > 0 ? time(NULL) : 0;
char *current_url, *redirection_url = NULL;