server: explain why Content-Length is needed
This commit is contained in:
parent
7bc00c3da7
commit
079b05ce06
|
@ -104,6 +104,7 @@ impl Server {
|
||||||
err_response!(resp_headers
|
err_response!(resp_headers
|
||||||
.append("Content-Type", resp_content_type)
|
.append("Content-Type", resp_content_type)
|
||||||
.map_err(|_| "Could not create headers".to_string()));
|
.map_err(|_| "Could not create headers".to_string()));
|
||||||
|
// Content-Length is needed in case the DNS message itself contained end-of-string or end-of-line
|
||||||
err_response!(resp_headers
|
err_response!(resp_headers
|
||||||
.append("Content-Length", &resp_body.len().to_string())
|
.append("Content-Length", &resp_body.len().to_string())
|
||||||
.map_err(|_| "Could not create headers".to_string()));
|
.map_err(|_| "Could not create headers".to_string()));
|
||||||
|
|
Loading…
Reference in a new issue