use res.status() instead of res.statusCode
remove res.setHeader('content-length') due to break an output
fix unescaped regexp