No commit activity in last 3 years
No release in over 3 years
Helpers for setting the HTTP Vary header in Sinatra.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.3
 Project Readme

Sinatra helpers to set the HTTP "Vary" header.

See RFC 2616 (HTTP/1.1): Vary

Author: Philipp Kempgen, http://kempgen.net

Usage

Include the module in your Sinatra application:

helpers ::Sinatra::Helpers::HTTP::Vary

Example:

vary! 'Accept'
vary! 'Accept-Language'
# headers['Vary'] is now "Accept, Accept-Language"

Example:

vary! '*'
# headers['Vary'] is now "*"

Example:

vary! '*'
vary! 'Accept-Language'
# headers['Vary'] is now "*"

Example:

vary! 'Accept-Language'
vary! '*'
# headers['Vary'] is now "*"