fix http response code in resource server