diff --git a/build/autotools.md b/build/autotools.md index 5007daa5d9..5b398ac002 100644 --- a/build/autotools.md +++ b/build/autotools.md @@ -102,7 +102,8 @@ make the default TLS backend with `--with-default-ssl-backend=[NAME]`. For example, build with support for both GnuTLS and OpenSSL and default to OpenSSL: - ./configure --with-openssl --with-gnutls --with-default-ssl-backend=openssl + ./configure --with-openssl --with-gnutls \ + --with-default-ssl-backend=openssl ## Select SSH backend diff --git a/build/separate.md b/build/separate.md index 0ee644b070..f2a3fc00cb 100644 --- a/build/separate.md +++ b/build/separate.md @@ -89,4 +89,5 @@ since then libtool can use `LD_LIBRARY_PATH`. Newer linkers may use the runpath form of rpath by default when rpath is specified but others need an additional linker flag `-Wl,--enable-new-dtags` like this: - LDFLAGS="-Wl,-rpath,$HOME/install/lib -Wl,--enable-new-dtags" ./configure ... + LDFLAGS="-Wl,-rpath,$HOME/install/lib -Wl,--enable-new-dtags" \ + ./configure ... diff --git a/build/windows.md b/build/windows.md index d4f8d8e454..263e87441e 100644 --- a/build/windows.md +++ b/build/windows.md @@ -67,22 +67,22 @@ following configurations in Visual Studio 2010 might be: DLL Debug - DLL OpenSSL (Win32): - PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32; + PATH=C:\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem DLL Debug - DLL OpenSSL (x64): - PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32; + PATH=C:\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem DLL Debug - DLL wolfSSL (Win32): - PATH=..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32; + PATH=C:\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem DLL Debug - DLL wolfSSL (x64): - PATH=..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32; + PATH=C:\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem If you are using a configuration that uses multiple third-party library DLLs diff --git a/cmdline/progressmeter.md b/cmdline/progressmeter.md index 2a6e11fc54..edfd511d65 100644 --- a/cmdline/progressmeter.md +++ b/cmdline/progressmeter.md @@ -45,9 +45,9 @@ The times are displayed using H:MM:SS for hours, minutes and seconds. The progress meter exists to show a user that something actually is happening. The different fields in the output have the following meaning: - % Total % Received % Xferd Average Speed Time Curr. - Dload Upload Total Current Left Speed - 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287 + % Total % Received % Xferd Average Speed Time Curr. + Dload Upload Total Current Left Speed + 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287 From left to right: diff --git a/cmdline/urls/trurl.md b/cmdline/urls/trurl.md index e8dfa9c297..50f6153559 100644 --- a/cmdline/urls/trurl.md +++ b/cmdline/urls/trurl.md @@ -82,7 +82,8 @@ trurl. **Remove tracking tuples from query:** - $ trurl "https://curl.se?search=hey&utm_source=tracker" --trim query="utm_*" + $ trurl "https://curl.se?search=hey&utm_source=tracker" \ + --trim query="utm_*" https://curl.se/?search=hey **Show a specific query key value:** diff --git a/cmdline/variables.md b/cmdline/variables.md index bd7a49ff5d..5fc6d14529 100644 --- a/cmdline/variables.md +++ b/cmdline/variables.md @@ -132,11 +132,11 @@ Expands the variable as a valid JSON string. This makes it easier to insert valid JSON into an argument (The quotes are not included in the resulting JSON). - --expand-json “\”full name\”: \”{{first:json}} {{last:json}}\”” + --expand-json "\"full name\": \"{{first:json}} {{last:json}}\"" To trim the variable first, apply both functions (in this order): - --expand-json “\”full name\”: \”{{varName:trim:json}}\”” + --expand-json "\"full name\": \"{{varName:trim:json}}\"" ## Function: `url` diff --git a/libcurl-http/auth.md b/libcurl-http/auth.md index 092164990a..5db790b2ca 100644 --- a/libcurl-http/auth.md +++ b/libcurl-http/auth.md @@ -112,7 +112,8 @@ picking the safest of the available methods. Tell libcurl to accept multiple method by bitwise ORing them like this: - curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST); + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, + CURLAUTH_BASIC | CURLAUTH_DIGEST); If you want libcurl to only allow a single specific method but still want it to probe first to check if it can possibly still make the request without the @@ -122,4 +123,5 @@ to the bitmask. Ask to use digest, but nothing else but digest, and only if proven really necessary: - curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST | CURLAUTH_ONLY); + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, + CURLAUTH_DIGEST | CURLAUTH_ONLY); diff --git a/libcurl/--libcurl.md b/libcurl/--libcurl.md index 58bc52c8a2..a301249b00 100644 --- a/libcurl/--libcurl.md +++ b/libcurl/--libcurl.md @@ -37,12 +37,13 @@ This creates `example.c` in the current directory, looking similar to this: curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.45.0"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); - curl_easy_setopt(hnd, CURLOPT_SSH_KNOWNHOSTS, "/home/daniel/.ssh/known_hosts"); + curl_easy_setopt(hnd, CURLOPT_SSH_KNOWNHOSTS, + "/home/daniel/.ssh/known_hosts"); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); - /* Here is a list of options the curl code used that cannot get generated - as source easily. You may select to either not use them or implement - them yourself. + /* Here is a list of options the curl code used that cannot get + generated as source easily. You may select to either not use them or + implement them yourself. CURLOPT_WRITEDATA set to a objectpointer CURLOPT_WRITEFUNCTION set to a functionpointer diff --git a/libcurl/api.md b/libcurl/api.md index 603be525e1..d2d94b9b2c 100644 --- a/libcurl/api.md +++ b/libcurl/api.md @@ -116,7 +116,7 @@ layout: /* when 'age' is 3 or higher (7.16.1 or later), the members below also exist */ - int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */ + int iconv_ver_num; /* '_libiconv_version' if iconv enabled */ const char *libssh_version; /* human readable string */ @@ -133,9 +133,9 @@ layout: version or NULL */ /* when 'age' is 6 or higher, the member below also exists: */ - const char *cainfo; /* the built-in default CURLOPT_CAINFO, might + const char *cainfo; /* built-in default CURLOPT_CAINFO, might be NULL */ - const char *capath; /* the built-in default CURLOPT_CAPATH, might + const char *capath; /* built-in default CURLOPT_CAPATH, might be NULL */ /* when 'age' is 7 or higher, the member below also exists: */ diff --git a/libcurl/callbacks/header.md b/libcurl/callbacks/header.md index 2862a4f431..44b86b7195 100644 --- a/libcurl/callbacks/header.md +++ b/libcurl/callbacks/header.md @@ -6,7 +6,8 @@ The header callback is set with `CURLOPT_HEADERFUNCTION`: The `header_callback` function must match this prototype: - size_t header_callback(char *ptr, size_t size, size_t nmemb, void *userdata); + size_t header_callback(char *ptr, size_t size, size_t nmemb, + void *userdata); This callback function gets called by libcurl as soon as a header has been received. *ptr* points to the delivered data, and the size of that data is diff --git a/libcurl/callbacks/openclosesocket.md b/libcurl/callbacks/openclosesocket.md index b99c480003..4767a18272 100644 --- a/libcurl/callbacks/openclosesocket.md +++ b/libcurl/callbacks/openclosesocket.md @@ -62,7 +62,8 @@ The corresponding callback to the open socket is of course the close socket. Usually when you provide a custom way to provide a file descriptor you want to provide your own cleanup version as well: - curl_easy_setopt(handle, CURLOPT_CLOSESOCKETFUNCTION, closesocket_callback); + curl_easy_setopt(handle, CURLOPT_CLOSESOCKETFUNCTION, + closesocket_callback); The `closesocket_callback` function must match this prototype: diff --git a/libcurl/callbacks/read.md b/libcurl/callbacks/read.md index 9f7b35914e..08424680ce 100644 --- a/libcurl/callbacks/read.md +++ b/libcurl/callbacks/read.md @@ -6,7 +6,8 @@ The read callback is set with `CURLOPT_READFUNCTION`: The `read_callback` function must match this prototype: - size_t read_callback(char *buffer, size_t size, size_t nitems, void *stream); + size_t read_callback(char *buffer, size_t size, size_t nitems, + void *stream); This callback function gets called by libcurl when it wants to send data to the server. This is a transfer that you have set up to upload data or diff --git a/libcurl/callbacks/write.md b/libcurl/callbacks/write.md index eda4f0fb86..c9f7fd235c 100644 --- a/libcurl/callbacks/write.md +++ b/libcurl/callbacks/write.md @@ -6,7 +6,8 @@ The write callback is set with `CURLOPT_WRITEFUNCTION`: The `write_callback` function must match this prototype: - size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata); + size_t write_callback(char *ptr, size_t size, size_t nmemb, + void *userdata); This callback function gets called by libcurl as soon as there is data received that needs to be saved. *ptr* points to the delivered data, and the diff --git a/libcurl/drive/multi-socket.md b/libcurl/drive/multi-socket.md index ca3b23908f..3414aa883b 100644 --- a/libcurl/drive/multi-socket.md +++ b/libcurl/drive/multi-socket.md @@ -137,8 +137,8 @@ things up and from then on you can just let your event system drive: curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running); - /* now the callbacks should have been called and we have sockets to wait for - and possibly a timeout, too. Make the event system do its magic */ + /* now the callbacks should have been called and we have sockets to wait + for and possibly a timeout, too. Make the event system do its magic */ event_base_dispatch(event_base); /* libevent2 has this API */ diff --git a/libcurl/drive/multi.md b/libcurl/drive/multi.md index 310359106e..6367bf6f18 100644 --- a/libcurl/drive/multi.md +++ b/libcurl/drive/multi.md @@ -74,7 +74,8 @@ codes*): FD_ZERO(&fdexcep); /* get file descriptors from the transfers */ - mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, + &fdexcep, &maxfd); if (maxfd == -1) { SHORT_SLEEP; diff --git a/libcurl/examples/getinmem.md b/libcurl/examples/getinmem.md index 3718e13ce4..564588a3db 100644 --- a/libcurl/examples/getinmem.md +++ b/libcurl/examples/getinmem.md @@ -24,7 +24,7 @@ from that instead. }; static size_t - WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) + mem_cb(void *contents, size_t size, size_t nmemb, void *userp) { size_t realsize = size * nmemb; struct MemoryStruct *mem = (struct MemoryStruct *)userp; @@ -62,7 +62,7 @@ from that instead. curl_easy_setopt(curl_handle, CURLOPT_URL, "https://www.example.com/"); /* send all data to this function */ - curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); + curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, mem_cb); /* we pass our 'chunk' struct to the callback function */ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk); diff --git a/libcurl/examples/http-ul-nonblock.md b/libcurl/examples/http-ul-nonblock.md index ec95731e2d..7bcec471ca 100644 --- a/libcurl/examples/http-ul-nonblock.md +++ b/libcurl/examples/http-ul-nonblock.md @@ -42,12 +42,12 @@ This examples makes a multipart form-post using the multi interface. curl_mime_name(field, "submit"); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); - /* initialize custom header list (stating that Expect: 100-continue is not - wanted */ + /* initialize custom header list (stating that Expect: 100-continue is + not wanted */ headerlist = curl_slist_append(headerlist, buf); /* what URL that receives this POST */ - curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/upload.cgi"); + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/upload.cgi"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); diff --git a/source/opensource/license.md b/source/opensource/license.md index 27659ae211..a196135e36 100644 --- a/source/opensource/license.md +++ b/source/opensource/license.md @@ -11,21 +11,23 @@ full: All rights reserved. - Permission to use, copy, modify, and distribute this software for any purpose - with or without fee is hereby granted, provided that the above copyright - notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE - OR OTHER DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name of a copyright holder shall not - be used in advertising or otherwise to promote the sale, use or other dealings - in this Software without prior written authorization of the copyright holder. + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + Except as contained in this notice, the name of a copyright holder shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization of + the copyright holder. This is legalese that says you are allowed to change the code, redistribute the code, redistribute binaries built from the code and build proprietary code diff --git a/usingcurl/connections/name.md b/usingcurl/connections/name.md index faf6ae0ac1..184688d8e7 100644 --- a/usingcurl/connections/name.md +++ b/usingcurl/connections/name.md @@ -83,7 +83,8 @@ You *can* still use `--resolve` to accomplish this if you know the specific IP address of load1. But without having to first resolve and fix the IP address separately, you can tell curl: - curl --connect-to www.example.com:80:load1.example.com:80 http://www.example.com + curl --connect-to www.example.com:80:load1.example.com:80 \ + http://www.example.com It redirects from a SOURCE NAME + SOURCE PORT to a DESTINATION NAME + DESTINATION PORT. curl then resolves the `load1.example.com` name and diff --git a/usingcurl/verbose/writeout.md b/usingcurl/verbose/writeout.md index d404f47f28..dbac790af7 100644 --- a/usingcurl/verbose/writeout.md +++ b/usingcurl/verbose/writeout.md @@ -23,7 +23,8 @@ carriage return with and a tab space with . As an example, we can output the Content-Type and the response code from an HTTP transfer, separated with newlines and some extra text like this: - curl -w "Type: %{content_type}\nCode: %{response_code}\n" http://example.com + curl -w "Type: %{content_type}\nCode: %{response_code}\n" \ + http://example.com The output is sent to stdout by default so you probably want to make sure that you do not also send the downloaded content to stdout as then you might have a hard time to separate out the data; or use `%{stderr}` to send the output to stderr. diff --git a/usingcurl/version.md b/usingcurl/version.md index 8193fd9be3..f1f359e891 100644 --- a/usingcurl/version.md +++ b/usingcurl/version.md @@ -13,9 +13,9 @@ are rather long and might wrap in your terminal window. An example output from a Debian Linux in June 2020: - curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1g zlib/1.2.11 - brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.8.0 - nghttp2/1.41.0 librtmp/2.3 + curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1g + zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) + libssh2/1.8.0 nghttp2/1.41.0 librtmp/2.3 Release-Date: 2020-01-08 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp