moved headers in rest server to cover all cases