Permalink
Browse files

fix buffer for node 0.3.0 compat

  • Loading branch information...
1 parent 8e15779 commit 68a32efd5b689fb2491dface4023936d164c45a0 cloudhead committed Oct 29, 2010
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/node-static.js
  2. +2 −2 package.json
View
@@ -6,7 +6,7 @@ var fs = require('fs'),
url = require('url'),
path = require('path');
-this.version = [0, 5, 1];
+this.version = [0, 5, 3];
var mime = require('./node-static/mime');
var util = require('./node-static/util');
@@ -236,7 +236,7 @@ this.Server.prototype.stream = function (pathname, files, buffer, res, callback)
mode: 0666,
bufferSize: 4096
}).addListener('data', function (chunk) {
- buffer.write(chunk, offset, 0);
+ buffer.write(chunk, offset, 'binary');
res.write (chunk, 'binary');
offset += chunk.length;
}).addListener('close', function () {
View
@@ -9,7 +9,7 @@
"dependencies" : [],
"lib" : "lib",
"main" : "./lib/node-static",
- "version" : "0.5.2",
+ "version" : "0.5.3",
"directories" : { "test": "./test" },
- "engines" : { "node": ">= 0.2.3" }
+ "engines" : { "node": ">= 0.3.0" }
}

0 comments on commit 68a32ef

Please sign in to comment.