diff --git a/README.md b/README.md index ba0281f5..97cb140a 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,7 @@ get '/', :provides => ['rss', 'atom', 'xml'] do builder :feed end ``` +`provides` searches the request's Accept header. You can easily define your own conditions: @@ -1792,7 +1793,7 @@ etag '', :new_resource => true, :kind => :weak ### Sending Files -For sending files, you can use the `send_file` helper method: +To return the contents of a file as the response, you can use the `send_file` helper method: ``` ruby get '/' do @@ -1810,22 +1811,22 @@ The options are:
filename
-
file name, in response, defaults to the real file name.
+
File name to be used in the response, defaults to the real file name.
last_modified
-
value for Last-Modified header, defaults to the file's mtime.
+
Value for Last-Modified header, defaults to the file's mtime.
type
-
content type to use, guessed from the file extension if missing.
+
Value for Content-Type header, guessed from the file extension if missing.
disposition
- used for Content-Disposition, possible value: nil (default), + Value for Content-Disposition header, possible values: nil (default), :attachment and :inline
length
-
Content-Length header, defaults to file size.
+
Value for Content-Length header, defaults to file size.
status
@@ -2995,7 +2996,7 @@ SemVerTag. * [Twitter](http://twitter.com/sinatra) * [Mailing List](http://groups.google.com/group/sinatrarb/topics) * IRC: [#sinatra](irc://chat.freenode.net/#sinatra) on http://freenode.net -* [Sinatra Book](http://sinatra-book.gittr.com) Cookbook Tutorial +* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Cookbook Tutorial * [Sinatra Recipes](http://recipes.sinatrarb.com/) Community contributed recipes * API documentation for the [latest release](http://rubydoc.info/gems/sinatra)