-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Milestone
Description
I've been trying to readapt my accept-encoding specs using this library, and found that some things from the spec aren't implemented. Two stand out for now:
q=0aren't being ignored. According to the spec, this means that you explicitly don't want a specific encoding. This is specially valuable for identity.
HTTP::Accept::Encodings.parse("identity;q=0")
# expects #=> []
# returns #=> [#<struct HTTP::Accept::Encodings::ContentCoding encoding="identity", q="0">]this might have been by design (parse-don't-eval), but in all cases you are creating a needless structure.
- identity isn't explicitly added to the parsing list:
HTTP::Accept::Encodings.parse("gzip;q=1")
# expects #=> [struct gzip, struct identity]
# returns #=> [struct gzip]again, this might have been intended this way, but as referenced in the case above, sometimes you want to explicitly turn off identity, so you'd have to pass identity in all cases.
This is mostly a reference to the rack specs for encoding. Feel free to ignore this issue if the single purpose is to parse, not evaluate.
ioquatix and Juaneduardo90-A-Byte
Metadata
Metadata
Assignees
Labels
No labels