Skip to content

Commit

Permalink
reduce use of double quotes
Browse files Browse the repository at this point in the history
- mostly by just removing them

- in some instances use italics instead

- in some cases rephrase
  • Loading branch information
bagder committed Jan 13, 2024
1 parent d01a748 commit e6c6548
Show file tree
Hide file tree
Showing 60 changed files with 207 additions and 209 deletions.
6 changes: 3 additions & 3 deletions build/autotools.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Autotools

The "Autotools" are a collection of different tools that used together generate
The Autotools are a collection of different tools that used together generate
the `configure` script. The configure script is run by the user who wants to
build curl and it does a whole bunch of things:

Expand All @@ -15,7 +15,7 @@ build curl and it does a whole bunch of things:
built to use.

- It specifies on which file path the generated installation should be placed
when ultimately the build is made and "make install" is invoked.
when ultimately the build is made and `make install` is invoked.

In the most basic usage, just running `./configure` in the source directory is
enough. When the script completes, it outputs a summary of what options it has
Expand All @@ -42,7 +42,7 @@ setup for the particular target system for which you want to build. How to get
and install that system is not covered in this book.

Once you have a cross compiler, you can instruct configure to use that
compiler instead of the "native" compiler when it builds curl so that the end
compiler instead of the native compiler when it builds curl so that the end
result then can be moved over and used on the other machine.

## Static linking
Expand Down
2 changes: 1 addition & 1 deletion build/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ point configure to a custom install path prefix where it can find BearSSL:

./configure --with-rustls

When told to use "rustls", curl is actually trying to find and use the
When told to use rustls, curl is actually trying to find and use the
rustls-ffi library - the C API for the rustls library. configure detects
rustls-ffi in its default path by default. You can optionally point configure
to a custom install path prefix where it can find rustls-ffi:
Expand Down
2 changes: 1 addition & 1 deletion cmdline/urls/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ also allows that information to be provide with normal command-line options,
outside of the URL.

If you want a non-ASCII letter or maybe a `:` or `@` as part of the user name
and/or password, remember to "URL-encode" that letter: write it as `%HH` where
and/or password, remember to URL encode that letter: write it as `%HH` where
`HH` is the hexadecimal byte value. `:` is `%3a` and `@` is `%40`.
4 changes: 2 additions & 2 deletions cmdline/urls/fragment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fragment

URLs offer a fragment part. That is usually seen as a hash symbol (#) and a
URLs offer a fragment part. That is usually seen as a hash symbol (`#`) and a
name for a specific name within a webpage in browsers. An example of such a
URL might look like:

Expand All @@ -15,7 +15,7 @@ the fragment, make sure to pass it URL-encoded, as `%23`:

curl https://www.example.com/info.html%23the-plot

## The "fragment trick"
## A fragment trick

The fact that the fragment part is not actually used over the network can be
taken advantage of when you craft command lines.
Expand Down
10 changes: 5 additions & 5 deletions ftp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ actual data transfer.
## Transfer mode

When an FTP client is about to transfer data, it specifies to the server which
"transfer mode" it would like the upcoming transfer to use. The two transfer
transfer mode it would like the upcoming transfer to use. The two transfer
modes curl supports are 'ASCII' and 'BINARY'. Ascii is for text and usually
means that the server sends the files with converted newlines while binary
means sending the data unaltered and assuming the file is not text.
Expand All @@ -37,10 +37,10 @@ instead with `-B, --use-ascii` or by making sure the URL ends with `;type=A`.
## Authentication

FTP is one of the protocols you normally do not access without a user name and
password. It just happens that for systems that allow "anonymous" FTP access
you can login with pretty much any name and password you like. When curl is
used on an FTP URL to do transfer without any given user name or password, it
uses the name `anonymous` with the password `ftp@example.com`.
password. It just happens that for systems that allow anonymous FTP access you
can login with pretty much any name and password you like. When curl is used
on an FTP URL to do transfer without any given user name or password, it uses
the name `anonymous` with the password `ftp@example.com`.

If you want to provide another user name and password, you can pass them on to
curl either with the `-u, --user` option or embed the info in the URL:
Expand Down
9 changes: 4 additions & 5 deletions ftp/cmds.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ the FTP command with a dash:

curl -Q -NOOP ftp://example.com/file

The third "position in time" that curl offers to send the commands, is after
curl has changed the working directory, just **before the commands** that kick
off the transfer are sent. To send command then, prefix the command with a '+'
(plus).
curl also offers to send commands after it changes the working directory, just
**before the commands** that kick off the transfer are sent. To send command
then, prefix the command with a '+' (plus).

## A series of commands

Expand All @@ -53,7 +52,7 @@ Example, rename a file then do a transfer:
You can opt to send individual quote commands that are allowed to fail, to get
an error returned from the server without causing everything to stop.

You make the command "fallible" by prefixing it with an asterisk (`*`). For
You make the command fallible by prefixing it with an asterisk (`*`). For
example, send a delete (`DELE`) after a transfer and allow it to fail:

curl -Q "-*DELE file" ftp://example.com/moo
7 changes: 4 additions & 3 deletions ftp/twoconnections.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ several reasons.
## Active connections

The client can opt to ask the server to connect to the client to set it up, a
so-called "active" connection. This is done with the PORT or EPRT
so-called *active* connection. This is done with the PORT or EPRT
commands. Allowing a remote host to connect back to a client on a port that
the client opens up requires that there is no firewall or other network
appliance in between that refuses that to go through and that is far from
Expand All @@ -30,10 +30,11 @@ command than PORT) with the `--no-eprt` command-line option.

## Passive connections

Curl defaults to asking for a "passive" connection, which means it sends a
Curl defaults to asking for a *passive* connection, which means it sends a
PASV or EPSV command to the server and then the server opens up a new port for
the second connection that then curl connects to. Outgoing connections to a
new port are generally easier and less restricted for end users and clients, but it then requires that the network in the server's end allows it.
new port are generally easier and less restricted for end users and clients
but requires that the network in the server's end allows it.

Passive connections are enabled by default, but if you have switched on active
before, you can switch back to passive with `--ftp-pasv`.
Expand Down
6 changes: 3 additions & 3 deletions get/linux.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Linux

Linux distributions come with "packager managers" that let you install
software that they offer. Most Linux distributions offer curl and libcurl to
be installed if they are not installed by default.
Linux distributions come with packager managers that let you install software
that they offer. Most Linux distributions offer curl and libcurl to be
installed if they are not installed by default.

## Ubuntu and Debian

Expand Down
2 changes: 1 addition & 1 deletion get/win-vcpkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[Vcpkg](https://github.com/microsoft/vcpkg/) helps you manage C and C++
libraries on Windows, Linux and MacOS.

There is no "curl" package on vcpkg, only libcurl.
There is no curl package on vcpkg, only libcurl.

## Install libcurl

Expand Down
2 changes: 1 addition & 1 deletion http/altsvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[RFC 7838](https://www.rfc-editor.org/rfc/rfc7838.txt) defines an HTTP header
which lets a server tell a client that there is one or more *alternatives* for
that server at "another place" with the use of the `Alt-Svc:` response header.
that server at another place with the use of the `Alt-Svc:` response header.

The *alternatives* the server suggests can include a server running on another
port on the same host, on another completely different hostname and it can
Expand Down
2 changes: 1 addition & 1 deletion http/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ option to provide user name and password (separated with a colon). Like this:

curl --user daniel:secret http://example.com/

This makes curl use the default "Basic" HTTP authentication method. Yes, it is
This makes curl use the default *Basic* HTTP authentication method. Yes, it is
actually called Basic and it is truly basic. To explicitly ask for the basic
method, use `--basic`.

Expand Down
8 changes: 4 additions & 4 deletions http/conditionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Sometimes users want to avoid downloading a file again if the same file maybe
already has been downloaded the day before. This can be done by making the
HTTP transfer "conditioned" on something. curl supports two different
HTTP transfer conditioned on something. curl supports two different
conditions: the file timestamp and etag.

## Check by modification date
Expand Down Expand Up @@ -36,7 +36,7 @@ remote file had:

## Check by modification of content

HTTP servers can return a specific "ETag" for a given resource version. If the
HTTP servers can return a specific *ETag* for a given resource version. If the
resource at a given URL changes, a new Etag value must be generated, so a
client knows that as long as the ETag remains the same, the content has not
changed.
Expand All @@ -46,8 +46,8 @@ or file dates. It also then makes the check able to detect sub-second changes,
which the timestamp based checks cannot.

Using curl you can download a remote file and save its ETag (if it provides
any) in a separate "cache" by using the `--etag-save` command line
option. Like this:
any) in a separate cache by using the `--etag-save` command line option. Like
this:

curl --etag-save etags.txt https://example.com/file -o output

Expand Down
13 changes: 7 additions & 6 deletions http/cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ important for how long the cookie should live on.

The expiry of a cookie is either set to a fixed time in the future (or to live
a number of seconds) or it gets no expiry at all. A cookie without an expire
time is called a "session cookie" and is meant to live during the "session" but not longer. A session in this aspect is typically thought to be the life
time of the browser used to view a site. When you close the browser, you end
your session. Doing HTTP operations with a command-line client that supports
time is called a session cookie and is meant to live during the *session* but
not longer. A session in this aspect is typically thought to be the life time
of the browser used to view a site. When you close the browser, you end your
session. Doing HTTP operations with a command-line client that supports
cookies begs the question of when a session really ends…

## Cookie engine

The general concept of curl only doing the bare minimum unless you tell it
differently makes it not acknowledge cookies by default. You need to switch on
"the cookie engine" to make curl keep track of cookies it receives and then
the cookie engine to make curl keep track of cookies it receives and then
subsequently send them out on requests that have matching cookies.

You enable the cookie engine by asking curl to read or write cookies. If you
Expand Down Expand Up @@ -60,8 +61,8 @@ of the same input file would use the original cookie contents again.

## Writing cookies to file

The place where cookies are stored is sometimes referred to as the "cookie
jar". When you enable the cookie engine in curl and it has received cookies,
The place where cookies are stored is sometimes referred to as the cookie
jar. When you enable the cookie engine in curl and it has received cookies,
you can instruct curl to write down all its known cookies to a file, the
cookie jar, before it exits. It is important to remember that curl only
updates the output cookie jar on exit and not during its lifetime, no matter
Expand Down
2 changes: 1 addition & 1 deletion http/https.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HTTPS

HTTPS is in effect Secure HTTP. The "secure" part means that the TCP transport
HTTPS is in effect Secure HTTP. The secure part means that the TCP transport
layer is enhanced to provide authentication, privacy (encryption) and data
integrity by the use of TLS.

Expand Down
4 changes: 2 additions & 2 deletions http/modify/fragment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Fragment

A URL may contain an "anchor", also known as a fragment, which is written with
a pound sign and string at the end of the URL. Like for example
A URL may contain an anchor, also known as a fragment, which is written with a
pound sign and string at the end of the URL. Like for example
`http://example.com/foo.html#here-it-is`. That fragment part, everything from
the pound/hash sign to the end of the URL, is only intended for local use and
is not sent over the network. curl simply strips that data off and discards
Expand Down
22 changes: 11 additions & 11 deletions http/multipart.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Multipart formposts

A multipart formpost is what an HTTP client sends when an HTML form is
submitted with *enctype* set to "multipart/form-data". It is an HTTP POST
request sent with the request body specially formatted as a series of "parts",
submitted with *enctype* set to `multipart/form-data`. It is an HTTP POST
request sent with the request body specially formatted as a series of parts,
separated with MIME boundaries.

An example piece of HTML would look like this:
Expand Down Expand Up @@ -56,7 +56,7 @@ The **Expect** header is explained in the [Expect 100 continue](post/expect100.m
chapter.

The **Content-Type** header is a bit special. It tells that this is a
multipart formpost and then it sets the "boundary" string. The boundary string
multipart formpost and then it sets the boundary string. The boundary string
is a line of characters with a bunch of random digits somewhere in it, that
serves as a separator between the different parts of the form that is
submitted. The particular boundary you see in this example has the random part
Expand Down Expand Up @@ -108,7 +108,7 @@ to submit a multipart form as seen in HTML.
instance. Submit the form and watch how `nc` shows it. Then translate into
a curl command line.

2. Use the "development tools" in your favorite browser and inspect the POST
2. Use the development tools in your favorite browser and inspect the POST
request in the network tab after you have submitted it. Then convert that
HTTP data to a curl command line. Unfortunately, the
[copy as curl](../usingcurl/copyas.md) feature in the browsers usually do
Expand All @@ -129,20 +129,20 @@ An example action looks like this:

If the form is found in a webpage hosted on a URL like for example
`https://example.com/user/login` the `action=submit.cgi` is a relative path
within the same "directory" as the form itself. The full URL to submit this
form thus becomes `https://example.com/user/submit.cgi`. That is the URL to
use in the curl command line.
within the same directory as the form itself. The full URL to submit this form
thus becomes `https://example.com/user/submit.cgi`. That is the URL to use in
the curl command line.

Next, you must identify every `<input>` tag used within the form, including
the ones that are marked as "hidden". Hidden just means that they are not
shown in the webpage, but they should still be sent in the POST.
the ones that are marked as hidden. Hidden just means that they are not shown
in the webpage, but they should still be sent in the POST.

For every `<input>` in the form there should be a corresponding `-F` in the
command line.

### text input

A regular tag using type "text" in the style like
A regular tag using type text in the style like

<input type="text" name="person">

Expand All @@ -152,7 +152,7 @@ should then set the field name with content like this:

### file input

When the input type is set to a "file", like in:
When the input type is set to a file, like in:

<input type="file" name="image">

Expand Down
8 changes: 4 additions & 4 deletions http/postvspost.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ type=file>` tag, for file uploads.

The default `enctype` used by forms, which is rarely spelled out in HTML since
it is default, is `application/x-www-form-urlencoded`. It makes the browser
"URL encode" the input as name=value pairs with the data encoded to avoid
unsafe characters. We often refer to that as a [regular POST](post.md),
and you perform one with curl's `-d` and friends.
URL encode the input as name=value pairs with the data encoded to avoid unsafe
characters. We often refer to that as a [regular POST](post.md), and you
perform one with curl's `-d` and friends.

## POST outside of HTML

POST is a regular HTTP method and there is no requirement that it be triggered
by HTML or involve a browser. Lots of services, APIs and other systems allow
you to pass in data these days in order to get things done.

If these services expect plain "raw" data or perhaps data formatted as JSON or
If these services expect plain raw data or perhaps data formatted as JSON or
similar, you want the [regular POST](post.md) approach. curl's `-d` option
does not alter or encode the data at all but just sends exactly what you tell
it to. Just pay attention that `-d` sets a default `Content-Type:` that might
Expand Down
6 changes: 3 additions & 3 deletions http/response.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ response code would indicate that the requested document could not be
delivered (or similar). curl considers a successful sending and receiving of
HTTP to be good.

The first digit of the HTTP response code is a kind of "error class":
The first digit of the HTTP response code is a kind of error class:

- 1xx: transient response, more is coming
- 2xx: success
Expand All @@ -55,13 +55,13 @@ numeric range and you can use `--write-out` to extract that code as well.

## Chunked transfer encoding

An HTTP 1.1 server can decide to respond with a "chunked" encoded response, a
An HTTP 1.1 server can decide to respond with a chunked encoded response, a
feature that was not present in HTTP 1.0.

When receiving a chunked response, there is no Content-Length: for the
response to indicate its size. Instead, there is a `Transfer-Encoding:
chunked` header that tells curl there is chunked data coming and then in the
response body, the data comes in a series of "chunks". Every individual chunk
response body, the data comes in a series of chunks. Every individual chunk
starts with the size of that particular chunk (in hexadecimal), then a newline
and then the contents of the chunk. This is repeated over and over until the
end of the response, which is signaled with a zero sized chunk. The point of
Expand Down
6 changes: 3 additions & 3 deletions http/versions/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ To ask a server to use HTTP/2, just:
If your curl does not support HTTP/2, that command line tool returns an error
saying so. Running `curl -V` shows if your version of curl supports it.

If you by some chance already know that your server speaks HTTP/2 (for example,
within your own controlled environment where you know exactly what runs in
your machines) you can shortcut the HTTP/2 "negotiation" with
If you by some chance already know that your server speaks HTTP/2 (for
example, within your own controlled environment where you know exactly what
runs in your machines) you can shortcut the HTTP/2 negotiation with
`--http2-prior-knowledge`.

## Multiplexing
Expand Down
4 changes: 2 additions & 2 deletions internals/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ functionality. In these different areas there are multiple different providers:
Applications (in the upper yellow cloud) access libcurl through the public
API. The API is fixed and stable.

Internally, the "core" of libcurl uses internal APIs to perform the different
Internally, the core of libcurl uses internal APIs to perform the different
duties it needs to do. Each of these internal APIs are powered by alternative
implementations, in many times powered by different third party libraries.

The image above shows the different third party libraries powering different
internal APIs. The purple boxes are "one or more" and the dark gray ones are
internal APIs. The purple boxes are one or more and the dark gray ones are
"one of these".
2 changes: 1 addition & 1 deletion internals/caches.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ slow) resolve operation again. This cache exists in memory only.

## connection cache

Also known as the connection pool. This is where curl puts "live connections"
Also known as the connection pool. This is where curl puts live connections
after a transfer is complete so that a subsequent transfer might be able to
use an already existing connection instead of having to set a new one up. When
a connection is reused, curl avoids name lookups, TLS handshakes and more.
Expand Down
Loading

0 comments on commit e6c6548

Please sign in to comment.