1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
5Section: 3
6Source: libcurl
7See-also:
8  - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE (3)
9  - CURLMOPT_MAX_PIPELINE_LENGTH (3)
10  - CURLMOPT_PIPELINING (3)
11Protocol:
12  - HTTP
13---
14
15# NAME
16
17CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - chunk length threshold for pipelining
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE,
25                            long size);
26~~~
27
28# DESCRIPTION
29
30No function since pipelining was removed in 7.62.0.
31
32Pass a long with a **size** in bytes. If a transfer in a pipeline is
33currently processing a chunked (Transfer-encoding: chunked) request with a
34current chunk length larger than CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3),
35that pipeline is not considered for additional requests, even if it is shorter
36than CURLMOPT_MAX_PIPELINE_LENGTH(3).
37
38# DEFAULT
39
40The default value is 0, which means that the penalization is inactive.
41
42# EXAMPLE
43
44~~~c
45int main(void)
46{
47  CURLM *m = curl_multi_init();
48  long maxchunk = 10000;
49  curl_multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, maxchunk);
50}
51~~~
52
53# AVAILABILITY
54
55Added in 7.30.0
56
57# RETURN VALUE
58
59Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
60