Applicable in ObjectType-class directives.
The http-client-config function configures the proxy server’s HTTP client.
The following table describes the parameter for the http-client-config function.
Table 5–86 http-client-config Parameters
Parameter |
Description |
---|---|
keep-alive |
(Optional) Boolean that indicates whether the HTTP client should attempt to use persistent connections. The default is true. |
keep-alive-timeout |
(Optional) The maximum number of seconds to keep a persistent connection open. The default is 29. |
always-use-keep-alive |
(Optional) Boolean that indicates whether the HTTP client can reuse existing persistent connections for all types of requests. The default is false, meaning persistent connections will not be reused for non-GET requests nor for requests with a body. |
always-retry-stale-keep-alive |
(Optional) Boolean that indicates whether the HTTP client will retry a request even when the retries parameter is set to 0 (zero), provided that the request failed because the persistent connection it used was found to be stale. The default value is false. |
retries |
(Optional) The maximum number of times the HTTP client will retry a request when the request returns an error. The default is 3. Note that the HTTP client only retries requests that returned retryable errors such as a connection timeout, a stale keep-alive connection, and so on. Also note that a special situation regarding the reuse of persisent connections arises when the retries parameter is set to 0 (zero) and the keep-alive parameter is set to true. Because retries is set to zero, the HTTP client does not consider any request as retryable, and so does not reuse existing persistent connections; instead, it establishes new connections. In this situation, setting the always-use-keep-alive parameter to true enables the reuse of existing persistent connections. |
protocol |
(Optional) HTTP protocol version string. By default, the HTTP client uses either "HTTP/1.0" or "HTTP/1.1" based on the contents of the HTTP request. Do not use the protocol parameter unless you encounter specific protocol interoperability problems. |
proxy-agent |
(Optional) Value of the Proxy-agent HTTP request header. The default is a string that contains the proxy server product name and version. |