Permalink
Browse files

change response content type in samples to make them <ie9 friendly

  • Loading branch information...
1 parent 6f0b718 commit 56ac5bd89d0d55ef6b02a568e6c5fb7afe613511 @tjanczuk tjanczuk committed Sep 14, 2011
@@ -2,7 +2,7 @@ var http = require('http');
http.createServer(function (req, res) {
console.log('A new request arrived with HTTP headers: ' + JSON.stringify(req.headers));
- res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, world! [configuration sample]');
}).listen(process.env.PORT);
@@ -24,7 +24,7 @@
http.createServer(function (req, res) {
console.log('A new request arrived with HTTP headers: ' + JSON.stringify(req.headers));
- res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, world! [configuration sample]');
}).listen(process.env.PORT);
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('You have reached the default node.js application at index.js! [defaultdocument sample]');
}).listen(process.env.PORT);
@@ -21,7 +21,7 @@
<pre>var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('You have reached the default node.js application at index.js! [defaultdocument sample]');
}).listen(process.env.PORT); </pre>
<p>
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT);
@@ -31,7 +31,7 @@
<pre>var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT); </pre>
<p>
@@ -2,7 +2,7 @@ var http = require('http');
http.createServer(function (req, res) {
console.log('A new request arrived with HTTP headers: ' + JSON.stringify(req.headers));
- res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, world! [logging sample]');
}).listen(process.env.PORT);
@@ -31,7 +31,7 @@
http.createServer(function (req, res) {
console.log('A new request arrived with HTTP headers: ' + JSON.stringify(req.headers));
- res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, world! [logging sample]');
}).listen(process.env.PORT);
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello from urlrewrite sample. Request path: ' + req.url);
}).listen(process.env.PORT);
@@ -23,7 +23,7 @@
<pre>var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello from urlrewrite sample. Request path: ' + req.url);
}).listen(process.env.PORT);</pre>
<p>
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world!');
}).listen(process.env.PORT);
@@ -3,6 +3,6 @@ var http = require('http');
var n = 1;
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world ' + n++);
}).listen(process.env.PORT);
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('[defaultdocument]');
}).listen(process.env.PORT);
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end(req.url);
}).listen(process.env.PORT);
@@ -9,7 +9,7 @@ http.createServer(function (req, res) {
});
req.on("end", function () {
console.log('End of body');
- res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(body);
});
}).listen(process.env.PORT);
@@ -4,6 +4,6 @@ var n = 1;
http.createServer(function (req, res) {
console.log('Request' + n);
- res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, world ' + n++);
}).listen(process.env.PORT);
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world 1');
}).listen(process.env.PORT);
@@ -1,6 +1,6 @@
var http = require('http');
http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello, world 2');
}).listen(process.env.PORT);

0 comments on commit 56ac5bd

Please sign in to comment.