diff options
Diffstat (limited to 'files/ja/learn')
-rw-r--r-- | files/ja/learn/server-side/node_server_without_framework/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/ja/learn/server-side/node_server_without_framework/index.html b/files/ja/learn/server-side/node_server_without_framework/index.html index a7ca7493b5..a59228be80 100644 --- a/files/ja/learn/server-side/node_server_without_framework/index.html +++ b/files/ja/learn/server-side/node_server_without_framework/index.html @@ -65,7 +65,7 @@ http.createServer(function (request, response) { if (error) { if(error.code == 'ENOENT') { fs.readFile('./404.html', function(error, content) { - response.writeHead(200, { 'Content-Type': contentType }); + response.writeHead(404, { 'Content-Type': 'text/html' }); response.end(content, 'utf-8'); }); } @@ -143,7 +143,7 @@ var contentType = mimeTypes[extname] || 'application/octet-stream'; <pre class="brush: js">if(error.code == 'ENOENT') { fs.readFile('./404.html', function(error, content) { - response.writeHead(200, { 'Content-Type': contentType }); + response.writeHead(404, { 'Content-Type': 'text/html' }); response.end(content, 'utf-8'); }); } |