docs: avoid using the word 'magic'

It's never actually magic.

Closes #20796
This commit is contained in:
Daniel Stenberg 2026-03-03 13:53:36 +01:00
parent b4dba346cd
commit cc85cdf3c5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 20 additions and 21 deletions

View file

@ -32,11 +32,10 @@ most other libcurl functions, curl_easy_pause(3) can be used from within
callbacks.
A connection can be paused by using this function or by letting the read or
the write callbacks return the proper magic return code
(*CURL_READFUNC_PAUSE* and *CURL_WRITEFUNC_PAUSE*). A write callback
that returns pause signals to the library that it could not take care of any
data at all, and that data is then delivered again to the callback when the
transfer is unpaused.
the write callbacks return the proper return code (*CURL_READFUNC_PAUSE* and
*CURL_WRITEFUNC_PAUSE*). A write callback that returns pause signals to the
library that it could not take care of any data at all, and that data is then
delivered again to the callback when the transfer is unpaused.
While it may feel tempting, take care and notice that you cannot call this
function from another thread. To unpause, you may for example call it from the
@ -115,8 +114,8 @@ int main(void)
# MEMORY USE
When pausing a download transfer by returning the magic return code from a
write callback, the read data is already in libcurl's internal buffers so it
When pausing a download transfer by returning the appropriate return code from
a write callback, the read data is already in libcurl's internal buffers so it
has to keep it in an allocated buffer until the receiving is again unpaused
using this function.

View file

@ -299,7 +299,7 @@ participate in. There are too many ways to do it and there is no knob we can
use to turn off the practice.
If you use curl or libcurl on Windows (any version), disable the use of the
FILE protocol in curl or be prepared that accesses to a range of "magic paths"
FILE protocol in curl or be prepared that accesses to a set of special paths
potentially make your system access other hosts on your network. curl cannot
protect you against this.

View file

@ -82,8 +82,8 @@ builds a linked list. See curl_slist_append(3)
## Sharing data between transfers
You can have multiple easy handles share certain data, even if they are used
in different threads. This magic is setup using the share interface, as
described in the libcurl-share(3) man page.
in different threads. Set that up using the share interface, as described in
the libcurl-share(3) man page.
## URL Parsing

View file

@ -32,7 +32,7 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_URL, char **urlp);
Pass a pointer to a char pointer to receive the URL a redirect *would* take
you to if you would enable CURLOPT_FOLLOWLOCATION(3). This can come handy if
you think using the built-in libcurl redirect logic is not good enough for you
but you would still prefer to avoid implementing all the magic of figuring out
but you would still prefer to avoid implementing all the logic of figuring out
the new URL.
This URL is also set if the CURLOPT_MAXREDIRS(3) limit prevented a redirect to

View file

@ -66,7 +66,7 @@ int main(void)
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "ws://example.com/");
/* tell curl we deal with all the WebSocket magic ourselves */
/* tell curl we deal with all the WebSocket logic ourselves */
curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_RAW_MODE);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);