From 54c8ea5ea251a38660e10ec1e3d69c30cc86ffc7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 6 Nov 2009 12:53:27 +0100 Subject: [PATCH] Fix http_simple server for new API --- benchmark/http_simple.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js index 7fec434724..1cd6124ced 100644 --- a/benchmark/http_simple.js +++ b/benchmark/http_simple.js @@ -1,14 +1,18 @@ -libDir = process.path.join(process.path.dirname(__filename), "../lib"); +path = require("path"); + +libDir = path.join(path.dirname(__filename), "../lib"); require.paths.unshift(libDir); process.mixin(require("sys")); -http = require("sys"); +http = require("http"); fixed = "" for (var i = 0; i < 20*1024; i++) { fixed += "C"; } + stored = {}; + http.createServer(function (req, res) { var commands = req.uri.path.split("/"); var command = commands[1]; @@ -16,8 +20,6 @@ http.createServer(function (req, res) { var arg = commands[2]; var status = 200; - p(req.uri.params); - if (command == "bytes") { var n = parseInt(arg, 10) if (n <= 0)