summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-09-06 12:18:46 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-09-07 17:17:12 -0700
commit1d0fb850d96c74c2edf6f01fe0a2875a8f799051 (patch)
tree0e8a3e9217e5a561f5d5d7067b852b845f72d056
parent4fe5e86a7ece2ebabb7fb7bd8877f57dd42517b9 (diff)
downloadnode-new-1d0fb850d96c74c2edf6f01fe0a2875a8f799051.tar.gz
test-http-parser should not use private API
-rw-r--r--test/simple/test-http-parser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/simple/test-http-parser.js b/test/simple/test-http-parser.js
index 6a9614e955..2068be5fba 100644
--- a/test/simple/test-http-parser.js
+++ b/test/simple/test-http-parser.js
@@ -15,7 +15,7 @@ var buffer = new Buffer(1024);
var request = "GET /hello HTTP/1.1\r\n\r\n";
-buffer.asciiWrite(request, 0, request.length);
+buffer.write(request, 0, 'ascii');
var callbacks = 0;
@@ -39,7 +39,7 @@ parser.onURL = function (b, off, len) {
parser.onPath = function (b, off, length) {
console.log("path [" + off + ", " + length + "]");
- var path = b.asciiSlice(off, off+length);
+ var path = b.toString('ascii', off, off+length);
console.log("path = '" + path + "'");
assert.equal('/hello', path);
callbacks++;