Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated code to run with Node 0.4.*

  • Loading branch information...
commit a414e5e66cbe377e82053edc0b514e7b182acfd2 1 parent 959cd8e
Chris Winberry authored February 21, 2011
4  lib/nodemachine.js
@@ -560,7 +560,7 @@ Response.prototype.__defineGetter__("bufferResponse", function Response__getBuff
560 560
 Response.prototype.__defineSetter__("bufferResponse", function Response__setBufferResponse (value) { this._bufferResponse = !!value; });
561 561
 
562 562
 Response.prototype.sendHeader = function Response__sendHeader (statusCode, headers) {
563  
-	return(this._res.sendHeader(statusCode, headers));
  563
+	return(this._res.writeHead(statusCode, headers));
564 564
 }
565 565
 
566 566
 Response.prototype.sendBody = function Response__sendBody (chunk, encoding) {
@@ -575,7 +575,7 @@ Response.prototype.sendBody = function Response__sendBody (chunk, encoding) {
575 575
 Response.prototype.sendHeaders = function Response__sendHeaders () {
576 576
 	if (this._headersSent)
577 577
 		return;
578  
-	this._res.sendHeader(this._status, this._headers);
  578
+	this._res.writeHead(this._status, this._headers);
579 579
 	this._headersSent = true;
580 580
 }
581 581
 
4  package.json
... ...
@@ -1,7 +1,7 @@
1 1
 {
2 2
 	  "name": "nodemachine"
3 3
 	, "description": "Port of WebMachine"
4  
-	, "version": "0.2.5"
  4
+	, "version": "0.3.0"
5 5
 	, "author": "Chris Winberry <chris@winberry.net>"
6 6
 	, "contributors": []
7 7
 	, "repository": {
@@ -15,7 +15,7 @@
15 15
 	, "os": [ "linux", "darwin", "freebsd" ]
16 16
 	, "directories": { "lib": "./lib/" }
17 17
 	, "main": "./lib/nodemachine"
18  
-	, "engines": { "node": ">=0.1.33" }
  18
+	, "engines": { "node": ">=0.4.0" }
19 19
 	, "licenses": [{
20 20
 		  "type": "MIT"
21 21
 		, "url": "http://github.com/tautologistics/nodemachine/raw/master/LICENSE"
2  runtests.js
@@ -71,7 +71,7 @@ function runTest(currentTest) {
71 71
 	var body = '';
72 72
 //	request.finish(function (response) {
73 73
 	request.addListener("response", function (response) {
74  
-		response.setBodyEncoding("utf8");
  74
+		response.setEncoding("utf8");
75 75
 		response.addListener("data", function (chunk) {
76 76
 			body += chunk;
77 77
 		});

0 notes on commit a414e5e

Please sign in to comment.
Something went wrong with that request. Please try again.