1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
Commit graph

6 commits

Author SHA1 Message Date
Eloy Pérez
5f95f553ab Disable monkey patch in RSpec for sinatra-contrib 2022-02-05 13:28:39 +01:00
Zachary Scott
d0d392c13c Merge branch 'change-link-header-delimiter-to-comma-and-newline' of https://github.com/petedmarsh/sinatra-contrib into petedmarsh-change-link-header-delimiter-to-comma-and-newline 2016-07-21 18:40:49 +09:00
stjhimy
8003802307 Migrate to rspec 3.4 2016-06-21 15:12:09 -03:00
Peter Marsh
1d281128f1 Change LinkHeaders to use ",\n" as delimiter in Link HTTP header
Previously LinkHeaders would delimit multiple links with \n alone
like so:

    Link: <http://example.org/a>; rel="next"
          <http://example.org/b>; rel="prev"

However, comma + newline is used as the delimiter in the
specification's (https://tools.ietf.org/html/rfc5988#section-5.5)
examples and, additionally, it states:

> Note that extension relation types are REQUIRED to be absolute
> URIs in Link headers, and MUST be quoted if they contain a
> semicolon (";") or comma (",") (as these characters are used as
> delimiters in the header itself).

In comma + newline appears to be the standard in practice (e.g.
GitHub's API). This changes LinkHeaders to use comma + newline as
the delimieter between multiple links, e.g:

    Link: <http://example.org/a>; rel="next",
          <http://example.org/b>; rel="prev"
2016-04-15 21:24:49 +01:00
Bo Jeanes
5e01e0db22 Limit backports usage in specs 2014-05-12 19:59:19 -07:00
Konstantin Haase
074aedc187 new extensions: sinatra-link-helper 2011-03-24 08:46:55 +01:00