1 path = require("path");
3 var puts = require("../lib/sys").puts;
4 http = require("../lib/http2");
7 for (var i = 0; i < 20*1024; i++) {
13 http.createServer(function (req, res) {
14 var commands = req.url.split("/");
15 var command = commands[1];
17 var arg = commands[2];
20 if (command == "bytes") {
21 var n = parseInt(arg, 10)
23 throw "bytes called with n <= 0"
24 if (stored[n] === undefined) {
25 puts("create stored[n]");
27 for (var i = 0; i < n; i++) {
33 } else if (command == "quit") {
34 res.connection.server.close();
37 } else if (command == "fixed") {
45 var content_length = body.length.toString();
48 , { "Content-Type": "text/plain"
49 , "Content-Length": content_length