Fix #respond_with_status
when headers written or closed
#10415
Merged
#respond_with_status
when headers written or closed
#10415