Skip to content

Commit

Permalink
docs: use lowercase curl and libcurl
Browse files Browse the repository at this point in the history
Adjusted badwords to find them.

Plus: make badwords run on all markdown files in the repo and update
markdowns previously unchecked

Closes curl#15898
  • Loading branch information
bagder committed Jan 2, 2025
1 parent e694c82 commit 3eb57d6
Show file tree
Hide file tree
Showing 60 changed files with 277 additions and 245 deletions.
14 changes: 13 additions & 1 deletion .github/scripts/badwords.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
# If separator is '=', the string will be compared case sensitively.
# If separator is ':', the check is done case insensitively.
#
# To add white listed uses of bad words that are removed before checking for
# the bad ones:
#
# ---(accepted word)
#
my $w;
while(<STDIN>) {
chomp;
if($_ =~ /^#/) {
next;
}
if($_ =~ /^([^:=]*)([:=])(.*)/) {
if($_ =~ /^---(.*)/) {
push @whitelist, $1;
}
elsif($_ =~ /^([^:=]*)([:=])(.*)/) {
my ($bad, $sep, $better)=($1, $2, $3);
push @w, $bad;
$alt{$bad} = $better;
Expand All @@ -41,6 +49,10 @@ sub file {
$in =~ s/(\[.*\])\(.*\)/$1/g;
# remove backticked texts
$in =~ s/\`.*\`//g;
# remove whitelisted patterns
for my $p (@whitelist) {
$in =~ s/$p//g;
}
foreach my $w (@w) {
my $case = $exactcase{$w};
if(($in =~ /^(.*)$w/i && !$case) ||
Expand Down
5 changes: 5 additions & 0 deletions .github/scripts/badwords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ couldn't:could not
64-bits:64 bits or 64-bit
32-bits:32 bits or 32-bit
\bvery\b:rephrase using an alternative word
\bCurl\b=curl
\bLibcurl\b=libcurl
---WWW::Curl
---NET::Curl
---Curl Corporation
2 changes: 1 addition & 1 deletion .github/workflows/checkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
name: checkout

- name: badwords
run: .github/scripts/badwords.pl < .github/scripts/badwords.txt docs/*.md docs/libcurl/*.md docs/libcurl/opts/*.md docs/cmdline-opts/*.md docs/TODO docs/KNOWN_BUGS tests/*.md
run: .github/scripts/badwords.pl < .github/scripts/badwords.txt `git ls-files '**.md'` docs/TODO docs/KNOWN_BUGS packages/OS400/README.OS400

- name: verify-synopsis
run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md
Expand Down
2 changes: 1 addition & 1 deletion GIT-INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Daniel uses a configure line similar to this for easier development:

./configure --disable-shared --enable-debug --enable-maintainer-mode

In environments that don't support configure (i.e. Windows), do this:
In environments that do not support configure (i.e. Windows), do this:

buildconf.bat

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: curl

# [![curl logo](https://curl.se/logo/curl-logo.svg)](https://curl.se/)

Curl is a command-line tool for transferring data specified with URL syntax.
curl is a command-line tool for transferring data specified with URL syntax.
Learn how to use curl by reading [the
manpage](https://curl.se/docs/manpage.html) or [everything
curl](https://everything.curl.dev/).
Expand Down Expand Up @@ -55,7 +55,7 @@ page](https://hackerone.com/curl) and not in public.

## Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga
curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga
Tekniska Högskolan. This notice is included here to comply with the
distribution terms.

Expand Down
2 changes: 1 addition & 1 deletion docs/BUGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: curl

## There are still bugs

Curl and libcurl keep being developed. Adding features and changing code
curl and libcurl keep being developed. Adding features and changing code
means that bugs sneak in, no matter how hard we try to keep them out.

Of course there are lots of bugs left. Not to mention misfeatures.
Expand Down
4 changes: 2 additions & 2 deletions docs/ECH.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ not be the best solution.

## Using ECH and DoH

Curl supports using DoH for A/AAAA lookups so it was relatively easy to add
curl supports using DoH for A/AAAA lookups so it was relatively easy to add
retrieval of HTTPS RRs in that situation. To use ECH and DoH together:

```bash
Expand Down Expand Up @@ -153,7 +153,7 @@ For now, this only works for the OpenSSL and BoringSSL/AWS-LC builds.

## Default settings

Curl has various ways to configure default settings, e.g. in ``$HOME/.curlrc``,
curl has various ways to configure default settings, e.g. in ``$HOME/.curlrc``,
so one can set the DoH URL and enable ECH that way:

```bash
Expand Down
6 changes: 3 additions & 3 deletions docs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ November: configure script and reported successful compiles on several
major operating systems. The never-quite-understood -F option was added and
curl could now simulate quite a lot of a browser. TELNET support was added.

Curl 5 was released in December 1998 and introduced the first ever curl man
curl 5 was released in December 1998 and introduced the first ever curl man
page. People started making Linux RPM packages out of it.

1999
Expand Down Expand Up @@ -187,7 +187,7 @@ June: curl 7.12.0 introduced IDN support. 10 official web mirrors.
This release bumped the major SONAME to 3 due to the removal of the
`curl_formparse()` function

August: Curl and libcurl 7.12.1
August: curl and libcurl 7.12.1

Public curl release number: 82
Releases counted from the beginning: 109
Expand Down Expand Up @@ -377,7 +377,7 @@ April: added the cyassl backend (later renamed to wolfSSL)
curl and libcurl are installed in an estimated 5 *billion* instances
world-wide.

October 31: Curl and libcurl 7.62.0
October 31: curl and libcurl 7.62.0

Public curl releases: 177
Command line options: 219
Expand Down
32 changes: 16 additions & 16 deletions docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ matching public key file must be specified using the `--pubkey` option.

### HTTP

Curl also supports user and password in HTTP URLs, thus you can pick a file
curl also supports user and password in HTTP URLs, thus you can pick a file
like:

curl http://name:[email protected]/full/path/to/file
Expand Down Expand Up @@ -170,7 +170,7 @@ curl uses HTTP/1.0 instead of HTTP/1.1 for any `CONNECT` attempts.

curl also supports SOCKS4 and SOCKS5 proxies with `--socks4` and `--socks5`.

See also the environment variables Curl supports that offer further proxy
See also the environment variables curl supports that offer further proxy
control.

Most FTP proxy servers are set up to appear as a normal FTP server from the
Expand Down Expand Up @@ -199,7 +199,7 @@ should be read from STDIN.
## Ranges

HTTP 1.1 introduced byte-ranges. Using this, a client can request to get only
one or more sub-parts of a specified document. Curl supports this with the
one or more sub-parts of a specified document. curl supports this with the
`-r` flag.

Get the first 100 bytes of a document:
Expand All @@ -210,7 +210,7 @@ Get the last 500 bytes of a document:

curl -r -500 http://www.example.com/

Curl also supports simple ranges for FTP files as well. Then you can only
curl also supports simple ranges for FTP files as well. Then you can only
specify start and stop position.

Get the first 100 bytes of a document using FTP:
Expand Down Expand Up @@ -238,7 +238,7 @@ Upload a local file to get appended to the remote file:

curl -T localfile -a ftp://ftp.example.com/remotefile

Curl also supports ftp upload through a proxy, but only if the proxy is
curl also supports ftp upload through a proxy, but only if the proxy is
configured to allow that kind of tunneling. If it does, you can run curl in a
fashion similar to:

Expand All @@ -264,7 +264,7 @@ For other ways to do HTTP data upload, see the POST section below.

If curl fails where it is not supposed to, if the servers do not let you in,
if you cannot understand the responses: use the `-v` flag to get verbose
fetching. Curl outputs lots of info and what it sends and receives in order to
fetching. curl outputs lots of info and what it sends and receives in order to
let the user see all client-server interaction (but it does not show you the
actual data).

Expand All @@ -286,7 +286,7 @@ info on a single file for HTTP and FTP. The HTTP information is a lot more
extensive.

For HTTP, you can get the header information (the same as `-I` would show)
shown before the data by using `-i`/`--include`. Curl understands the
shown before the data by using `-i`/`--include`. curl understands the
`-D`/`--dump-header` option when getting files from both FTP and HTTP, and it
then stores the headers in the specified file.

Expand Down Expand Up @@ -407,7 +407,7 @@ contain certain data.
## User Agent

An HTTP request has the option to include information about the browser that
generated the request. Curl allows it to be specified on the command line. It
generated the request. curl allows it to be specified on the command line. It
is especially useful to fool or trick stupid servers or CGI scripts that only
accept certain browsers.

Expand Down Expand Up @@ -456,7 +456,7 @@ Example, get a page that wants my name passed in a cookie:

curl -b "name=Daniel" www.example.com

Curl also has the ability to use previously received cookies in following
curl also has the ability to use previously received cookies in following
sessions. If you get cookies from a server and store them in a file in a
manner similar to:

Expand All @@ -482,7 +482,7 @@ non-existing file to trigger the cookie awareness like:
curl -L -b empty.txt www.example.com

The file to read cookies from must be formatted using plain HTTP headers OR as
Netscape's cookie file. Curl determines what kind it is based on the file
Netscape's cookie file. curl determines what kind it is based on the file
contents. In the above command, curl parses the header and store the cookies
received from www.example.com. curl sends the stored cookies which match the
request to the server as it follows the location. The file `empty.txt` may be
Expand Down Expand Up @@ -523,7 +523,7 @@ much explanation!

## Speed Limit

Curl allows the user to set the transfer speed conditions that must be met to
curl allows the user to set the transfer speed conditions that must be met to
let the transfer keep going. By using the switch `-y` and `-Y` you can make
curl abort transfers if the transfer speed is below the specified lowest limit
for a specified time.
Expand Down Expand Up @@ -562,7 +562,7 @@ stalls during periods.

## Config File

Curl automatically tries to read the `.curlrc` file (or `_curlrc` file on
curl automatically tries to read the `.curlrc` file (or `_curlrc` file on
Microsoft Windows systems) from the user's home directory on startup.

The config file could be made up with normal command line switches, but you
Expand Down Expand Up @@ -822,7 +822,7 @@ with current logon credentials (SSPI/SPNEGO).

## Environment Variables

Curl reads and understands the following environment variables:
curl reads and understands the following proxy related environment variables:

http_proxy, HTTPS_PROXY, FTP_PROXY

Expand Down Expand Up @@ -855,7 +855,7 @@ this is a big security risk if someone else gets hold of your passwords,
therefore most Unix programs do not read this file unless it is only readable
by yourself (curl does not care though).

Curl supports `.netrc` files if told to (using the `-n`/`--netrc` and
curl supports `.netrc` files if told to (using the `-n`/`--netrc` and
`--netrc-optional` options). This is not restricted to just FTP, so curl can
use it for all protocols where authentication is used.

Expand All @@ -876,7 +876,7 @@ ending newline:

## Kerberos FTP Transfer

Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need the
curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need the
kerberos package installed and used at curl build time for it to be available.

First, get the krb-ticket the normal way, like with the `kinit`/`kauth` tool.
Expand All @@ -889,7 +889,7 @@ ask for one and you already entered the real password to `kinit`/`kauth`.

## TELNET

The curl telnet support is basic and easy to use. Curl passes all data passed
The curl telnet support is basic and easy to use. curl passes all data passed
to it on stdin to the remote server. Connect to a remote telnet server using a
command line similar to:

Expand Down
2 changes: 1 addition & 1 deletion docs/RUSTLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: curl

# Rustls

[Rustls is a TLS backend written in Rust](https://docs.rs/rustls/). Curl can
[Rustls is a TLS backend written in Rust](https://docs.rs/rustls/). curl can
be built to use it as an alternative to OpenSSL or other TLS backends. We use
the [rustls-ffi C bindings](https://github.com/rustls/rustls-ffi/). This
version of curl depends on version v0.14.0 of rustls-ffi.
Expand Down
20 changes: 10 additions & 10 deletions docs/TheArtOfHttpScripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright (C) Daniel Stenberg, <[email protected]>, et al.
SPDX-License-Identifier: curl
-->

# The Art Of Scripting HTTP Requests Using Curl
# The Art Of Scripting HTTP Requests Using curl

## Background

Expand All @@ -15,12 +15,12 @@ SPDX-License-Identifier: curl
extract information from the web, to fake users, to post or upload data to
web servers are all important tasks today.

Curl is a command line tool for doing all sorts of URL manipulations and
curl is a command line tool for doing all sorts of URL manipulations and
transfers, but this particular document focuses on how to use it when doing
HTTP requests for fun and profit. This documents assumes that you know how to
invoke `curl --help` or `curl --manual` to get basic information about it.

Curl is not written to do everything for you. It makes the requests, it gets
curl is not written to do everything for you. It makes the requests, it gets
the data, it sends data and it retrieves the information. You probably need
to glue everything together using some kind of script language or repeated
manual invokes.
Expand Down Expand Up @@ -475,7 +475,7 @@ SPDX-License-Identifier: curl
new page keeping newly generated output. The header that tells the browser to
redirect is `Location:`.

Curl does not follow `Location:` headers by default, but simply displays such
curl does not follow `Location:` headers by default, but simply displays such
pages in the same manner it displays all HTTP replies. It does however
feature an option that makes it attempt to follow the `Location:` pointers.

Expand All @@ -485,7 +485,7 @@ SPDX-License-Identifier: curl

If you use curl to POST to a site that immediately redirects you to another
page, you can safely use [`--location`](https://curl.se/docs/manpage.html#-L)
(`-L`) and `--data`/`--form` together. Curl only uses POST in the first
(`-L`) and `--data`/`--form` together. curl only uses POST in the first
request, and then revert to GET in the following operations.

## Other redirects
Expand Down Expand Up @@ -532,15 +532,15 @@ SPDX-License-Identifier: curl
[`--cookie-jar`](https://curl.se/docs/manpage.html#-c) option described
below is a better way to store cookies.)

Curl has a full blown cookie parsing engine built-in that comes in use if you
curl has a full blown cookie parsing engine built-in that comes in use if you
want to reconnect to a server and use cookies that were stored from a
previous connection (or hand-crafted manually to fool the server into
believing you had a previous connection). To use previously stored cookies,
you run curl like:

curl --cookie stored_cookies_in_file http://www.example.com

Curl's "cookie engine" gets enabled when you use the
curl's "cookie engine" gets enabled when you use the
[`--cookie`](https://curl.se/docs/manpage.html#-b) option. If you only
want curl to understand received cookies, use `--cookie` with a file that
does not exist. Example, if you want to let curl understand cookies from a
Expand All @@ -549,7 +549,7 @@ SPDX-License-Identifier: curl

curl --cookie nada --location http://www.example.com

Curl has the ability to read and write cookie files that use the same file
curl has the ability to read and write cookie files that use the same file
format that Netscape and Mozilla once used. It is a convenient way to share
cookies between scripts or invokes. The `--cookie` (`-b`) switch
automatically detects if a given file is such a cookie file and parses it,
Expand All @@ -571,7 +571,7 @@ SPDX-License-Identifier: curl
SSL (or TLS as the current version of the standard is called) offers a set of
advanced features to do secure transfers over HTTP.

Curl supports encrypted fetches when built to use a TLS library and it can be
curl supports encrypted fetches when built to use a TLS library and it can be
built to use one out of a fairly large set of libraries - `curl -V` shows
which one your curl was built to use (if any). To get a page from an HTTPS
server, simply run curl like:
Expand All @@ -581,7 +581,7 @@ SPDX-License-Identifier: curl
## Certificates

In the HTTPS world, you use certificates to validate that you are the one you
claim to be, as an addition to normal passwords. Curl supports client- side
claim to be, as an addition to normal passwords. curl supports client- side
certificates. All certificates are locked with a passphrase, which you need
to enter before the certificate can be used by curl. The passphrase can be
specified on the command line or if not, entered interactively when curl
Expand Down
2 changes: 1 addition & 1 deletion docs/VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: curl
Version Numbers and Releases
============================

Curl is not only curl. Curl is also libcurl. They are actually individually
The command line tool curl and the library libcurl are individually
versioned, but they usually follow each other closely.

The version numbering is always built up using the same system:
Expand Down
Loading

0 comments on commit 3eb57d6

Please sign in to comment.