use setHeader instead of writeHead