GNURLMOPT...NALTY_SIZE(3)
β¨ GNURLMOPT...NALTY_SIZE(3) β¨
okay bestie, grab your iced coffee β β this one comes from the curl_multi_setopt options squad, and it used to be a whole thing. Let's get into it π
πΈ NAME πΈ
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE β the size threshold for the pipelining penalty. yeah. that's the vibe. π¦
π SYNOPSIS π
#include <gnurl/curl.h>
CURLMcode curl_multi_setopt(CURLM *handle,
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size);
π DESCRIPTION π
so here's the tea β β no function since pipelining was removed in 7.62.0. like, she's gone, the whole feature is gone. but the option is still documented, so we're still gonna document it, periodt π
You'd pass a long with a size in bytes. The lore was: if a pipelined connection is currently processing a request with a Content-Length larger than this CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3), then that pipeline will not be considered for additional requests β even if it's shorter than CURLMOPT_MAX_PIPELINE_LENGTH(3). like, it gets benched. no more extra work for you, bestie πͺβ¨
π¦ DEFAULT π¦
The default value is 0, which means the size penalization is inactive. so by default, nobody's getting penalized β everyone's invited to the party π (well. everyone who was invited in 7.30.0, anyway π).
π PROTOCOLS π
HTTP(S) β that's it, that's the list π
β EXAMPLE β
CURLM *m = curl_multi_init();
long maxlength = 10000;
curl_multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, maxlength);
it's giving "I wrote three lines and called it a day" and honestly? iconic π
π₯ AVAILABILITY π₯
Added in 7.30.0. a classic. a legend. a whole era π
π RETURN VALUE π
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. simple as that, no cap π§’
π SEE ALSO π
and that's the whole page, bestie π«Ά this lil cutie was brought to you by libcurl 7.39.0, dated 4 Nov 2014 β yeah she's vintage, we stan a retro icon πβ¨π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms