Path to this page:
./
www/ruby-http-accept,
Parse Accept and Accept-Language HTTP headers
Branch: CURRENT,
Version: 2.2.1,
Package name: ruby31-http-accept-2.2.1,
Maintainer: pkgsrc-users# HTTP::Accept
Provides a robust set of parsers for dealing with HTTP Accept,
Accept-Language, Accept-Encoding, Accept-Charset headers.
## Motivation
I've been developing some tools for building RESTful endpoints and part of
that involved versioning. After reviewing the options, I settled on using
the Accept: application/json;version=1 method as outlined here.
The version=1 part of the media-type is a parameter as defined by RFC7231
Section 3.1.1.1. After reviewing several existing different options for
parsing the Accept: header, I noticed a disturbing trend: header.split(',').
Because parameters may contain quoted strings which contain commas, this is
clearly not an appropriate way to parse the header.
I am concerned about correctness, security and performance. As such, I
implemented this gem to provide a simple high level interface for both
parsing and correctly interpreting these headers.
Required to run:[
lang/ruby26-base]
Required to build:[
pkgtools/cwrappers]
Master sites:
Filesize: 15 KB
Version history: (Expand)
- (2024-02-05) Updated to version: ruby31-http-accept-2.2.1
- (2023-02-09) Updated to version: ruby31-http-accept-2.2.0
- (2022-08-31) Updated to version: ruby27-http-accept-2.2.0
- (2021-10-07) Updated to version: ruby27-http-accept-2.1.1
- (2020-01-19) Package added to pkgsrc.se, version ruby26-http-accept-2.1.1 (created)
CVS history: (Expand)
2024-02-05 16:53:07 by Takahiro Kambe | Files touched by this commit (3) | |
Log message:
www/ruby-http-accept: update to 2.2.1
2.2.1 (2024-02-05)
What's Changed
* Update README with how to require the code by @ianoxley in #18
* Modernize gem by @ioquatix in #19
New Contributors
* @ianoxley made their first contribution in #18
* @ioquatix made their first contribution in #19
|
2022-08-31 16:56:22 by Takahiro Kambe | Files touched by this commit (3) | |
Log message:
www/ruby-http-accept: update to 2.2.0
2.2.0 (2022-08-02)
* Tidy up specs.
* Improve default constructor.
* Remove code climate badge.
* Merge pull request #14 from socketry/olleolleolle-add-27
* Handle q-values up to 6 decimal places.
* Modernize gem.
|
2021-10-26 13:31:15 by Nia Alarie | Files touched by this commit (1030) |
Log message:
www: Replace RMD160 checksums with BLAKE2s checksums
All checksums have been double-checked against existing RMD160 and
SHA512 hashes
Not committed (merge conflicts):
www/nghttp2/distinfo
Unfetchable distfiles (almost certainly fetched conditionally...):
./www/nginx-devel/distinfo array-var-nginx-module-0.05.tar.gz
./www/nginx-devel/distinfo echo-nginx-module-0.62.tar.gz
./www/nginx-devel/distinfo encrypted-session-nginx-module-0.08.tar.gz
./www/nginx-devel/distinfo form-input-nginx-module-0.12.tar.gz
./www/nginx-devel/distinfo headers-more-nginx-module-0.33.tar.gz
./www/nginx-devel/distinfo lua-nginx-module-0.10.19.tar.gz
./www/nginx-devel/distinfo naxsi-1.3.tar.gz
./www/nginx-devel/distinfo nginx-dav-ext-module-3.0.0.tar.gz
./www/nginx-devel/distinfo nginx-rtmp-module-1.2.2.tar.gz
./www/nginx-devel/distinfo nginx_http_push_module-1.2.10.tar.gz
./www/nginx-devel/distinfo ngx_cache_purge-2.5.1.tar.gz
./www/nginx-devel/distinfo ngx_devel_kit-0.3.1.tar.gz
./www/nginx-devel/distinfo ngx_http_geoip2_module-3.3.tar.gz
./www/nginx-devel/distinfo njs-0.5.0.tar.gz
./www/nginx-devel/distinfo set-misc-nginx-module-0.32.tar.gz
./www/nginx/distinfo array-var-nginx-module-0.05.tar.gz
./www/nginx/distinfo echo-nginx-module-0.62.tar.gz
./www/nginx/distinfo encrypted-session-nginx-module-0.08.tar.gz
./www/nginx/distinfo form-input-nginx-module-0.12.tar.gz
./www/nginx/distinfo headers-more-nginx-module-0.33.tar.gz
./www/nginx/distinfo lua-nginx-module-0.10.19.tar.gz
./www/nginx/distinfo naxsi-1.3.tar.gz
./www/nginx/distinfo nginx-dav-ext-module-3.0.0.tar.gz
./www/nginx/distinfo nginx-rtmp-module-1.2.2.tar.gz
./www/nginx/distinfo nginx_http_push_module-1.2.10.tar.gz
./www/nginx/distinfo ngx_cache_purge-2.5.1.tar.gz
./www/nginx/distinfo ngx_devel_kit-0.3.1.tar.gz
./www/nginx/distinfo ngx_http_geoip2_module-3.3.tar.gz
./www/nginx/distinfo njs-0.5.0.tar.gz
./www/nginx/distinfo set-misc-nginx-module-0.32.tar.gz
|
2021-10-07 17:09:00 by Nia Alarie | Files touched by this commit (1033) |
Log message:
www: Remove SHA1 hashes for distfiles
|
2020-01-19 09:23:06 by Takahiro Kambe | Files touched by this commit (4) |
Log message:
www/ruby-http-accept: add version 2.1.1 package
Add ruby-http-accept version 2.1.1 package.
# HTTP::Accept
Provides a robust set of parsers for dealing with HTTP Accept,
Accept-Language, Accept-Encoding, Accept-Charset headers.
## Motivation
I've been developing some tools for building RESTful endpoints and part of
that involved versioning. After reviewing the options, I settled on using
the Accept: application/json;version=1 method as outlined here.
The version=1 part of the media-type is a parameter as defined by RFC7231
Section 3.1.1.1. After reviewing several existing different options for
parsing the Accept: header, I noticed a disturbing trend: header.split(',').
Because parameters may contain quoted strings which contain commas, this is
clearly not an appropriate way to parse the header.
I am concerned about correctness, security and performance. As such, I
implemented this gem to provide a simple high level interface for both
parsing and correctly interpreting these headers.
|