1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
5Section: 3
6Source: libcurl
7See-also:
8  - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE (3)
9  - CURLMOPT_PIPELINING (3)
10Protocol:
11  - HTTP
12Added-in: 7.30.0
13---
14
15# NAME
16
17CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - size threshold for pipelining penalty
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_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 request with a Content-Length larger than this
34CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3), that pipeline is not considered
35for additional requests, even if it is shorter than
36CURLMOPT_MAX_PIPELINE_LENGTH(3).
37
38# DEFAULT
39
400, which means that the size penalization is inactive.
41
42# %PROTOCOLS%
43
44# EXAMPLE
45
46~~~c
47int main(void)
48{
49  CURLM *m = curl_multi_init();
50  long maxlength = 10000;
51  curl_multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, maxlength);
52}
53~~~
54
55# %AVAILABILITY%
56
57# RETURN VALUE
58
59Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
60