Raxx.set_body should set the content length.
CrowdHailer opened this issue · 1 comments
CrowdHailer commented
Rational
This is because it will be added when serializing.
The content-length header is left on the request/response when parsed.
as much as possible the parsed request should equal the original request.
implementation.
The aim is to have as few special cases as possible, i.e. treat most headers the same way.
However content length is important for every request.
For that reason I think we should add the function Raxx.set_content_length(message, non_neg_integer
and one to get/fetch the content length.
set_body
can then make use of set_content_length
.
Checklist
- test new function
- changelog
- update Ace, I think it has some tests that set body and then manually a content length.
They will need updating
CrowdHailer commented
Done on master, will be part of 0.16.0