Class: Protocol::HTTP::Header::Vary
- Defined in:
- lib/protocol/http/header/vary.rb
Overview
Represents the ‘vary` header, which specifies the request headers a server considers when determining the response.
The ‘vary` header is used in HTTP responses to indicate which request headers affect the selected response. It allows caches to differentiate stored responses based on specific request headers.
Constant Summary
Constants inherited from Split
Instance Method Summary collapse
-
#<<(value) ⇒ Object
Adds one or more comma-separated values to the ‘vary` header.
-
#initialize(value) ⇒ Vary
constructor
Initializes a ‘Vary` header with the given value.
Methods inherited from Split
Constructor Details
#initialize(value) ⇒ Vary
Initializes a ‘Vary` header with the given value. The value is split into distinct entries and converted to lowercase for normalization.
18 19 20 |
# File 'lib/protocol/http/header/vary.rb', line 18 def initialize(value) super(value.downcase) end |
Instance Method Details
#<<(value) ⇒ Object
Adds one or more comma-separated values to the ‘vary` header. The values are converted to lowercase for normalization.
25 26 27 |
# File 'lib/protocol/http/header/vary.rb', line 25 def << value super(value.downcase) end |