Sinatra v1.2.2 Release Notes
Release Date: 2011-04-08 // about 13 years ago-
The
:provides => :js
condition now matches bothapplication/javascript
andtext/javascript
. The:provides => :xml
condition now matches bothapplication/xml
andtext/xml
. TheContent-Type
header is set accordingly. If the client accepts both, theapplication/*
version is preferred, since thetext/*
versions are deprecated. (Konstantin Haase)The
provides
condition now handles wildcards inAccept
headers correctly. Thus:provides => :html
matchestext/html
,text/*
and*/*
. (Konstantin Haase)When parsing
Accept
headers,Content-Type
preferences are honored according to RFC 2616 section 14.1. (Konstantin Haase)URIs passed to the
url
helper orredirect
may now use any schema to be identified as absolute URIs, not onlyhttp
orhttps
. (Konstantin Haase)Handles
Content-Type
strings that already contain parameters correctly incontent_type
(example:content_type "text/plain; charset=utf-16"
). (Konstantin Haase)If a route with an empty pattern is defined (
get("") { ... }
) requests with an empty path info match this route instead of "/". (Konstantin Haase)In development environment, when running under a nested path, the image URIs on the error pages are set properly. (Konstantin Haase)