Limit the number of http headers when receiving the http response
[openssl.git] / doc / man3 / OSSL_HTTP_REQ_CTX.pod
index f74fcb35cea0844d19577e88b999f1d087d2723b..e80673ea49d86100880239aa5ee5b8ec34fdc19a 100644 (file)
@@ -15,7 +15,8 @@ OSSL_HTTP_REQ_CTX_exchange,
 OSSL_HTTP_REQ_CTX_get0_mem_bio,
 OSSL_HTTP_REQ_CTX_get_resp_len,
 OSSL_HTTP_REQ_CTX_set_max_response_length,
-OSSL_HTTP_is_alive
+OSSL_HTTP_is_alive,
+OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines
 - HTTP client low-level functions
 
 =head1 SYNOPSIS
@@ -50,6 +51,9 @@ OSSL_HTTP_is_alive
 
  int OSSL_HTTP_is_alive(const OSSL_HTTP_REQ_CTX *rctx);
 
+ void OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines(OSSL_HTTP_REQ_CTX *rctx,
+                                                   size_t count);
+
 =head1 DESCRIPTION
 
 B<OSSL_HTTP_REQ_CTX> is a context structure for an HTTP request and response,
@@ -191,6 +195,11 @@ In case the client application keeps I<rctx> but the connection then dies
 for any reason at the server side, it will notice this obtaining an
 I/O error when trying to send the next request via I<rctx>.
 
+The OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines() function changes the limit
+for the number of HTTP headers which can be received in a response. The default
+value is 256.  If the number of HTTP headers in a response exceeds the limit,
+then the HTTP_R_RESPONSE_TOO_MANY_HDRLINES error is indicated.
+
 =head1 WARNINGS
 
 The server's response may be unexpected if the hostname that was used to