TS-2344 fix remap type "redirect" logging & response_body

TS-2344 fix remap type "redirect" logging & response_body

* handleIfRedirect() should be called before 404 response
* Location header should be added before build_error_response
* status_code < 400 not logged