0.16.0 A Bucket of changes, focused around adding utilities and improving error cases.
Includes BREAKING CHANGE:
-
set_body
automatically adds the content length. -
set_body
raises exception for responses that cannot have a body. -
html_escape
moved toEExHTML
project.
CHANGELOG
Added
-
:maximum_body_length
options when usingRaxx.Server
so protect against bad clients. -
Raxx.set_content_length/3
to set the content length of a request or response. -
Raxx.get_content_length/2
to get the integer value for the content length of a message. -
Raxx.set_attachment/2
helper to tell the browser the response should be stored on disk rather than displayed in the browser. -
Raxx.safe?/1
to check if request method marks it as safe. -
Raxx.idempotent?/1
to check if request method marks it as idempotent. -
Raxx.get_query/1
replacement forRaxx.fetch_query/1
because it never returns error case.
Changed
-
Raxx.set_body/2
will raise an exception for responses that cannot have a body. -
Raxx.set_body/2
automatically adds the “content-length” if it is able. - Requests and Responses now work with iodata.
-
Raxx.body
spec changed to include iodata. - Improved error message when using invalid iolist in a view.
-
Raxx.NotFound
works with iodata for temporary body during buffering. -
render
function generated byRaxx.View
sets body to iodata from view,
without turning into a binary.
-
-
Raxx.set_header/2
now raises when setting connection specific headers.
Removed
-
EEx.HTML
replaced byEExHTML
from theeex_html
hex package. -
Raxx.html_escape/1
replaced byEExHTML.escape_to_binary/1
.
Fixed
-
Raxx.HTTP1.parse_request/1
andRaxx.HTTP1.parse_response/1
handle more error cases.- response/request sent when request/response expected.
- multiple “host” headers in message.
- invalid “content-length” header.
- multiple “content-length” headers in message.
- invalid “connection” header.
- multiple “connection” headers in message.