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
12---
13
14# NAME
15
16CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - size threshold for pipelining penalty
17
18# SYNOPSIS
19
20~~~c
21#include <curl/curl.h>
22
23CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE,
24                            long size);
25~~~
26
27# DESCRIPTION
28
29No function since pipelining was removed in 7.62.0.
30
31Pass a long with a **size** in bytes. If a transfer in a pipeline is
32currently processing a request with a Content-Length larger than this
33CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3), that pipeline is not considered
34for additional requests, even if it is shorter than
35CURLMOPT_MAX_PIPELINE_LENGTH(3).
36
37# DEFAULT
38
39The default value is 0, which means that the size penalization is inactive.
40
41# EXAMPLE
42
43~~~c
44int main(void)
45{
46  CURLM *m = curl_multi_init();
47  long maxlength = 10000;
48  curl_multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, maxlength);
49}
50~~~
51
52# AVAILABILITY
53
54Added in 7.30.0
55
56# RETURN VALUE
57
58Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
59