Skip to content

Commit

Permalink
changing sendHeader to writeHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Matuzak committed Jul 17, 2010
1 parent 34878e7 commit f49b603
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions djangode/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exports.serveFile = function(req, res, filename) {
});
}
loadResponseData(function() {
res.sendHeader(status, headers);
res.writeHeader(status, headers);
res.write(body, encoding);
res.close();
});
Expand All @@ -56,7 +56,7 @@ exports.serve = function(app, port, host) {

function respond(res, body, content_type, status) {
content_type = content_type || 'text/html';
res.sendHeader(status || 200, {
res.writeHeader(status || 200, {
'Content-Type': content_type + '; charset=utf-8'
});
res.write(body, 'utf8');
Expand All @@ -66,7 +66,7 @@ exports.respond = respond;

exports.redirect = redirect = function(res, location, status) {
status = status || 301;
res.sendHeader(status || 200, {
res.writeHeader(status || 200, {
'Content-Type': 'text/html; charset=utf-8',
'Location': location
});
Expand Down

0 comments on commit f49b603

Please sign in to comment.