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
[x] test new function
[x] changelog
[x] update Ace, I think it has some tests that set body and then manually a content length.
They will need updating
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 ofset_content_length
.Checklist