Raxx v0.16.0 Release Notes

Release Date: 2018-09-12 // over 5 years ago
  • โž• Added

    • :maximum_body_length options when using Raxx.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 for Raxx.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 by Raxx.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 by EExHTML from the eex_html hex package.
    • Raxx.html_escape/1 replaced by EExHTML.escape_to_binary/1.

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ Raxx.HTTP1.parse_request/1 and Raxx.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.