Fix REST API responses for 3xx and 4xx classes
Error replies were crashing with NullPointerException while checking
if the request method was HEAD. Some error paths do not pass in the
HttpServletRequest, which means the response code cannot check and
avoid writing the body.
Pass in the request in one more location, and assume the body must
be written if the request was not supplied. The servlet container
should gracefully discard the body if the request really was HEAD.
Change-Id: I8f0daf06727fd94c4be4d9d8019686ee4c1bac17
1 file changed