this.out = null;
this.response = response = (response != null) ? response : Responses.noContent().build();
this.mappedThrowable = null;
if (response instanceof ResponseImpl) {
final ResponseImpl responseImpl = (ResponseImpl)response;
setStatusType(responseImpl.getStatusType());
setHeaders(response.getMetadata());
setEntity(responseImpl.getEntity(), responseImpl.getEntityType());
} else {
setStatus(response.getStatus());
setHeaders(response.getMetadata());
setEntity(response.getEntity());
}