You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users must have a easy way to use the raw or converted to ruby objects values of the request or response headers specified in the RFC [1, 2].
The user could access the header via a Hash object for raw values, the keys of this Hash should be compliant with HTTP RFC (capitalize first letter, splitting with hyphen, etc). Ex.: headers["Accept-Encoding"]
The user could also access via a helper method (lowercase and subst hyphen by underline pattern) the ruby object for special values, such as date, cache-control, etc. Ex.: headers.accept_encoding
The user could check for header existence with headers.accept_encoding?
The user could also retrieve the raw values with headers.accept_encoding!
Only RFC specified headers are accessed by these helpers, extensions should be available only by the Hash.
For complex values, the implementation should do a lazy instantiation of the objects involved.
For value types, check [3, 4]. The lists below shows what value a header will get after converting from raw value. Some of the headers will be improved on later milestones (check "improve later" headers, below):
Users must have a easy way to use the raw or converted to ruby objects values of the request or response headers specified in the RFC [1, 2].
Only RFC specified headers are accessed by these helpers, extensions should be available only by the Hash.
For complex values, the implementation should do a lazy instantiation of the objects involved.
For value types, check [3, 4]. The lists below shows what value a header will get after converting from raw value. Some of the headers will be improved on later milestones (check "improve later" headers, below):
General Headers Types
Entity Headers Types
Request Headers Types
Response Types
[1] http://www.w3.org/Protocols/rfc2616/rfc2616.html
[2] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14
[3] http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2
[4] http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3
[5] https://github.com/abril/cachebag/blob/master/lib/cachebag/cache_control.rb
[6] https://github.com/abril/cachebag/blob/master/test/cachebag/cache_control_test.rb
[7] http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
[8] http://www.ietf.org/rfc/rfc2617.txt
[9] http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
The text was updated successfully, but these errors were encountered: