1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
sinatra/lib
Ryan Tomayko bacfa20d9f Make Static omit Content-Disposition header when serving files.
send_file_headers! now accepts nil for :disposition. When nil, omit both
the Content-Disposition and Content-Transfer-Encoding headers.

Modified Static to specify a nil :disposition. I believe this is more
in line with how most web servers serve static directories by default. User
agents are free to choose whether the entity should be displayed inline or
treated as an attachment.

Note that, although files served by the Static handler omit the
Content-Disposition header by default, explicit calls to send_file and
send_data in events default to :disposition => 'attachment'.
2008-03-26 15:51:13 -04:00
..
sinatra/test HEAD support and Static as GET/HEAD only event. 2008-03-12 17:00:49 -04:00
sinatra.rb Make Static omit Content-Disposition header when serving files. 2008-03-26 15:51:13 -04:00