The default html error page as response body should be built completely include three ending html symbols(/ul, /body and /html) before rgw computes Content-Length in response header. The Content-Length in response header will be consistent with response body size. Client can get complete page.
Fixes: https://tracker.ceph.com/issues/52363
(cherry picked from commit
cbeaef9fbe96c930fc10b793773e7ecd137fde81)
Co-authored-by: aicun hu <huaicun@chinatelecom.cn>
Co-authored-by: yupeng chen <chenyupeng@chinatelecom.cn>
Signed-off-by: xiangrui meng <mengxr@chinatelecom.cn>
(cherry picked from commit
e0bb8313fdfdc86352e8e2343599c02e574aeae3)
if (!force_no_error && s->is_err()) {
dump_start(s);
dump(s);
+ s->formatter->output_footer();
dump_content_length(s, s->formatter->get_len());
} else {
if (proposed_content_length == CHUNKED_TRANSFER_ENCODING) {