Skip to content

Commit 4803d6c

Browse files
authored
Fix all the typos (#1316)
1 parent 6ed9dc7 commit 4803d6c

19 files changed

Lines changed: 33 additions & 33 deletions

guides/https.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ So far this document has focused on configuring Plug to handle TLS within the ap
236236

237237
### Pros and Cons
238238

239-
Offloading might be done to achieve higher throughput, or to stick to the more widely used OpenSSL implementation of the TLS protocol. The Erlang/OTP implementation depends on OpenSSL for the underlying cryptography, but it implements its own message framing and protocol state machine. While it is not clear that one implementation is inherently more secure than the other, just patching OpenSSL along with everybody else in case of vulnerabilities might give peace of mind, compared to than having to research the implications on the Erlang/OTP implementation.
239+
Offloading might be done to achieve higher throughput, or to stick to the more widely used OpenSSL implementation of the TLS protocol. The Erlang/OTP implementation depends on OpenSSL for the underlying cryptography, but it implements its own message framing and protocol state machine. While it is not clear that one implementation is inherently more secure than the other, just patching OpenSSL along with everybody else in case of vulnerabilities might give peace of mind, compared to having to research the implications on the Erlang/OTP implementation.
240240

241241
On the other hand, the proxy solution might not support end-to-end HTTP 2, limiting the benefits of the new protocol. It can also introduce operational complexities and new resource constraints, especially for long-lived connections such as WebSockets.
242242

lib/plug.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Plug do
44
55
## Types of plugs
66
7-
There are two kind of plugs: function plugs and module plugs.
7+
There are two kinds of plugs: function plugs and module plugs.
88
99
### Function plugs
1010
@@ -77,7 +77,7 @@ defmodule Plug do
7777
Run a series of plugs at runtime.
7878
7979
The plugs given here can be either a tuple, representing a module plug
80-
and their options, or a simple function that receives a connection and
80+
and its options, or a simple function that receives a connection and
8181
returns a connection.
8282
8383
If any plug halts, the connection won't invoke the remaining plugs. If the

lib/plug/application.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Plug.Application do
33
use Application
44

55
def start(_, _) do
6-
# While Plug.Crypto provides its own cache, Plug ship its own too,
6+
# While Plug.Crypto provides its own cache, Plug ships its own too,
77
# both to keep storages separate and for backwards compatibility.
88
Plug.Keys = :ets.new(Plug.Keys, [:named_table, :public, read_concurrency: true])
99

lib/plug/basic_auth.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule Plug.BasicAuth do
3131
Both approaches shown above rely on static configuration. Let's see
3232
alternatives.
3333
34-
## Runtime-time usage
34+
## Runtime usage
3535
3636
As any other Plug, we can use the `basic_auth` at runtime by simply
3737
wrapping it in a function:

lib/plug/conn.ex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ defmodule Plug.Conn do
6565
6666
More can be stored in a session cookie, but be careful: this makes requests
6767
and responses heavier, and clients may reject cookies beyond a certain size.
68-
Also, session cookie are not shared between a user's different browsers or devices.
68+
Also, session cookies are not shared between a user's different browsers or devices.
6969
If the session is stored elsewhere, such as a database, the browser only has to
7070
store the session key and therefore more data can be stored in the session.
7171
@@ -125,7 +125,7 @@ defmodule Plug.Conn do
125125
126126
## Custom status codes
127127
128-
`Plug` allows status codes to be overridden or added and allow new codes not directly
128+
`Plug` allows status codes to be overridden or added and allows new codes not directly
129129
specified by `Plug` or its adapters. The `:plug` application's Mix config can add or
130130
override a status code.
131131
@@ -1218,8 +1218,8 @@ defmodule Plug.Conn do
12181218
> #### Request length {: .warning}
12191219
>
12201220
> The `:length` option tracks the maximum length within a single call.
1221-
> When doing multiple across to `read_part_headers/2` and `read_part_body/2`,
1222-
> it is your responsability to track the overall response length.
1221+
> When doing multiple calls to `read_part_headers/2` and `read_part_body/2`,
1222+
> it is your responsibility to track the overall response length.
12231223
"""
12241224
@spec read_part_headers(t, Keyword.t()) ::
12251225
{:ok, headers, t} | {:error, :too_large, t} | {:done, t}
@@ -1276,8 +1276,8 @@ defmodule Plug.Conn do
12761276
> #### Request length {: .warning}
12771277
>
12781278
> The `:length` option tracks the maximum length within a single call.
1279-
> When doing multiple across to `read_part_headers/2` and `read_part_body/2`,
1280-
> it is your responsability to track the overall response length.
1279+
> When doing multiple calls to `read_part_headers/2` and `read_part_body/2`,
1280+
> it is your responsibility to track the overall response length.
12811281
"""
12821282
@spec read_part_body(t, Keyword.t()) :: {:ok, binary, t} | {:more, binary, t} | {:done, t}
12831283
def read_part_body(%Conn{adapter: {adapter, state}} = conn, opts) do
@@ -1456,7 +1456,7 @@ defmodule Plug.Conn do
14561456
If the upgrade is accepted by the adapter, the returned `Plug.Conn` will have a `state` of
14571457
`:upgraded`. This state is considered equivalently to a 'sent' state, and is subject to the same
14581458
limitation on subsequent mutating operations. Note that there is no guarantee or expectation
1459-
that the actual upgrade process has succeeded, or event that it is undertaken within this
1459+
that the actual upgrade process has succeeded, or even that it is undertaken within this
14601460
function; it is entirely possible (likely, even) that the server will only do the actual upgrade
14611461
later in the connection lifecycle.
14621462

lib/plug/conn/adapter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ defmodule Plug.Conn.Adapter do
173173
@doc """
174174
Attempt to upgrade the connection with the client.
175175
176-
If the adapter does not support the indicated upgrade, then `{:error, :not_supported}` should be
176+
If the adapter does not support the indicated upgrade, then `{:error, :not_supported}` should
177177
be returned.
178178
179179
If the adapter supports the indicated upgrade but is unable to proceed with it (due to

lib/plug/csrf_protection.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ defmodule Plug.CSRFProtection do
122122
message =
123123
"invalid CSRF (Cross Site Request Forgery) token, please make sure that:\n\n" <>
124124
" * The session cookie is being sent and session is loaded\n" <>
125-
" * The request include a valid '_csrf_token' param or 'x-csrf-token' header"
125+
" * The request includes a valid '_csrf_token' param or 'x-csrf-token' header"
126126

127127
defexception message: message, plug_status: 403
128128
end

lib/plug/parsers/multipart.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule Plug.Parsers.MULTIPART do
3131
## Multipart to params
3232
3333
Once all multiparts are collected, they must be converted to params and this
34-
can be customize with a MFA. The default implementation of this function
34+
can be customized with an MFA. The default implementation of this function
3535
is equivalent to:
3636
3737
def multipart_to_params(parts, conn) do
@@ -62,7 +62,7 @@ defmodule Plug.Parsers.MULTIPART do
6262
6363
## Dynamic configuration
6464
65-
If you need to dynamically configure how `Plug.Parsers.MULTIPART` behave,
65+
If you need to dynamically configure how `Plug.Parsers.MULTIPART` behaves,
6666
for example, based on the connection or another system parameter, one option
6767
is to create your own parser that wraps it:
6868

lib/plug/router.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ defmodule Plug.Router do
125125
Handling request data can be done through the
126126
[`Plug.Parsers`](https://hexdocs.pm/plug/Plug.Parsers.html#content) plug. It
127127
provides support for parsing URL-encoded, form-data, and JSON data as well as
128-
providing a behaviour that others parsers can adopt.
128+
providing a behaviour that other parsers can adopt.
129129
130-
Here is an example of `Plug.Parsers` can be used in a `Plug.Router` router to
130+
Here is an example of how `Plug.Parsers` can be used in a `Plug.Router` router to
131131
parse the JSON-encoded body of a POST request:
132132
133133
defmodule AppRouter do

lib/plug/session/cookie.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defmodule Plug.Session.COOKIE do
1818
1919
## Options
2020
21-
* `:secret_key_base` - the secret key base to built the cookie
21+
* `:secret_key_base` - the secret key base to build the cookie
2222
signing/encryption on top of. If one is given on initialization,
2323
the cookie store can precompute all relevant values at compilation
2424
time. Otherwise, the value is taken from `conn.secret_key_base`

0 commit comments

Comments
 (0)