Skip to content

Commit f0b6af2

Browse files
committed
Fix documentation.
1 parent 02958d0 commit f0b6af2

File tree

13 files changed

+17
-19
lines changed

13 files changed

+17
-19
lines changed

lib/protocol/http/header/accept.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ def to_s
9393
end
9494

9595
# Whether this header is acceptable in HTTP trailers.
96-
# Accept headers in trailers can provide content negotiation hints for subsequent responses.
97-
# @returns [Boolean] false, as Accept headers are generally not needed in trailers.
96+
# @returns [Boolean] `false`, as Accept headers are generally not needed in trailers.
9897
def self.trailer?
9998
false
10099
end

lib/protocol/http/header/authorization.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ def self.basic(username, password)
3131
strict_base64_encoded = ["#{username}:#{password}"].pack("m0")
3232

3333
self.new(
34-
"Basic #{strict_base64_encoded}"
35-
)
34+
"Basic #{strict_base64_encoded}"
35+
)
3636
end
3737

3838
# Whether this header is acceptable in HTTP trailers.
3939
# Authorization credentials must not appear in trailers for security reasons.
40-
# @returns [Boolean] false, as authorization headers contain sensitive credentials.
40+
# @returns [Boolean] `false`, as authorization headers must be in the header of the request to be useful.
4141
def self.trailer?
4242
false
4343
end

lib/protocol/http/header/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def upgrade?
5353

5454
# Whether this header is acceptable in HTTP trailers.
5555
# Connection headers control the current connection and must not appear in trailers.
56-
# @returns [Boolean] false, as connection headers are hop-by-hop and forbidden in trailers.
56+
# @returns [Boolean] `false`, as connection headers are hop-by-hop and forbidden in trailers.
5757
def self.trailer?
5858
false
5959
end

lib/protocol/http/header/cookie.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def to_h
2626

2727
# Whether this header is acceptable in HTTP trailers.
2828
# Cookie headers should not appear in trailers as they contain state information needed early in processing.
29-
# @returns [Boolean] false, as cookie headers are needed during initial request processing.
29+
# @returns [Boolean] `false`, as cookie headers are needed during initial request processing.
3030
def self.trailer?
3131
false
3232
end

lib/protocol/http/header/date.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def to_time
2828

2929
# Whether this header is acceptable in HTTP trailers.
3030
# Date headers can safely appear in trailers as they provide metadata about response generation.
31-
# @returns [Boolean] true, as date headers are metadata that can be computed after response generation.
31+
# @returns [Boolean] `true`, as date headers are metadata that can be computed after response generation.
3232
def self.trailer?
3333
true
3434
end

lib/protocol/http/header/digest.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def entries
5959
end
6060
end
6161

62-
# Digest headers are perfect for use as trailers since they contain
63-
# integrity hashes that can only be calculated after the entire message body is available.
62+
# Whether this header is acceptable in HTTP trailers.
63+
# @returns [Boolean] `true`, as digest headers contain integrity hashes that can only be calculated after the entire message body is available.
6464
def self.trailer?
6565
true
6666
end

lib/protocol/http/header/etag.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def weak?
2828

2929
# Whether this header is acceptable in HTTP trailers.
3030
# ETag headers can safely appear in trailers as they provide cache validation metadata.
31-
# @returns [Boolean] true, as ETag headers are metadata that can be computed after response generation.
31+
# @returns [Boolean] `true`, as ETag headers are metadata that can be computed after response generation.
3232
def self.trailer?
3333
true
3434
end

lib/protocol/http/header/multiple.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def to_s
2828

2929
# Whether this header is acceptable in HTTP trailers.
3030
# This is a base class for headers with multiple values, default is to disallow in trailers.
31-
# @returns [Boolean] false, as most multiple-value headers should not appear in trailers by default.
31+
# @returns [Boolean] `false`, as most multiple-value headers should not appear in trailers by default.
3232
def self.trailer?
3333
false
3434
end

lib/protocol/http/header/server_timing.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def metrics
8484
end
8585
end
8686

87-
# Server-Timing headers are safe to use as trailers since they contain
88-
# performance metrics that are typically calculated during response generation.
87+
# Whether this header is acceptable in HTTP trailers.
88+
# @returns [Boolean] `true`, as server-timing headers contain performance metrics that are typically calculated during response generation.
8989
def self.trailer?
9090
true
9191
end

lib/protocol/http/header/split.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def to_s
4242

4343
# Whether this header is acceptable in HTTP trailers.
4444
# This is a base class for comma-separated headers, default is to disallow in trailers.
45-
# @returns [Boolean] false, as most comma-separated headers should not appear in trailers by default.
45+
# @returns [Boolean] `false`, as most comma-separated headers should not appear in trailers by default.
4646
def self.trailer?
4747
false
4848
end

0 commit comments

Comments
 (0)