diff options
author | yuto0214w <yuto0214w@gmail.com> | 2021-11-07 18:41:26 +0900 |
---|---|---|
committer | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-11-09 23:30:51 +0900 |
commit | 7dd5e4f16734dae80756c170c2680c98f6679368 (patch) | |
tree | a4596c896ab58204fe83a8ffc6decf4d124ffefa /files/ja | |
parent | 484eea053c501d706b5d8311fca5a94ef18c4d8e (diff) | |
download | translated-content-7dd5e4f16734dae80756c170c2680c98f6679368.tar.gz translated-content-7dd5e4f16734dae80756c170c2680c98f6679368.tar.bz2 translated-content-7dd5e4f16734dae80756c170c2680c98f6679368.zip |
Update node_server_without_framework
Diffstat (limited to 'files/ja')
-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'); }); } |