Skip to content

Commit 9fb1d6e

Browse files
committed
fix: gramatic issues
1 parent db8d1c8 commit 9fb1d6e

File tree

11 files changed

+16
-17
lines changed

11 files changed

+16
-17
lines changed

src/Std/Internal/Http/Data/Body.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public section
1414
/-!
1515
# Body
1616
17-
This module defines the `Body` type, which represents the body of a HTTP request or response.
17+
This module defines the `Body` type, which represents the body of an HTTP request or response.
1818
-/
1919

2020
namespace Std.Http
@@ -101,7 +101,7 @@ def collectByteArray (body : Body) : Async ByteArray := do
101101

102102
/--
103103
Collect all data from the body into a single `String`. This reads the entire body content into memory,
104-
so use with caution for large bodies as it may consume significant memory. If it's a valid UTF8 string
104+
so use with caution for large bodies as it may consume significant memory. If it is a valid UTF-8 string
105105
then it will return `some` otherwise `none`.
106106
-/
107107
def collectString (body : Body) : Async (Option String) := do

src/Std/Internal/Http/Data/Body/Length.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public section
1313
/-!
1414
# Length
1515
16-
This module defines the `Length` structure, that represents the content-length or transfer-encoding
17-
of a HTTP Request or response.
16+
This module defines the `Length` structure, that represents the Content-Length or Transfer-Encoding
17+
of an HTTP Request or response.
1818
-/
1919

2020
namespace Std.Http.Body

src/Std/Internal/Http/Data/Chunk.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def withExtension (chunk : Chunk) (key : String) (value : String) : Chunk :=
5757

5858
/--
5959
Returns the total size of the chunk including data and formatted extensions. Extensions are formatted
60-
as: ;name=value;name=value Plus 2 bytes for \r\n at the end.
60+
as: ;name=value;name=value. Plus 2 bytes for \r\n at the end.
6161
-/
6262
def size (chunk : Chunk) : Nat :=
6363
let extensionsSize := chunk.extensions.foldl (fun acc (name, value) => acc + name.length + (value.map (fun v => v.length + 1) |>.getD 0) + 1) 0

src/Std/Internal/Http/Data/Method.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public section
1414
/-!
1515
# Method
1616
17-
This module provides the `Method` type, that represents an TTP request methods. It defines the
17+
This module provides the `Method` type, that represents HTTP request methods. It defines the
1818
standard set of HTTP methods (e.g. `GET`, `POST`, `PUT`, `DELETE`).
1919
-/
2020

src/Std/Internal/Http/Data/Request.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public section
1818
/-!
1919
# Request
2020
21-
This module provides the `Request` type, which represents am HTTP request. It also defines ways
21+
This module provides the `Request` type, which represents an HTTP request. It also defines ways
2222
to build a `Request` using functions that make it easier.
2323
-/
2424

src/Std/Internal/Http/Data/Status.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public section
1313
/-!
1414
# Status
1515
16-
This module contains `Status` that is a representation of HTTP status codes. Status codes are three-digit
17-
integer codes that describes the result of a HTTP request. In this implementation we do not treat status
16+
This module defines the `Status` type, which is a representation of HTTP status codes. Status codes are three-digit
17+
integer codes that describe the result of an HTTP request. In this implementation we do not treat status
1818
code as extensible.
1919
2020
* Reference: https://httpwg.org/specs/rfc9110.html#status.codes
@@ -27,7 +27,7 @@ set_option linter.all true
2727
open Internal
2828

2929
/--
30-
HTTP Status codes. Status codes are three-digit integer codes that describes the result of a
30+
HTTP Status codes. Status codes are three-digit integer codes that describe the result of an
3131
HTTP request. In this implementation we do not treat status code as extensible.
3232
3333
* Reference: https://httpwg.org/specs/rfc9110.html#status.codes

src/Std/Internal/Http/Protocol/H1/Event.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ inductive Event (dir : Direction)
3838
| gotData (final : Bool) (data : ByteSlice)
3939

4040
/--
41-
Need more data is an event that arrives when the input ended and it requires more
42-
data to continue
41+
Event received when the input ends and more data is required to continue
4342
-/
4443
| needMoreData (size : Option Nat)
4544

src/Std/Internal/Http/Protocol/H1/Reader.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ inductive Reader.State (dir : Direction) : Type
4949
-/
5050
| requireOutgoing : Body.Length → State dir
5151

52-
/-
52+
/--
5353
State that it completed a single request and can go to the next one
5454
-/
5555
| complete

src/Std/Internal/Http/Protocol/H1/Writer.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ inductive Writer.State
5252
-/
5353
| shuttingDown
5454

55-
/-
55+
/--
5656
State that it completed a single request and can go to the next one
5757
-/
5858
| complete

src/Std/Internal/Http/Server/Config.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public section
1414
/-!
1515
# Config
1616
17-
This module exposes the `Config` that is a structure that describes all the timeout, request, headers
18-
configuration of a HTTP Server.
17+
This module exposes the `Config`, a structure that describes all the timeout, request, headers
18+
configuration of an HTTP Server.
1919
-/
2020

2121
namespace Std.Http

0 commit comments

Comments
 (0)