CrowdHailer / raxx

Interface for HTTP webservers, frameworks and clients
https://hexdocs.pm/raxx
Apache License 2.0
401 stars 29 forks source link

`Raxx.set_body` should raise an exception for messages with no body. #130

Closed CrowdHailer closed 5 years ago

CrowdHailer commented 5 years ago

https://tools.ietf.org/html/rfc7230#section-3.3

All 1xx (Informational), 204 (No Content), and 304 (Not Modified) responses do not include a message body. All other responses do include a message body, although the body might be of zero length.

Checklist

Follow up

The Parser should handle the special case of receiving a 204/304 with a content length and know not to read the body

CrowdHailer commented 5 years ago

Now on master. Will be released in 0.16.0