This is placed in src not in include since it isn't meant to be included from other applications. This commit makes it easier to include elli.hrl in you app.
elli.hrl needs to be included by modules that modifies the req record.
- Replaced FileOpts in send_file/6 with Range, because the size option in FileOpts was actually redundant since the removal of prepare_send_file. - Made send_file more robust against errors. - Cleaned up some type specs. - Removed size related test and example code in elli_example_callback and elli_test.
Biggest change is moving all range and size parsing outside send_file into a new function prepare_send_file/5. This translates in a new send_file/5 whose signature and semantics are comparable to Elli's send_response.
…e, LastByte}. This makes working with ranges more consistent, since HTTP ranges also use the FirstByte, LastByte format. A side effect of this change is that ranges of length 0 are never possible anymore (but a size of 0 is still possible and results in a no-op)
…to keep track of listening processes.
Conflicts: include/elli.hrl src/elli_test.erl
…e to elli. Everytime any of these dies we have one less listener.
…It can be retrieved on demand with elli_request:peer/1. Requests inflight during the upgrade might crash.
…n be used to write a callback module that calls another callback module..