Skip to content

Commit

Permalink
lots of proselint warnings addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Nov 30, 2018
1 parent 8e8e550 commit 1f92fb6
Show file tree
Hide file tree
Showing 74 changed files with 259 additions and 270 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ reports, pull requests or critiques to me and I will improve this book
accordingly.

This book will never be finished. I intend to keep working on it and while I
may at some point in time consider it fairly complete and covering most
aspects of the project (even if only that seems like an insurmountable goal),
the curl project will continue to move so there will always be things to
update in the book as well.
may at some point consider it fairly complete and covering most aspects of the
project (even if only that seems like an insurmountable goal), the curl
project will continue to move so there will always be things to update in the
book as well.

This book project started at the end of September 2015.

Expand All @@ -45,7 +45,7 @@ profit. I live and work in Stockholm, Sweden.
All there is to know about me can be found on [my web
site](https://daniel.haxx.se/).

## Help!
## Help

If you find mistakes, omissions, errors or blatant lies in this document,
please send me a refreshed version of the affected paragraph and I will make
Expand Down
2 changes: 1 addition & 1 deletion building-binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ binary packages for popular operating systems.

## Installing from your package repository

curl and libcurl have been around for a very long time and most Linux
curl and libcurl have been around for a long time and most Linux
distributions, BSD versions and other *nix versions have package repositories
that allow you to install curl packages.

Expand Down
8 changes: 4 additions & 4 deletions building-deps.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Dependencies

A key to making good software is to build on top of other great software. By
using libraries that many others use, we reinvent the same things fewer
times and we get more reliable software as there are more people using the
same code.
A key to making good software is to build on top of other great software. By
using libraries that many others use, we reinvent the same things fewer times
and we get more reliable software as there are more people using the same
code.

A whole slew of features that curl provides require that it is built to use
one or more external libraries. They are then dependencies of curl. None of
Expand Down
8 changes: 4 additions & 4 deletions building-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ to the world by other friendly people and organizations.
The source code consists of a large number of files containing C
code. Generally speaking, the same set of files are used to build binaries for
all platforms and computer architectures that curl supports. curl can be built
and run on a vast number of different platforms. If you use a rare operating
system yourself, chances are that building curl from source is the
easiest or perhaps the only way to get curl.
and run on a vast number of platforms. If you use a rare operating system
yourself, chances are that building curl from source is the easiest or perhaps
the only way to get curl.

Making it easy to build curl is a priority to the curl project, although we
don't always necessarily succeed!
Expand All @@ -38,7 +38,7 @@ CMake approach.

There are two different build environments to cater for people's different
opinions and tastes. The configure based build is arguably the more mature and
more complete build system and should probably be considered the default one.
more convering build system and should probably be considered the default one.

### Autotools

Expand Down
2 changes: 1 addition & 1 deletion building.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ more machine-readable format on this URL: `https://curl.haxx.se/info`.

## off git!

Of course, when building from source you can also always opt to build the very
Of course, when building from source you can also always opt to build the
latest version that exist in the [git
repository](https://github.com/curl/curl). It could however be a bit more
fragile and probably requires slightly more attention to detail.
2 changes: 1 addition & 1 deletion callback-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ received. *ptr* points to the delivered data, and the size of that data is
"full" headers, one by one, to this callback.

The data passed to this function will not be zero terminated! You cannot, for
example, use printf's "%s" operator to display the contents nor strcpy to copy
example, use printf's `%s` operator to display the contents nor strcpy to copy
it.

This callback should return the number of bytes actually taken care of. If
Expand Down
6 changes: 3 additions & 3 deletions callback-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ The `xfer_callback` function must match this prototype:

If this option is set and `CURLOPT_NOPROGRESS` is set to 0 (zero), this
callback function gets called by libcurl with a frequent interval. While data
is being transferred it will be called very frequently, and during slow
periods like when nothing is being transferred it can slow down to about one
call per second.
is being transferred it will be called frequently, and during slow periods
like when nothing is being transferred it can slow down to about one call per
second.

The **clientp** pointer points to the private data set with
`CURLOPT_XFERINFODATA`:
Expand Down
2 changes: 1 addition & 1 deletion callback-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data get passed to the write callback, you can get up to
This function may be called with zero bytes data if the transferred file is empty.

The data passed to this function will not be zero terminated! You cannot, for
example, use printf's "%s" operator to display the contents nor strcpy to copy
example, use printf's `%s` operator to display the contents nor strcpy to copy
it.

This callback should return the number of bytes actually taken care of. If
Expand Down
16 changes: 8 additions & 8 deletions cmdline-configfile.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Config file

You can easily end up with curl command lines that use a very large number of
command-line options, making them rather hard to work with. Sometimes the length
of the command line you want to enter even hits the maximum length your
You can easily end up with curl command lines that use a large number of
command-line options, making them rather hard to work with. Sometimes the
length of the command line you want to enter even hits the maximum length your
command-line system allows. The Microsoft Windows command prompt being an
example of something that has a fairly small maximum line length.

Expand Down Expand Up @@ -71,11 +71,11 @@ Unix-like systems and `_curlrc` on Windows.

The default config file is checked for in the following places in this order:

1. curl tries to find the "home directory": It first checks for the CURL_HOME and
then the HOME environment variables. Failing that, it uses `getpwuid()` on
Unix-like systems (which returns the home directory given the current user in your
system). On Windows, it then checks for the APPDATA variable, or as a last
resort the '%USERPROFILE%\Application Data'.
1. curl tries to find the "home directory": It first checks for the CURL_HOME
and then the HOME environment variables. Failing that, it uses `getpwuid()` on
Unix-like systems (which returns the home directory given the current user in
your system). On Windows, it then checks for the APPDATA variable, or as a
last resort the '%USERPROFILE%\Application Data'.

2. On Windows, if there is no _curlrc file in the home directory, it checks for one
in the same directory the curl executable is placed. On Unix-like systems, it will
Expand Down
4 changes: 2 additions & 2 deletions cmdline-globbing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ three digits all the time:

curl -O http://example.com/[001-100].png

Or maybe you only want even numbered images so you tell curl a step counter
Or maybe you only want even-numbered images so you tell curl a step counter
too. This example range goes from 0 to 100 with an increment of 2:

curl -O http://example.com/[0-100:2].png
Expand All @@ -50,7 +50,7 @@ of the brackets used for the ranges:

You can use several globs in the same URL which then will make curl iterate
over those, too. To download the images of Ben, Alice and Frank, in both the
resolutions 100x100 and 1000x1000, a command line could look like:
resolutions 100 * 100 and 1000 * 1000, a command line could look like:

curl -O http://example.com/{Ben,Alice,Frank}-{100x100,1000x1000}.jpg

Expand Down
10 changes: 5 additions & 5 deletions cmdline-listopts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ are looking for. `curl --help` or simply `curl -h` will get you a list of all
existing options with a brief explanation. If you don't really know what
you are looking for, you probably won't be entirely satisfied.

Then you can instead opt to use `curl --manual` which will output the
entire man page for curl plus an appended tutorial for the most common use
cases. That is a very thorough and complete document on how each option
works amassing several thousand lines of documentation. To wade through that is also a
tedious work and we encourage use of a search function through those text
Then you can instead opt to use `curl --manual` which will output the entire
man page for curl plus an appended tutorial for the most common use
cases. That is a thorough and complete document on how each option works
amassing several thousand lines of documentation. To wade through that is also
a tedious work and we encourage use of a search function through those text
masses. Some people will appreciate the man page in its [web
version](https://curl.haxx.se/docs/manpage.html).

2 changes: 1 addition & 1 deletion cmdline-passwords.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ insecure.
There are several ways to avoid this, and the key is, of course, then to avoid
protocols or authentication schemes that sends credentials in the plain over
the network. Easiest is perhaps to make sure you use encrypted versions of
protocols. Use HTTPS instead of HTTP, use FTPS instead of FTP and so on.
protocols. Use HTTPS instead of HTTP, use FTPS instead of FTP and so on.

If you need to stick to a plain text and insecure protocol, then see if you
can switch to using an authentication method that avoids sending the
Expand Down
24 changes: 12 additions & 12 deletions cmdline-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ the URL without curl noticing or caring and it will just pass them on.

### Scheme

URLs start with the "scheme", which is the official name for the "http://"
URLs start with the "scheme", which is the official name for the `http://`
part. That tells which protocol the URL uses. The scheme must be a known one
that this version of curl supports or it will show an error message and
stop. Additionally, the scheme must neither start with nor contain any
whitespace.

### The scheme separator

The scheme identifier is separated from the rest of the URL by the "://"
The scheme identifier is separated from the rest of the URL by the `://`
sequence. That is a colon and two forward slashes. There exists URL formats
with only one slash, but curl doesn't support any of them. There are two
additional notes to be aware of, about the number of slashes:
Expand Down Expand Up @@ -64,12 +64,12 @@ incorrect format:

As a convenience, curl also allows users to leave out the scheme part from
URLs. Then it guesses which protocol to use based on the first part of the
host name. That guessing is very basic as it just checks if the first part of
the host name matches one of a set of protocols, and assumes you meant to use
that protocol. This heuristic is based on the fact that servers traditionally
used to be named like that. The protocols that are detected this way are FTP,
DICT, LDAP, IMAP, SMTP and POP3. Any other host name in a scheme-less URL will
make curl default to HTTP.
host name. That guessing is basic, as it just checks if the first part of the
host name matches one of a set of protocols, and assumes you meant to use that
protocol. This heuristic is based on the fact that servers traditionally used
to be named like that. The protocols that are detected this way are FTP, DICT,
LDAP, IMAP, SMTP and POP3. Any other host name in a scheme-less URL will make
curl default to HTTP.

You can modify the default protocol to something other than HTTP with the
`--proto-default` option.
Expand Down Expand Up @@ -246,7 +246,7 @@ keeps previously used connections alive and around for a while after they were
used so that subsequent requests to the same hosts can reuse an already
established connection.

Of course, they can only be kept alive for as long as the curl tool is running,
but it is a very good reason for trying to get several transfers done within
the same command line instead of running several independent curl command line
invocations.
Of course, they can only be kept alive for as long as the curl tool is
running. It is a good reason for trying to get several transfers done
within the same command line instead of running several independent curl
command line invocations.
16 changes: 8 additions & 8 deletions cmdline-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ to modify certain aspects of its operation.

With the curl project's rather speedy release chain with a new release
shipping every eight weeks, it is almost inevitable that you are at least not
always using the very latest released version of curl. Sometimes you may even
use a curl version that is a few years old.
always using the latest released version of curl. Sometimes you may even use a
curl version that is a few years old.

All command-line options described in this book were, of course, added to curl
at some point in time, and only a very small portion of them were available
that fine spring day in 1998 when curl first shipped. You may have reason to
check your version of curl and crosscheck with the curl man page for when
certain options were added. This is especially important if you want to take a
curl command line using a modern curl version back to an older system that
might be running an older installation.
at some point and only a small portion of them were available that fine spring
day in 1998 when curl first shipped. You may have reason to check your version
of curl and crosscheck with the curl man page for when certain options were
added. This is especially important if you want to take a curl command line
using a modern curl version back to an older system that might be running an
older installation.

The developers of curl are working hard to not change existing behavior
though. Command lines written to use curl in 1998, 2003 or 2010 should all be
Expand Down
12 changes: 6 additions & 6 deletions cmdline.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ command-line options through a file—or from stdin—using the -K option.

## Garbage in, garbage out

curl has very little will of its own. It tries to please you and your wishes
to a very large extent. It also means that it will try to play with what you
give it. If you misspell an option, it might do something unintended. If you
pass in a slightly illegal URL, chances are curl will still deal with it and
proceed. It means that you can pass in crazy data in some options and you can
have curl pass on that crazy data in its transfer operation.
curl has little will of its own. It tries to please you and your wishes to a
large extent. It also means that it will try to play with what you give it. If
you misspell an option, it might do something unintended. If you pass in a
slightly illegal URL, chances are curl will still deal with it and proceed. It
means that you can pass in crazy data in some options and you can have curl
pass on that crazy data in its transfer operation.

This is a design choice, as it allows you to really tweak how curl does its
protocol communications and you can have curl massage your server
Expand Down
8 changes: 4 additions & 4 deletions curl-bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Any problem can be considered a bug. A weirdly phrased wording in the manual
that prevents you from understanding something is a bug. A surprising side
effect of combining multiple options can be a bug—or perhaps it should be
better documented? Perhaps the option doesn't do at all what you expected it
to? That's a problem and we should fix it!
to? That's a problem and we should fix it.

### Problems must be known to get fixed

Expand All @@ -28,7 +28,7 @@ problems exist so that we can fix them.

### Fixing the problems

Software engineering is, to a very large degree, about fixing problems. To fix a
Software engineering is, to a large degree, about fixing problems. To fix a
problem a developer needs to understand how to repeat it and to do that the
debugging person needs to be told what set of circumstances that made the
problem trigger.
Expand Down Expand Up @@ -66,8 +66,8 @@ the protocol layer.
The test suite is meant to be possible to run after you have built curl
yourself and there are a fair number of volunteers who also help out by
running the test suite automatically a few times per day to make sure the
latest commits get a run. This way, we hopefully discover the worst flaws
pretty soon after they were introduced.
latest commits get a run. This way, we discover the worst flaws pretty soon
after they were introduced.

We don't test everything and even when we try to test things there will always
be subtle details that get through and that we, sometimes years after the
Expand Down
6 changes: 3 additions & 3 deletions curl-comm.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ of the reasons why we frown upon users who take discussions privately or try
to e-mail individual team members about development issues, questions,
debugging or whatever.

In this day and age, mailing lists may be considered sort of the old style of
In this day, mailing lists may be considered sort of the old style of
communication—no fancy web forums or similar. Using a mailing list is
therefore becoming an art that isn't practised everywhere and may be a bit
strange and unusual to you. But fear not. It is just about sending emails to
an address that then sends that e-mail out to all the subscribers. Our mailing
lists have at most a few thousand subscribers. If you are mailing for the first
time, it might be good to read a few old mails first to get to learn the
lists have at most a few thousand subscribers. If you are mailing for the
first time, it might be good to read a few old mails first to get to learn the
culture and what's considered good practice.

The mailing lists and the bug tracker have changed hosting providers a few
Expand Down
8 changes: 4 additions & 4 deletions curl-devteam.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Daniel Stenberg is the founder and self-proclaimed leader of the
project. Everybody else that participates or contributes in the project has
thus arrived at a later point in time. Some contributors worked for a while
and then left again. Most contributors hang around only for a short while to
get their bug fixed or feature merged or similar. Counting all contributors
we know the names of, we have received help from more than 1700 individuals.
thus arrived at a later point. Some contributors worked for a while and then
left again. Most contributors hang around only for a short while to get their
bug fixed or feature merged or similar. Counting all contributors we know the
names of, we have received help from more than 1700 individuals.

The list of people that have repeatedly shown up in discussions and commits
during the last several years include these stellar individuals:
Expand Down
8 changes: 4 additions & 4 deletions curl-etiquette.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ or "reply to all", and not just reply to the author of the single mail you
reply to.

We are actively discouraging replying back to the single person by setting the
Reply-To: field in outgoing mails back to the mailing list address, making it
harder for people to mail the author only by mistake.
`Reply-To:` field in outgoing mails back to the mailing list address, making
it harder for people to mail the author only by mistake.

#### Use a sensible subject

Expand Down Expand Up @@ -70,7 +70,7 @@ after the quotes that relate to your comment. Then you continue downwards
again.

When most of the quotes have been removed and you have added your own words,
you are done!
you are done.

#### HTML is not for mails

Expand Down Expand Up @@ -98,7 +98,7 @@ reply to.
Change the subject name to something sensible and related to the subject,
preferably even the actual subject of the single mail you wanted to reply to.

#### Please tell us how you solved the problem!
#### Please tell us how you solved the problem

Many people mail questions to the list, people spend some of their time and
make an effort in providing good answers to these questions.
Expand Down
2 changes: 1 addition & 1 deletion curl-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ were not aware of them by the time our curl came to be.
### Pronunciation

Most of us pronounce "curl" with an initial k sound, just like the English
word curl. It rhymes with words like girl and earl. Merriam Webster has a
word curl. It rhymes with words like girl and earl. Merriam Webster has a
[short WAV file](https://media.merriam-webster.com/soundc11/c/curl0001.wav) to
help.

Expand Down
Loading

0 comments on commit 1f92fb6

Please sign in to comment.