setting status and headers for page