GNURLMOPT...NALTY_SIZE(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

✨ 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